| @@ -2,9 +2,9 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * Plugin Name: VdoCipher |
| 4 | 4 | * Plugin URI: http://www.vdocipher.com |
| 5 | 5 | * Description: Secured video hosting for wordpress |
| 6 | - * Version: 1.20 | |
| 6 | + * Version: 1.17 | |
| 7 | 7 | * Author: VdoCipher |
| 8 | 8 | * Author URI: http://www.vdocipher.com |
| 9 | 9 | * License: GPL2 |
| 10 | 10 | */ |
| @@ -46,15 +46,11 @@ | ||
| 46 | 46 | 'height' => get_option('vdo_default_height') . "px", |
| 47 | 47 | 'id' => 'id', |
| 48 | 48 | 'no_annotate'=> false, |
| 49 | 49 | 'version'=> 0, |
| 50 | - 'player_tech'=> '' | |
| 51 | 50 | ), |
| 52 | 51 | $atts |
| 53 | 52 | )); |
| 54 | - if((get_option('vdo_default_height')) == 'auto') { | |
| 55 | - $height = 'auto'; | |
| 56 | - } | |
| 57 | 53 | if (!$atts['id']) { |
| 58 | 54 | if (!$atts['title']) { |
| 59 | 55 | return "Required argument id for embedded video not found."; |
| 60 | 56 | } |
| @@ -118,9 +114,9 @@ | ||
| 118 | 114 | if (isset($atts['version'])) { |
| 119 | 115 | $version = $atts['version']; |
| 120 | 116 | } |
| 121 | 117 | if ((get_option('vdo_embed_version')) == false) { |
| 122 | - update_option('vdo_embed_version', '1.5.0'); | |
| 118 | + update_option('vdo_embed_version', '0.5'); | |
| 123 | 119 | } |
| 124 | 120 | if ((get_option('vdo_player_theme')) == false) { |
| 125 | 121 | update_option('vdo_player_theme','9ae8bbe8dd964ddc9bdb932cca1cb59a'); |
| 126 | 122 | } |
| @@ -126,30 +122,8 @@ | ||
| 126 | 122 | } |
| 127 | 123 | $vdo_embed_version_str = get_option('vdo_embed_version'); |
| 128 | 124 | $vdo_player_theme = get_option('vdo_player_theme'); |
| 129 | 125 | |
| 130 | - // tech override custom names start | |
| 131 | - switch ($player_tech) { | |
| 132 | - case "flash": | |
| 133 | - $player_tech = "*,-dash"; | |
| 134 | - break; | |
| 135 | - case "nohtml5": | |
| 136 | - $player_tech = "*,-dash"; | |
| 137 | - break; | |
| 138 | - case "noflash": | |
| 139 | - $player_tech = "*,-hss"; | |
| 140 | - break; | |
| 141 | - case "nozen": | |
| 142 | - $player_tech = "*,-zen"; | |
| 143 | - break; | |
| 144 | - case "noios": | |
| 145 | - $player_tech = "*,-hlse"; | |
| 146 | - break; | |
| 147 | - default: | |
| 148 | - break; | |
| 149 | - } | |
| 150 | - // tech override ends | |
| 151 | - | |
| 152 | 126 | // Old Embed Code |
| 153 | 127 | if($vdo_embed_version_str === '0.5') { |
| 154 | 128 | $output = "<div id='vdo$OTP' style='height:$height;width:$width;max-width:100%' ></div>"; |
| 155 | 129 | $output .= "<script> (function(v,i,d,e,o){v[o]=v[o]||{}; v[o].add = v[o].add || function V(a){". |
| @@ -176,18 +150,8 @@ | ||
| 176 | 150 | $output .= "otp: '$OTP',"; |
| 177 | 151 | $output .= "playbackInfo: btoa(JSON.stringify({"; |
| 178 | 152 | $output .= "videoId: '$video'})),"; |
| 179 | 153 | $output .= "theme: '$vdo_player_theme',"; |
| 180 | - if($player_tech !== ''){ | |
| 181 | - $output .= "techoverride: [" ; | |
| 182 | - $techarray = explode(',', $player_tech); | |
| 183 | - for($i = 0; $i < sizeof($techarray); $i++){ | |
| 184 | - $output .= "'$techarray[$i]'"; | |
| 185 | - if($i !== sizeof($techarray)-1) | |
| 186 | - $output .= ", "; | |
| 187 | - } | |
| 188 | - $output .= "],"; | |
| 189 | - } | |
| 190 | 154 | $output .= "container: document.querySelector('#vdo$OTP'),});"; |
| 191 | 155 | $output .= "</script>"; |
| 192 | 156 | } |
| 193 | 157 | return $output; |
| @@ -214,17 +178,17 @@ | ||
| 214 | 178 | // non-admin enqueues, actions, and filters |
| 215 | 179 | } |
| 216 | 180 | function vdo_menu() |
| 217 | 181 | { |
| 218 | - add_menu_page('VdoCipher Options', 'VdoCipher', 'manage_options', 'vdocipher', 'vdo_options', plugin_dir_url(__FILE__).'images/logo.png'); | |
| 182 | + add_menu_page('VdoCipher Options', 'VdoCipher', 'manage_options', 'vdocipher', 'vdo_options'); | |
| 219 | 183 | } |
| 220 | 184 | function vdo_options() |
| 221 | 185 | { |
| 222 | 186 | if (!get_option('vdo_default_height')) { |
| 223 | - update_option('vdo_default_height', 'auto'); | |
| 187 | + update_option('vdo_default_height', '360'); | |
| 224 | 188 | } |
| 225 | 189 | if (!get_option('vdo_default_width')) { |
| 226 | - update_option('vdo_default_width', '1280'); | |
| 190 | + update_option('vdo_default_width', '640'); | |
| 227 | 191 | } |
| 228 | 192 | $vdo_client_key = get_option('vdo_client_key'); |
| 229 | 193 | if (!$vdo_client_key && strlen($vdo_client_key) != 64) { |
| 230 | 194 | vdo_show_form_client_key(); |
| @@ -263,16 +227,16 @@ | ||
| 263 | 227 | } |
| 264 | 228 | function vdo_activate() |
| 265 | 229 | { |
| 266 | 230 | if ((get_option('vdo_default_height')) == false) { |
| 267 | - update_option('vdo_default_height', 'auto'); | |
| 231 | + update_option('vdo_default_height', '360'); | |
| 268 | 232 | } |
| 269 | 233 | if ((get_option('vdo_default_width')) == false) { |
| 270 | - update_option('vdo_default_width', '1280'); | |
| 234 | + update_option('vdo_default_width', '640'); | |
| 271 | 235 | } |
| 272 | 236 | //https://stackoverflow.com/a/2173318/5022684 |
| 273 | 237 | if ((get_option('vdo_embed_version')) == false) { |
| 274 | - update_option('vdo_embed_version', '1.5.0'); | |
| 238 | + update_option('vdo_embed_version', '0.5'); | |
| 275 | 239 | } |
| 276 | 240 | if ((get_option('vdo_player_theme')) == false) { |
| 277 | 241 | update_option('vdo_player_theme','9ae8bbe8dd964ddc9bdb932cca1cb59a'); |
| 278 | 242 | } |