Video Embed & Thumbnail Generator - Version 4.5

Version Description

This is probably the last completely free major release. Some advanced features will be converted to premium add-ons in the future. More info in the support forum.

Download this release

Release Info

Developer kylegilman
Plugin Icon 128x128 Video Embed & Thumbnail Generator
Version 4.5
Comparing to
See all releases

Code changes from version 4.4.2 to 4.5

css/kgvid_styles.css CHANGED
@@ -62,6 +62,11 @@
62
  box-shadow: none;
63
  }
64
 
 
 
 
 
 
65
  .vjs-control-bar, .mejs-controls {
66
  z-index:2;
67
  }
@@ -259,6 +264,10 @@ img.kgvid_ios_novideo {
259
  text-decoration: none;
260
  }
261
 
 
 
 
 
262
  .kgvid_gallery_prev {
263
  top: -20px;
264
  right: 58px;
@@ -273,6 +282,37 @@ img.kgvid_ios_novideo {
273
  background-color: #555;
274
  }
275
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  /* video-quality-selector Video.js plugin styles */
277
 
278
  .vjs-res-button span.vjs-control-text {
62
  box-shadow: none;
63
  }
64
 
65
+ .kgvid_watermark a {
66
+ display: block;
67
+ position: inherit !important;
68
+ }
69
+
70
  .vjs-control-bar, .mejs-controls {
71
  z-index:2;
72
  }
264
  text-decoration: none;
265
  }
266
 
267
+ #kgvid-simplemodal-container .wp-video {
268
+ margin-bottom: 0px;
269
+ }
270
+
271
  .kgvid_gallery_prev {
272
  top: -20px;
273
  right: 58px;
282
  background-color: #555;
283
  }
284
 
285
+ .kgvid_gallery_pagination span {
286
+ cursor: pointer;
287
+ display: inline-block;
288
+ width: 24px;
289
+ height: 24px;
290
+ background-color: #ddd;
291
+ text-align: center;
292
+ color: #ccc;
293
+ border-radius: 12px;
294
+ font-size: 16px;
295
+ font-weight: 900;
296
+ border: 1px solid #888;
297
+ line-height: 20px;
298
+ text-decoration: none;
299
+ }
300
+
301
+ span.kgvid_gallery_pagination_arrow {
302
+ background: none;
303
+ border: none;
304
+ }
305
+
306
+ .kgvid_gallery_pagination .kgvid_gallery_pagination_selected {
307
+ background-color: #666;
308
+ cursor: default;
309
+ }
310
+
311
+ .kgvid_gallery_pagination span a {
312
+ border: none;
313
+ text-decoration: none;
314
+ }
315
+
316
  /* video-quality-selector Video.js plugin styles */
317
 
318
  .vjs-res-button span.vjs-control-text {
css/video-embed-thumbnail-generator_admin.css CHANGED
@@ -74,7 +74,7 @@
74
  color: white;
75
  font-size: 80%;
76
  position:relative;
77
- top: -4px;
78
  }
79
 
80
  .kgvid_cancel_button {
@@ -119,7 +119,7 @@ div.kgvid_cancel_button input {
119
  font-size: 1pt;
120
  }
121
 
122
- .kgvid_encoding_small_text {
123
  text-indent: 0px;
124
  display: block;
125
  margin-left: -30px;
@@ -218,6 +218,13 @@ div.kgvid_thumbnail_overlay {
218
  filter: alpha(opacity = 50); /* required for opacity to work in IE */
219
  }
220
 
 
 
 
 
 
 
 
221
  div.kgvid_video_app_required {
222
  background: inherit;
223
  }
@@ -585,3 +592,8 @@ td.media-icon img {
585
  text-indent: 0;
586
  margin-left: 5px;
587
  }
 
 
 
 
 
74
  color: white;
75
  font-size: 80%;
76
  position:relative;
77
+ top: -3px;
78
  }
79
 
80
  .kgvid_cancel_button {
119
  font-size: 1pt;
120
  }
121
 
122
+ .compat-item .kgvid_encoding_small_text {
123
  text-indent: 0px;
124
  display: block;
125
  margin-left: -30px;
218
  filter: alpha(opacity = 50); /* required for opacity to work in IE */
219
  }
220
 
221
+ div.kgvid_save_overlay {
222
+ position: absolute;
223
+ top: 100px;
224
+ left: 40%;
225
+ font-size: 200%;
226
+ }
227
+
228
  div.kgvid_video_app_required {
229
  background: inherit;
230
  }
592
  text-indent: 0;
593
  margin-left: 5px;
594
  }
595
+
596
+ .media-modal .mejs-poster, .media-modal .mejs-overlay { /*prevents thumbnail overflow in Firefox */
597
+ max-width: 100%;
598
+ }
599
+
js/kgvid_video_embed.js CHANGED
@@ -1,29 +1,28 @@
1
  kgvid_video_vars = {};
2
 
3
- jQuery(document).ready(function() {
4
 
5
- jQuery('.kgvid_videodiv, .kgvid_video_gallery_thumb').each(function(){ //read variables into array
6
- var id = jQuery(this).data('id');
7
- var video_variable_name = 'kgvid_video_vars_'+id;
8
- kgvid_video_vars[id] = eval(video_variable_name);
9
- });
10
 
11
  jQuery('.kgvid_videodiv').each(function(){ //setup individual videos
12
- var id = jQuery(this).data('id');
13
- if ( kgvid_video_vars[id].player_type == "Strobe Media Playback" ) {
14
- swfobject.embedSWF(kgvid_video_vars[id].swfurl, 'video_'+id, kgvid_video_vars[id].width, kgvid_video_vars[id].height, '10.1.0', kgvid_video_vars[id].expressinstallswfurl, kgvid_video_vars[id].flashvars, kgvid_video_vars[id].params);
15
  }
16
 
17
- kgvid_setup_video(id);
18
 
19
  });
20
 
21
- jQuery('.kgvid_video_gallery_thumb').each(function(){ //add onclick for gallery thumbnails
22
- var id = jQuery(this).data('id');
23
- jQuery(this).on('click', function() { kgvid_SetVideo(id); } );
 
 
 
24
  });
25
 
26
- });
27
 
28
  function kgvid_SetVideo(id) { //for galleries
29
 
@@ -49,7 +48,7 @@ function kgvid_SetVideo(id) { //for galleries
49
  }
50
  var frame_height = height;
51
  var meta = jQuery('#kgvid_video_gallery_thumb_'+id).data('meta');
52
- if ( meta > 0 ) { frame_height = parseInt(height)+Math.round(24*meta); }
53
  var frame_width = parseInt(width) + 10;
54
  frame_height = parseInt(frame_height) + 10;
55
 
@@ -67,24 +66,50 @@ function kgvid_SetVideo(id) { //for galleries
67
 
68
  //build next/previous buttons
69
 
 
 
70
  var nav_code = '';
71
- if ( jQuery('#kgvid_video_gallery_thumb_'+id).prev('#'+gallery_id+' .kgvid_video_gallery_thumb').length > 0 ) {
 
 
72
  nav_code += '<a class="kgvid_gallery_nav kgvid_gallery_prev" title="'+kgvidL10n_frontend.previous+'">&#8592;</a>';
73
  }
74
- if ( jQuery('#kgvid_video_gallery_thumb_'+id).next('#'+gallery_id+' .kgvid_video_gallery_thumb').length > 0 ) {
 
 
75
  nav_code += '<a class="kgvid_gallery_nav kgvid_gallery_next" title="'+kgvidL10n_frontend.next+'">&#8594;</a>';
76
  }
77
 
78
  jQuery('#kgvid-simplemodal-container').prepend(nav_code);
79
 
80
  jQuery('.kgvid_gallery_next').click( function() {
81
- jQuery.modal.close();
82
- jQuery('#kgvid_video_gallery_thumb_'+id).next('.kgvid_video_gallery_thumb').trigger('click');
 
 
 
 
 
 
 
 
 
 
83
  });
84
 
85
  jQuery('.kgvid_gallery_prev').click( function() {
86
- jQuery.modal.close();
87
- jQuery('#kgvid_video_gallery_thumb_'+id).prev('.kgvid_video_gallery_thumb').trigger('click');
 
 
 
 
 
 
 
 
 
 
88
  });
89
  jQuery('#simplemodal-data').prepend('<div id="kgvid_popup_video_holder_'+id+'"></div>');
90
 
@@ -92,13 +117,14 @@ function kgvid_SetVideo(id) { //for galleries
92
 
93
  if ( jQuery('#kgvid_popup_video_holder_'+id).length == 1 ) { //make sure the user hasn't moved on to another video
94
 
95
- var video_vars = kgvid_video_vars[id];
96
- var popup_code = eval('kgvid_video_popup_code_'+id);
97
 
98
  jQuery('#kgvid_popup_video_holder_'+id).html(popup_code);
 
99
 
100
- if ( kgvid_video_vars[id].player_type == "Strobe Media Playback" ) {
101
- swfobject.embedSWF(kgvid_video_vars[id].swfurl, 'video_'+id, kgvid_video_vars[id].width, kgvid_video_vars[id].height, '10.1.0', kgvid_video_vars[id].expressinstallswfurl, kgvid_video_vars[id].flashvars, kgvid_video_vars[id].params);
102
  }
103
 
104
  jQuery.modal.setContainerDimensions();
@@ -106,7 +132,12 @@ function kgvid_SetVideo(id) { //for galleries
106
  jQuery.modal.setPosition();
107
 
108
  dialog.wrap.css('overflow', 'hidden'); //disable scroll bars
109
- if ( meta > 0 ) { jQuery('#kgvid-simplemodal-container').css('color','white'); } //show text if there's anything to see below the video
 
 
 
 
 
110
 
111
  if ( video_vars.player_type == "Video.js" ) {
112
  videojs('video_'+id).load();
@@ -140,10 +171,12 @@ function kgvid_SetVideo(id) { //for galleries
140
  if ( viewport_original != "" ) { viewport_meta.attr('content', viewport_original); }
141
  else { jQuery('#kgvid_gallery_viewport').remove(); }
142
 
143
- var video_vars = kgvid_video_vars[id];
 
144
  if ( video_vars !== undefined ) {
145
  if ( video_vars.player_type == "Video.js" ) {
146
- videojs('video_'+id).dispose();
 
147
  }
148
  if ( video_vars.player_type == "JW Player" ) {
149
  jwplayer(jQuery('#kgvid_'+id+'_wrapper .jwplayer').attr('id')).stop();
@@ -171,7 +204,7 @@ function kgvid_timeupdate() {
171
 
172
  function kgvid_setup_video(id) {
173
 
174
- var video_vars = kgvid_video_vars[id];
175
 
176
  if ( typeof (jQuery) == 'function' ) { jQuery.fn.fitVids=function(){}; }; //disable fitvids
177
 
@@ -196,12 +229,12 @@ function kgvid_setup_video(id) {
196
  jQuery('#video_'+id+'_flash_api').unwrap();
197
  }
198
 
199
- //if ( video_vars.resolutions_plugin == true ) { player.resolutions(true); }
200
-
201
  jQuery('#video_'+id).append(jQuery('#video_'+id+'_watermark'));
202
 
203
- if ( video_vars.set_volume != "" ) { player.volume(video_vars.set_volume); }
204
- if ( video_vars.mute == "true" ) { player.muted(true); }
 
 
205
 
206
  player.on('play', function kgvid_play_start(){
207
  player.off('timeupdate', kgvid_timeupdate);
@@ -217,6 +250,7 @@ function kgvid_setup_video(id) {
217
  jQuery('#video_'+id+'_meta').removeClass('kgvid_video_meta_hover');
218
  }
219
  if ( video_vars.autoplay == "true" ) { jQuery('#video_'+id+' > .vjs-control-bar').removeClass('vjs-fade-in'); }
 
220
  kgvid_video_counter(id, 'play');
221
  });
222
 
@@ -342,7 +376,7 @@ function kgvid_setup_video(id) {
342
 
343
  } //end if WordPress Default
344
 
345
- if ( kgvid_video_vars[id].player_type == "JW Player" ) {
346
  player_id = jQuery('#video_'+id+'_div').children('div[id^="jwplayer"]').attr('id');
347
  var player = jwplayer(player_id);
348
 
@@ -389,28 +423,21 @@ function kgvid_setup_video(id) {
389
  }
390
  }
391
 
392
- function kgvid_resize_all_videos() {
393
-
394
- for (var id in kgvid_video_vars) {
395
- kgvid_resize_video(id);
396
- }
397
-
398
- }
399
-
400
  function kgvid_resize_video(id) {
401
 
402
  if ( typeof kgvid_resize_video.counter == 'undefined' ) {
403
  kgvid_resize_video.counter = 0;
404
  }
405
 
406
- if ( kgvid_video_vars.hasOwnProperty(id) ) {
407
- var video_vars = kgvid_video_vars[id];
 
408
  var set_width = video_vars.width;
409
  var set_height = video_vars.height;
410
  var aspect_ratio = Math.round(set_height/set_width*1000)/1000
411
  var reference_div = jQuery('#kgvid_'+id+'_wrapper').parent();
412
  if ( reference_div.is('body') ) { parent_width = window.innerWidth; }
413
- if ( reference_div.attr('id') == 'kgvid_popup_video_holder_'+id ) { //if it's a pop-up video
414
  var window_width = jQuery(window).width();
415
  var window_height = jQuery(window).height();
416
  parent_width = window_width-40;
@@ -450,7 +477,7 @@ function kgvid_resize_video(id) {
450
  }
451
  else { jQuery('#kgvid_'+id+'_wrapper .vjs-big-play-button').removeAttr('style'); }
452
 
453
- if ( video_vars.auto_res == 'true' && player.availableRes !== undefined ) {
454
  var resolutions = player.availableRes;
455
  var resNumbers = [];
456
  jQuery.each(resolutions, function(){
@@ -505,10 +532,51 @@ function kgvid_resize_video(id) {
505
 
506
  }
507
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
508
  function kgvid_strobemedia_callback(id) {
509
 
510
  var player = document.getElementById('video_'+id);
511
- var video_vars = kgvid_video_vars[id];
512
 
513
  if ( player.getState() == 'buffering' || player.getState() == 'playing' ) {
514
  kgvid_video_counter(video_vars.id, 'play');
@@ -522,7 +590,7 @@ function kgvid_strobemedia_callback(id) {
522
 
523
  function kgvid_video_counter(id, event) {
524
 
525
- var video_vars = kgvid_video_vars[id];
526
  var changed = false;
527
  var title = jQuery('#kgvid_'+id+'_wrapper meta[itemprop=name]').attr('content');
528
 
@@ -554,3 +622,33 @@ function kgvid_video_counter(id, event) {
554
  });
555
  }
556
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  kgvid_video_vars = {};
2
 
3
+ jQuery(document).ready(kgvid_document_ready());
4
 
5
+ function kgvid_document_ready() {
 
 
 
 
6
 
7
  jQuery('.kgvid_videodiv').each(function(){ //setup individual videos
8
+ var video_vars = jQuery(this).data('kgvid_video_vars');
9
+ if ( video_vars.player_type == "Strobe Media Playback" ) {
10
+ swfobject.embedSWF(video_vars.swfurl, 'video_'+video_vars.id, video_vars.width, video_vars.height, '10.1.0', video_vars.expressinstallswfurl, video_vars.flashvars, video_vars.params);
11
  }
12
 
13
+ kgvid_setup_video(video_vars.id);
14
 
15
  });
16
 
17
+ jQuery('.kgvid_gallerywrapper').each(function(){ //setup gallery thumbnails
18
+
19
+ var gallery_id = this.id;
20
+ kgvid_resize_gallery_play_button(gallery_id);
21
+ jQuery(window).resize( function(){ kgvid_resize_gallery_play_button(gallery_id) } );
22
+
23
  });
24
 
25
+ }
26
 
27
  function kgvid_SetVideo(id) { //for galleries
28
 
48
  }
49
  var frame_height = height;
50
  var meta = jQuery('#kgvid_video_gallery_thumb_'+id).data('meta');
51
+ if ( meta > 0 ) { frame_height = parseInt(height)+Math.round(28*meta); }
52
  var frame_width = parseInt(width) + 10;
53
  frame_height = parseInt(frame_height) + 10;
54
 
66
 
67
  //build next/previous buttons
68
 
69
+ var is_paginated = jQuery('#'+gallery_id+' .kgvid_gallery_pagination span').length > 0;
70
+
71
  var nav_code = '';
72
+ if ( jQuery('#kgvid_video_gallery_thumb_'+id).prev('#'+gallery_id+' .kgvid_video_gallery_thumb').length > 0 ||
73
+ ( is_paginated && jQuery('#'+gallery_id+' .kgvid_gallery_pagination_selected').html() != "1" )
74
+ ) {
75
  nav_code += '<a class="kgvid_gallery_nav kgvid_gallery_prev" title="'+kgvidL10n_frontend.previous+'">&#8592;</a>';
76
  }
77
+ if ( jQuery('#kgvid_video_gallery_thumb_'+id).next('#'+gallery_id+' .kgvid_video_gallery_thumb').length > 0 ||
78
+ ( is_paginated && jQuery('#'+gallery_id+' .kgvid_gallery_pagination span a').last().html() > jQuery('#'+gallery_id+' .kgvid_gallery_pagination_selected').html() )
79
+ ) {
80
  nav_code += '<a class="kgvid_gallery_nav kgvid_gallery_next" title="'+kgvidL10n_frontend.next+'">&#8594;</a>';
81
  }
82
 
83
  jQuery('#kgvid-simplemodal-container').prepend(nav_code);
84
 
85
  jQuery('.kgvid_gallery_next').click( function() {
86
+
87
+ var next_thumb = jQuery('#kgvid_video_gallery_thumb_'+id).next('.kgvid_video_gallery_thumb');
88
+
89
+ if ( next_thumb.length == 0 && is_paginated ) {
90
+ var next_page = jQuery('#'+gallery_id+' .kgvid_gallery_pagination_selected').next();
91
+ kgvid_switch_gallery_page(next_page[0], 'next');
92
+ }
93
+ else { //not switching pages
94
+ jQuery.modal.close();
95
+ next_thumb.trigger('click');
96
+ }
97
+
98
  });
99
 
100
  jQuery('.kgvid_gallery_prev').click( function() {
101
+
102
+ var prev_thumb = jQuery('#kgvid_video_gallery_thumb_'+id).prev('.kgvid_video_gallery_thumb');
103
+
104
+ if ( prev_thumb.length == 0 && is_paginated ) {
105
+ var prev_page = jQuery('#'+gallery_id+' .kgvid_gallery_pagination_selected').prev();
106
+ kgvid_switch_gallery_page(prev_page[0], 'prev');
107
+ }
108
+ else { //not switching pages
109
+ jQuery.modal.close();
110
+ prev_thumb.trigger('click');
111
+ }
112
+
113
  });
114
  jQuery('#simplemodal-data').prepend('<div id="kgvid_popup_video_holder_'+id+'"></div>');
115
 
117
 
118
  if ( jQuery('#kgvid_popup_video_holder_'+id).length == 1 ) { //make sure the user hasn't moved on to another video
119
 
120
+ var popup_code = jQuery('#kgvid_video_gallery_thumb_'+id).data('popupcode');
121
+ var video_vars = jQuery('#kgvid_video_gallery_thumb_'+id).data('kgvid_video_vars');
122
 
123
  jQuery('#kgvid_popup_video_holder_'+id).html(popup_code);
124
+ jQuery('#video_'+id+'_div').data('kgvid_video_vars', video_vars);
125
 
126
+ if ( video_vars.player_type == "Strobe Media Playback" ) {
127
+ swfobject.embedSWF(video_vars.swfurl, 'video_'+id, video_vars.width, video_vars.height, '10.1.0', video_vars.expressinstallswfurl, video_vars.flashvars, video_vars.params);
128
  }
129
 
130
  jQuery.modal.setContainerDimensions();
132
  jQuery.modal.setPosition();
133
 
134
  dialog.wrap.css('overflow', 'hidden'); //disable scroll bars
135
+ if ( meta > 0 ) {
136
+ jQuery('#kgvid-simplemodal-container').css('color','white'); //show text if there's anything to see below the video
137
+ meta_bump = 5;
138
+ if ( video_vars.player_type == "JW Player" ) { meta_bump = 15; }
139
+ jQuery('#kgvid-simplemodal-container').height(jQuery('#kgvid-simplemodal-container').height() + meta_bump);
140
+ }
141
 
142
  if ( video_vars.player_type == "Video.js" ) {
143
  videojs('video_'+id).load();
171
  if ( viewport_original != "" ) { viewport_meta.attr('content', viewport_original); }
172
  else { jQuery('#kgvid_gallery_viewport').remove(); }
173
 
174
+ var video_vars = jQuery('#video_'+id+'_div').data('kgvid_video_vars');
175
+
176
  if ( video_vars !== undefined ) {
177
  if ( video_vars.player_type == "Video.js" ) {
178
+ videojs('video_'+id).pause();
179
+ setTimeout(function() { videojs('video_'+id).dispose(); }, 0);
180
  }
181
  if ( video_vars.player_type == "JW Player" ) {
182
  jwplayer(jQuery('#kgvid_'+id+'_wrapper .jwplayer').attr('id')).stop();
204
 
205
  function kgvid_setup_video(id) {
206
 
207
+ var video_vars = jQuery('#video_'+id+'_div').data('kgvid_video_vars');
208
 
209
  if ( typeof (jQuery) == 'function' ) { jQuery.fn.fitVids=function(){}; }; //disable fitvids
210
 
229
  jQuery('#video_'+id+'_flash_api').unwrap();
230
  }
231
 
 
 
232
  jQuery('#video_'+id).append(jQuery('#video_'+id+'_watermark'));
233
 
234
+ setTimeout(function() {
235
+ if ( video_vars.set_volume != "" ) { player.volume(video_vars.set_volume); }
236
+ if ( video_vars.mute == "true" ) { player.muted(true); }
237
+ }, 0);
238
 
239
  player.on('play', function kgvid_play_start(){
240
  player.off('timeupdate', kgvid_timeupdate);
250
  jQuery('#video_'+id+'_meta').removeClass('kgvid_video_meta_hover');
251
  }
252
  if ( video_vars.autoplay == "true" ) { jQuery('#video_'+id+' > .vjs-control-bar').removeClass('vjs-fade-in'); }
253
+ if ( video_vars.endofvideooverlay != "" ) { jQuery('#video_'+id+' > .vjs-poster').hide(); }
254
  kgvid_video_counter(id, 'play');
255
  });
256
 
376
 
377
  } //end if WordPress Default
378
 
379
+ if ( video_vars.player_type == "JW Player" ) {
380
  player_id = jQuery('#video_'+id+'_div').children('div[id^="jwplayer"]').attr('id');
381
  var player = jwplayer(player_id);
382
 
423
  }
424
  }
425
 
 
 
 
 
 
 
 
 
426
  function kgvid_resize_video(id) {
427
 
428
  if ( typeof kgvid_resize_video.counter == 'undefined' ) {
429
  kgvid_resize_video.counter = 0;
430
  }
431
 
432
+ var video_vars = jQuery('#video_'+id+'_div').data('kgvid_video_vars');
433
+
434
+ if ( video_vars !== undefined ) {
435
  var set_width = video_vars.width;
436
  var set_height = video_vars.height;
437
  var aspect_ratio = Math.round(set_height/set_width*1000)/1000
438
  var reference_div = jQuery('#kgvid_'+id+'_wrapper').parent();
439
  if ( reference_div.is('body') ) { parent_width = window.innerWidth; }
440
+ else if ( reference_div.attr('id') == 'kgvid_popup_video_holder_'+id ) { //if it's a pop-up video
441
  var window_width = jQuery(window).width();
442
  var window_height = jQuery(window).height();
443
  parent_width = window_width-40;
477
  }
478
  else { jQuery('#kgvid_'+id+'_wrapper .vjs-big-play-button').removeAttr('style'); }
479
 
480
+ if ( video_vars.auto_res == 'automatic' && player.availableRes !== undefined ) {
481
  var resolutions = player.availableRes;
482
  var resNumbers = [];
483
  jQuery.each(resolutions, function(){
532
 
533
  }
534
 
535
+ function kgvid_resize_gallery_play_button(gallery_id) {
536
+
537
+ var video_vars = jQuery('#'+gallery_id+' .kgvid_video_gallery_thumb').first().data('kgvid_video_vars');
538
+ var thumb_width = jQuery('#'+gallery_id+' .kgvid_video_gallery_thumb').first().width();
539
+
540
+ if ( video_vars.player_type == "Video.js" || video_vars.player_type == "WordPress Default" ) {
541
+
542
+ var max_percent = 0.17;
543
+
544
+
545
+ if ( video_vars.player_type == "Video.js" ) {
546
+ var button_selector = '.vjs-big-play-button';
547
+ var translate_y = 30;
548
+ }
549
+
550
+ if ( video_vars.player_type == "WordPress Default" ) {
551
+ var button_selector = '.mejs-overlay-button';
552
+ var translate_y = 5;
553
+ }
554
+
555
+ var play_button_percent = jQuery('#'+gallery_id+' '+button_selector).width()/thumb_width;
556
+
557
+ var unscaled_width = jQuery('#'+gallery_id+' '+button_selector)[0].offsetWidth;
558
+ var scale_value = Math.round(thumb_width * max_percent / unscaled_width * 1000)/1000;
559
+
560
+ if ( scale_value < 1 ) {
561
+ var css_text = 'scale('+scale_value+') translateY(-'+translate_y+'px)';
562
+
563
+ jQuery('#'+gallery_id+' '+button_selector).css({
564
+ 'transform' : css_text,
565
+ '-webkit-transform' : css_text,
566
+ '-o-transform' : css_text,
567
+ '-ms-transform': css_text
568
+ });
569
+ }
570
+ else { Query('#'+gallery_id+' '+button_selector).removeAttr('style'); }
571
+
572
+ }
573
+
574
+ }
575
+
576
  function kgvid_strobemedia_callback(id) {
577
 
578
  var player = document.getElementById('video_'+id);
579
+ var video_vars = jQuery('#video_'+id+'_div').data('kgvid_video_vars');
580
 
581
  if ( player.getState() == 'buffering' || player.getState() == 'playing' ) {
582
  kgvid_video_counter(video_vars.id, 'play');
590
 
591
  function kgvid_video_counter(id, event) {
592
 
593
+ var video_vars = jQuery('#video_'+id+'_div').data('kgvid_video_vars');
594
  var changed = false;
595
  var title = jQuery('#kgvid_'+id+'_wrapper meta[itemprop=name]').attr('content');
596
 
622
  });
623
  }
624
  }
625
+
626
+ function kgvid_switch_gallery_page(obj, post_action) {
627
+
628
+ var gallery_id = jQuery(obj).parents('.kgvid_gallerywrapper').attr('id');
629
+ var page = jQuery(obj).children().first().html();
630
+ var last_id = jQuery('.kgvid_videodiv, .kgvid_video_gallery_thumb').last().data('id').substr(6);
631
+
632
+ jQuery('#'+gallery_id).fadeTo("fast", 0.5);
633
+
634
+ jQuery.post(kgvidL10n_frontend.ajaxurl, {
635
+ action: 'kgvid_switch_gallery_page',
636
+ security: kgvidL10n_frontend.ajax_nonce,
637
+ page: page,
638
+ query_atts: eval('kgvid_video_gallery_query_'+gallery_id.substr(14)),
639
+ last_video_id: last_id
640
+ }, function(data) {
641
+ jQuery('#'+gallery_id).html(data);
642
+ kgvid_document_ready();
643
+ jQuery('#'+gallery_id).fadeTo("fast", 1);
644
+ if ( post_action == "next" ) {
645
+ jQuery.modal.close();
646
+ jQuery('#'+gallery_id+' .kgvid_video_gallery_thumb').first().trigger('click');
647
+ }
648
+ if ( post_action == "prev" ) {
649
+ jQuery.modal.close();
650
+ jQuery('#'+gallery_id+' .kgvid_video_gallery_thumb').last().trigger('click');
651
+ }
652
+ }, "json");
653
+
654
+ }
js/kgvid_video_plugin_admin.js CHANGED
@@ -79,9 +79,18 @@ function kgvid_thumb_video_loaded(postID) { //sets up mini custom player for mak
79
 
80
  var video = document.getElementById('thumb-video-'+postID);
81
 
 
 
 
 
 
 
 
 
 
82
  jQuery('#attachments-'+postID+'-thumbgenerate').prop('disabled', false).attr('title', '');
83
  jQuery('#attachments-'+postID+'-thumbrandomize').prop('disabled', false).attr('title', '');
84
- jQuery('#attachments-'+postID+'-numberofthumbs').prop('disabled', false).attr('title', '');
85
 
86
  if ( jQuery('#thumb-video-'+postID+'-player .mejs-container').attr('id') !== undefined ) { //this is the Media Library pop-up introduced in WordPress 4.0
87
  var mep_id = jQuery('#thumb-video-'+postID+'-player .mejs-container').attr('id');
@@ -201,17 +210,21 @@ function kgvid_reveal_thumb_video(postID) {
201
  jQuery(video).attr("preload", "metadata");
202
  video.load();
203
 
204
- if ( video.networkState == 1 || video.networkState == 2 ) {
205
- text.html(kgvidL10n.hidevideo);
206
- jQuery('#attachments-'+postID+'-thumbnailplaceholder').empty();
207
- jQuery('#thumb-video-'+postID).on('timeupdate.kgvid', function() {
208
- if (document.getElementById('thumb-video-'+postID).currentTime != 0) {
209
- var thumbtimecode = kgvid_convert_to_timecode(document.getElementById('thumb-video-'+postID).currentTime);
210
- jQuery('#attachments-'+postID+'-thumbtime').val(thumbtimecode);
211
- }
212
- });
213
- }
214
- else { text.html(kgvidL10n.cantloadvideo); }
 
 
 
 
215
  }
216
  else { //video is being hidden
217
 
@@ -230,11 +243,11 @@ function kgvid_generate_thumb(postID, buttonPushed) {
230
 
231
  var kgflashmediaplayersecurity = document.getElementsByName('attachments['+postID+'][kgflashmediaplayer-security]')[0].value;
232
  var attachmentURL = document.getElementsByName('attachments['+postID+'][kgflashmediaplayer-url]')[0].value;
233
- var howmanythumbs = document.getElementById('attachments-'+postID+'-numberofthumbs').value;
234
  var firstframethumb = document.getElementById('attachments-'+postID+'-firstframe').checked;
235
  var posterurl = document.getElementsByName('attachments['+postID+'][kgflashmediaplayer-poster]')[0].value;
236
 
237
- var specifictimecode = document.getElementsByName('attachments['+postID+'][thumbtime]')[0].value;
238
  if (specifictimecode === "0") { specifictimecode = "firstframe"; firstframethumb = true; }
239
  if (buttonPushed == "random" || howmanythumbs > 1) { specifictimecode = 0; }
240
  if (specifictimecode != 0 ) { howmanythumbs = 1; }
@@ -328,7 +341,7 @@ function kgvid_generate_thumb(postID, buttonPushed) {
328
  time_id = Math.round(video.currentTime*100);
329
  var time_display = kgvid_convert_to_timecode(video.currentTime);
330
 
331
- jQuery(thumbnailboxID).append('<div style="display:none;" class="kgvid_thumbnail_select" name="attachments['+postID+'][thumb'+time_id+']" id="attachments-'+postID+'-thumb'+time_id+'"><label for="kgflashmedia-'+postID+'-thumbradio'+time_id+'"><canvas class="kgvid_thumbnail" style="width:200px;height:'+Math.round(200*video_aspect)+'px;" id="'+postID+'_thumb_'+time_id+'"></canvas></label><br /><input type="radio" name="attachments['+postID+'][thumbradio'+time_id+']" id="kgflashmedia-'+postID+'-thumbradio'+time_id+'" value="'+video.currentTime+'" onchange="document.getElementById(\'attachments-'+postID+'-thumbtime\').value = \''+time_display+'\'; document.getElementById(\'attachments-'+postID+'-numberofthumbs\').value =\'1\';kgvid_save_canvas_thumb(\''+postID+'\', \''+time_id+'\', 1, 1);"></div>');
332
  var canvas = document.getElementById(postID+'_thumb_'+time_id);
333
  canvas.width = video_width;
334
  canvas.height = video_height;
@@ -390,8 +403,8 @@ function kgvid_generate_thumb(postID, buttonPushed) {
390
  function kgvid_select_thumbnail(thumb_url, post_id, movieoffset) {
391
  jQuery('[name="attachments['+post_id+'][kgflashmediaplayer-poster]"]').val(thumb_url); //get this by name because it's the same before WP v3.5
392
  var time_display = kgvid_convert_to_timecode(movieoffset);
393
- document.getElementById('attachments-'+post_id+'-thumbtime').value = time_display;
394
- document.getElementById('attachments-'+post_id+'-numberofthumbs').value = '1';
395
  }
396
 
397
  function kgvid_save_canvas_thumb(postID, time_id, total, index) {
@@ -402,21 +415,30 @@ function kgvid_save_canvas_thumb(postID, time_id, total, index) {
402
  var canvas = document.getElementById(postID+'_thumb_'+time_id);
403
  var png64dataURL = canvas.toDataURL(); //this is what saves the image. Do this after selection.
404
 
 
 
 
 
405
  jQuery.ajax({
406
  type: "POST",
407
  url: ajaxurl,
408
- data: { action:"kgvid_save_html5_thumb", security: kgflashmediaplayersecurity, raw_png: png64dataURL, url: video_url, offset: time_id, postID: postID, total: total, index: index },
409
- async: false
410
  })
411
  .done( function(thumb_url) {
412
  if ( total == 1 ) {
 
413
  jQuery('#attachments-'+postID+'-kgflashmediaplayer-poster').val(thumb_url).change();
 
414
  }
415
  else {
416
  kgvid_thumbnail_saveall_progress(postID, total);
417
  }
418
- }
419
- );
 
 
 
 
420
  }
421
 
422
  function kgvid_thumbnail_saveall_progress(postID, total) {
@@ -429,6 +451,9 @@ function kgvid_thumbnail_saveall_progress(postID, total) {
429
 
430
  if ( number == total ) {
431
  jQuery('#saveallthumbs-'+postID+'-div').slideUp(1000);
 
 
 
432
  }
433
 
434
  }
@@ -439,7 +464,7 @@ function kgvid_saveall_thumbs(postID) {
439
  var thumbnails = jQuery('#attachments-'+postID+'-kgflashmediaplayer-thumbnailbox').find('.kgvid_thumbnail');
440
  var total = thumbnails.length;
441
 
442
- jQuery('#saveallthumbs-'+postID+'-div').append('<div style="margin:5px;" id="saving_thumbs_meter" class="kgvid_meter"><div class="kgvid_meter_bar" style="width:0%;"><div class="kgvid_meter_text"></div></div></div><span id="saving_thumbs_status"> '+kgvidL10n.saving+'</span>');
443
 
444
  jQuery.each(thumbnails, function(key, value) {
445
  if ( value.tagName.toLowerCase() == "canvas" ) {
@@ -482,7 +507,7 @@ function kgvid_thumb_video_manual(postID) {
482
  var video_aspect = video.videoHeight/video.videoWidth;
483
  var time_id = Math.round(video.currentTime);
484
  var time_display = kgvid_convert_to_timecode(video.currentTime);
485
- document.getElementById('attachments-'+postID+'-thumbtime').value = time_display;
486
  jQuery("#attachments-"+postID+"-thumbnailplaceholder").html('<div class="kgvid_thumbnail_box kgvid_chosen_thumbnail_box"><canvas style="height:'+Math.round(200*video_aspect)+'px;" id="'+postID+'_thumb_'+time_id+'"></canvas></div>');
487
  var canvas = document.getElementById(postID+'_thumb_'+time_id);
488
  canvas.width = video.videoWidth;
@@ -511,7 +536,7 @@ function kgvid_enqueue_video_encode(postID) {
511
  page = "queue";
512
  }
513
 
514
- var formats = new Array("fullres", "1080", "720", "mobile", "ogg", "webm", "custom");
515
  var kgvid_encode = new Object();
516
  jQuery.each(formats, function(key,formats) {
517
  kgvid_encode[formats] = "";
@@ -562,8 +587,8 @@ function kgvid_change_singleurl(url, basename, oldbasename) {
562
  jQuery('#kgflashmediaplayer-table').data("kgvid_attachment_id", basename);
563
  jQuery('#attachments-'+oldbasename+'-kgflashmediaplayer-encodeboxes').attr('id', 'attachments-'+basename+'-kgflashmediaplayer-encodeboxes');
564
  document.getElementById('attachments-'+oldbasename+'-thumbnailplaceholder').id = 'attachments-'+basename+'-thumbnailplaceholder';
565
- document.getElementById('attachments-'+basename+'-thumbnailplaceholder').setAttribute("onchange", "document.getElementById('attachments-"+basename+"-thumbtime').value='';");
566
- document.getElementById('attachments-'+basename+'-numberofthumbs').setAttribute("onchange", "document.getElementById('attachments-"+basename+"-thumbtime').value='';");
567
  jQuery('#attachments-'+basename+'-thumbgenerate').replaceWith('<input disabled="disabled" type="button" id="attachments-'+basename+'-thumbgenerate" class="button-secondary" value="'+kgvidL10n.generate+'" name="thumbgenerate" onclick="kgvid_generate_thumb(\''+basename+'\', \'generate\');" >');
568
  jQuery('#attachments-'+basename+'-thumbrandomize').replaceWith('<input disabled="disabled" type="button" id="attachments-'+basename+'-thumbrandomize" class="button-secondary" value="'+kgvidL10n.randomize+'" name="thumbgenerate" onclick="kgvid_generate_thumb(\''+basename+'\', \'random\');" >');
569
  document.getElementById('attachments-'+basename+'-kgflashmediaplayer-width').setAttribute("onchange", "kgvid_set_dimension('"+basename+"', 'height', this.value);")
@@ -607,6 +632,7 @@ function kgvid_set_singleurl() {
607
  extensionExists = true;
608
  jQuery.post(ajaxurl, { action:"kgvid_sanitize_url", security: kgflashmediaplayersecurity, movieurl: url }, function(data) {
609
  basename = data.singleurl_id;
 
610
  url = data.movieurl;
611
  kgvid_change_singleurl(url, basename, oldbasename);
612
  jQuery('#attachments-'+basename+'-kgflashmediaplayer-encodeboxes').css('opacity', '0.5');
@@ -672,6 +698,7 @@ function kgvid_insert_shortcode() {
672
  shortcode += ' track_src="' + document.getElementById('attachments-'+basename+'-kgflashmediaplayer-track_src').value + '"';
673
  if (document.getElementById('attachments-'+basename+'-kgflashmediaplayer-track_srclang').value !="") { shortcode += ' track_srclang="' + document.getElementById('attachments-'+basename+'-kgflashmediaplayer-track_srclang').value + '"'; }
674
  if (document.getElementById('attachments-'+basename+'-kgflashmediaplayer-track_label').value !="") { shortcode += ' track_label="' + document.getElementById('attachments-'+basename+'-kgflashmediaplayer-track_label').value + '"'; }
 
675
  }
676
  if (document.getElementById('downloadlink').checked ) { shortcode += ' downloadlink="true"'; }
677
  shortcode += ']' + url + '[/KGVID] '; }
@@ -740,6 +767,129 @@ function kgvid_cancel_thumbs(postID) {
740
 
741
  }
742
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
743
  function kgvid_redraw_encode_checkboxes(movieurl, postID, page, blogID) {
744
 
745
  var kgflashmediaplayersecurity = jQuery('#attachments-'+postID+'-kgflashmediaplayer-security').val();
@@ -757,17 +907,21 @@ function kgvid_redraw_encode_checkboxes(movieurl, postID, page, blogID) {
757
  JSON.stringify(kgvid_encode);
758
 
759
  jQuery.post(ajaxurl, { action:"kgvid_generate_encode_checkboxes", security: kgflashmediaplayersecurity, movieurl: movieurl, post_id: postID, page: page, blog_id: blogID, encodeformats: kgvid_encode }, function(data) {
760
- jQuery('#attachments-'+postID+'-kgflashmediaplayer-encodeboxes').empty();
761
- jQuery('#attachments-'+postID+'-kgflashmediaplayer-encodeboxes').append(data.checkboxes);
762
- if ( page == "queue" ) {
763
- jQuery('#tr_'+postID+'.currently_encoding').removeClass('currently_encoding');
764
- jQuery('#tr_'+postID+' #clear_'+postID).css("display", "block");
765
- if ( data.encoding == true ) {
766
- jQuery('#clear_'+postID).css("display", "none");
767
- jQuery('#tr_'+postID).addClass('currently_encoding');
768
- }
769
  }
770
- jQuery('#attachments-'+postID+'-kgflashmediaplayer-encodeboxes').removeAttr('style');
 
 
 
 
 
771
  }, "json" );
772
  }
773
  }
@@ -790,6 +944,7 @@ function kgvid_redraw_thumbnail_box(postID) {
790
  .css('height', '100%')
791
  .css('padding-top', '0');
792
  }
 
793
  }
794
  else if ( data.thumb_error ) { jQuery('#attachments-'+postID+'-thumbnailplaceholder').html('<div class="kgvid_thumbnail_box kgvid_chosen_thumbnail_box"><span>'+data.thumb_error+'</span></div>'); }
795
  else { setTimeout(function(){ kgvid_redraw_thumbnail_box(postID) }, 5000); }
@@ -818,11 +973,24 @@ function kgvid_encode_queue(action, order, id) {
818
 
819
  if ( action == "clear_completed" ) {
820
  jQuery('tbody > .kgvid_complete').fadeTo('slow', 0.5);
821
- jQuery.post(ajaxurl, { action:"kgvid_clear_completed_queue", security: kgflashmediaplayersecurity, scope: scope }, function(data) {
822
  jQuery('table.widefat > tbody').replaceWith("<tbody class='rows'>"+data+"</tbody>");
823
  }, "html" );
824
  }
825
 
 
 
 
 
 
 
 
 
 
 
 
 
 
826
  }
827
 
828
  function kgvid_save_plugin_settings(input_obj) {
@@ -921,6 +1089,7 @@ function kgvid_embeddable_switch(checked) {
921
 
922
  var overlay_embedcode = jQuery("#overlay_embedcode");
923
  var open_graph = jQuery("#open_graph");
 
924
 
925
  if (checked == false) {
926
  overlay_embedcode[0].checked=false;
@@ -929,10 +1098,13 @@ function kgvid_embeddable_switch(checked) {
929
  open_graph[0].checked=false;
930
  open_graph[0].disabled=true;
931
  open_graph.change();
 
 
932
  }
933
  else {
934
  overlay_embedcode[0].disabled=false;
935
  open_graph[0].disabled=false;
 
936
  }
937
  }
938
 
@@ -1068,6 +1240,31 @@ function kgvid_hide_ffmpeg_settings() {
1068
 
1069
  }
1070
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1071
  function kgvid_set_bitrate_display() {
1072
 
1073
  var resolutions = [1080, 720, 360];
@@ -1141,14 +1338,6 @@ function kgvid_auto_generate_old(type) {
1141
 
1142
  }, "text" );
1143
 
1144
- }
1145
-
1146
- function kgvid_add_old_videos_to_queue() {
1147
-
1148
- var kgflashmediaplayersecurity = document.getElementById("kgvid_settings_security").value;
1149
-
1150
-
1151
-
1152
  }
1153
 
1154
  function kgvid_check_cms_progress(total, cms_type) {
@@ -1178,7 +1367,7 @@ function kgvid_pick_image(button) {
1178
  // Build the choose from library frame.
1179
 
1180
  var $el = jQuery(button);
1181
- event.preventDefault();
1182
 
1183
  // If the media frame already exists, reopen it.
1184
  if ( frame ) {
@@ -1227,7 +1416,7 @@ function kgvid_pick_attachment(button) {
1227
  // Build the choose from library frame.
1228
 
1229
  var $el = jQuery(button);
1230
- event.preventDefault();
1231
 
1232
  // If the media frame already exists, reopen it.
1233
  if ( frame ) {
@@ -1270,7 +1459,7 @@ function kgvid_pick_format(button, parentID, mime, format, movieurl) {
1270
  // Build the choose from library frame.
1271
 
1272
  var $el = jQuery(button);
1273
- event.preventDefault();
1274
 
1275
  // If the media frame already exists, reopen it.
1276
  if ( frame ) {
@@ -1337,6 +1526,6 @@ function kgvid_add_subtitles(id) {
1337
  var tracks = jQuery('#kgflashmediaplayer-'+id+'-trackdiv');
1338
  track_number = tracks.children().length;
1339
  track_label = track_number+1;
1340
- tracks.append('<div id="kgflashmediaplayer-'+id+'-trackdiv-'+track_number+'" class="kgvid_thumbnail_box kgvid_track_box"><strong>Track '+track_label+'</strong><span class="kgvid_track_box_removeable">X</span><br />'+kgvidL10n.tracktype+' <select name="attachments['+id+'][kgflashmediaplayer-track]['+track_number+'][kind]" id="attachments-'+id+'-kgflashmediaplayer-track_'+track_number+'_kind]"><option value="subtitles">'+kgvidL10n.subtitles+'</option><option value="captions">'+kgvidL10n.captions+'</option><option value="chapters">'+kgvidL10n.chapters+'</option></select><br /><span id="pick-track'+track_number+'" class="button-secondary" style="margin:10px 0;" data-choose="'+kgvidL10n.choosetextfile+'" data-update="'+kgvidL10n.settracksource+'" data-change="attachments-'+id+'-kgflashmediaplayer-track_'+track_number+'_src" onclick="kgvid_pick_attachment(this);">'+kgvidL10n.choosefromlibrary+'</span><br />URL: <input name="attachments['+id+'][kgflashmediaplayer-track]['+track_number+'][src]" id="attachments-'+id+'-kgflashmediaplayer-track_'+track_number+'_src" type="text" value="" class="text"><br />'+kgvidL10n.languagecode+' <input name="attachments['+id+'][kgflashmediaplayer-track]['+track_number+'][srclang]" id="attachments-'+id+'-kgflashmediaplayer-track_'+track_number+'_srclang" type="text" value="" maxlength="2" style="width:40px;"><br />'+kgvidL10n.label+' <input name="attachments['+id+'][kgflashmediaplayer-track]['+track_number+'][label]" id="attachments-'+id+'-kgflashmediaplayer-track_'+track_number+'_label" type="text" value="" class="text"></div>');
1341
  jQuery('.kgvid_track_box_removeable').click(function() { jQuery(this).parent().remove(); jQuery('form.compat-item input').first().change(); });
1342
  }
79
 
80
  var video = document.getElementById('thumb-video-'+postID);
81
 
82
+ if ( video != null ) {
83
+ var crossDomainTest = jQuery.get( video.currentSrc )
84
+ .fail( function(){
85
+ jQuery('#thumb-video-'+postID+'-container').hide();
86
+ jQuery('#thumb-video-'+postID).data('allowed', 'off');
87
+ kgvid_break_video_on_close(postID);
88
+ });
89
+ }
90
+
91
  jQuery('#attachments-'+postID+'-thumbgenerate').prop('disabled', false).attr('title', '');
92
  jQuery('#attachments-'+postID+'-thumbrandomize').prop('disabled', false).attr('title', '');
93
+ jQuery('#attachments-'+postID+'-kgflashmediaplayer-numberofthumbs').prop('disabled', false).attr('title', '');
94
 
95
  if ( jQuery('#thumb-video-'+postID+'-player .mejs-container').attr('id') !== undefined ) { //this is the Media Library pop-up introduced in WordPress 4.0
96
  var mep_id = jQuery('#thumb-video-'+postID+'-player .mejs-container').attr('id');
210
  jQuery(video).attr("preload", "metadata");
211
  video.load();
212
 
213
+ setTimeout(function(){ //wait for video to start loading
214
+
215
+ if ( video.networkState == 1 || video.networkState == 2 ) {
216
+ text.html(kgvidL10n.hidevideo);
217
+ jQuery('#attachments-'+postID+'-thumbnailplaceholder').empty();
218
+ jQuery('#thumb-video-'+postID).on('timeupdate.kgvid', function() {
219
+ if (document.getElementById('thumb-video-'+postID).currentTime != 0) {
220
+ var thumbtimecode = kgvid_convert_to_timecode(document.getElementById('thumb-video-'+postID).currentTime);
221
+ jQuery('#attachments-'+postID+'-kgflashmediaplayer-thumbtime').val(thumbtimecode);
222
+ }
223
+ });
224
+ }
225
+ else { text.html(kgvidL10n.cantloadvideo); }
226
+
227
+ }, 1000);
228
  }
229
  else { //video is being hidden
230
 
243
 
244
  var kgflashmediaplayersecurity = document.getElementsByName('attachments['+postID+'][kgflashmediaplayer-security]')[0].value;
245
  var attachmentURL = document.getElementsByName('attachments['+postID+'][kgflashmediaplayer-url]')[0].value;
246
+ var howmanythumbs = document.getElementById('attachments-'+postID+'-kgflashmediaplayer-numberofthumbs').value;
247
  var firstframethumb = document.getElementById('attachments-'+postID+'-firstframe').checked;
248
  var posterurl = document.getElementsByName('attachments['+postID+'][kgflashmediaplayer-poster]')[0].value;
249
 
250
+ var specifictimecode = document.getElementsByName('attachments['+postID+'][kgflashmediaplayer-thumbtime]')[0].value;
251
  if (specifictimecode === "0") { specifictimecode = "firstframe"; firstframethumb = true; }
252
  if (buttonPushed == "random" || howmanythumbs > 1) { specifictimecode = 0; }
253
  if (specifictimecode != 0 ) { howmanythumbs = 1; }
341
  time_id = Math.round(video.currentTime*100);
342
  var time_display = kgvid_convert_to_timecode(video.currentTime);
343
 
344
+ jQuery(thumbnailboxID).append('<div style="display:none;" class="kgvid_thumbnail_select" name="attachments['+postID+'][thumb'+time_id+']" id="attachments-'+postID+'-thumb'+time_id+'"><label for="kgflashmedia-'+postID+'-thumbradio'+time_id+'"><canvas class="kgvid_thumbnail" style="width:200px;height:'+Math.round(200*video_aspect)+'px;" id="'+postID+'_thumb_'+time_id+'"></canvas></label><br /><input type="radio" name="attachments['+postID+'][thumbradio'+time_id+']" id="kgflashmedia-'+postID+'-thumbradio'+time_id+'" value="'+video.currentTime+'" onchange="document.getElementById(\'attachments-'+postID+'-kgflashmediaplayer-thumbtime\').value = \''+time_display+'\'; document.getElementById(\'attachments-'+postID+'-kgflashmediaplayer-numberofthumbs\').value =\'1\';kgvid_save_canvas_thumb(\''+postID+'\', \''+time_id+'\', 1, 1);"></div>');
345
  var canvas = document.getElementById(postID+'_thumb_'+time_id);
346
  canvas.width = video_width;
347
  canvas.height = video_height;
403
  function kgvid_select_thumbnail(thumb_url, post_id, movieoffset) {
404
  jQuery('[name="attachments['+post_id+'][kgflashmediaplayer-poster]"]').val(thumb_url); //get this by name because it's the same before WP v3.5
405
  var time_display = kgvid_convert_to_timecode(movieoffset);
406
+ jQuery('#attachments-'+post_id+'-kgflashmediaplayer-thumbtime').val(time_display);
407
+ jQuery('#attachments-'+post_id+'-kgflashmediaplayer-numberofthumbs').val('1');
408
  }
409
 
410
  function kgvid_save_canvas_thumb(postID, time_id, total, index) {
415
  var canvas = document.getElementById(postID+'_thumb_'+time_id);
416
  var png64dataURL = canvas.toDataURL(); //this is what saves the image. Do this after selection.
417
 
418
+ jQuery('#attachments-'+postID+'-kgflashmediaplayer-thumbnailboxoverlay').fadeTo(500, .25);
419
+ jQuery('#attachments-'+postID+'-thumbnailplaceholder input').attr('disabled', true);
420
+ jQuery('#attachments-'+postID+'-thumbnailplaceholder').prepend('<div class="kgvid_save_overlay">Saving...</div>')
421
+
422
  jQuery.ajax({
423
  type: "POST",
424
  url: ajaxurl,
425
+ data: { action:"kgvid_save_html5_thumb", security: kgflashmediaplayersecurity, raw_png: png64dataURL, url: video_url, offset: time_id, postID: postID, total: total, index: index }
 
426
  })
427
  .done( function(thumb_url) {
428
  if ( total == 1 ) {
429
+ document.getElementsByName('attachments['+postID+'][kgflashmediaplayer-autothumb-error]')[0].value = '';
430
  jQuery('#attachments-'+postID+'-kgflashmediaplayer-poster').val(thumb_url).change();
431
+ if ( pagenow == 'attachment' ) { jQuery('#publish').click(); }
432
  }
433
  else {
434
  kgvid_thumbnail_saveall_progress(postID, total);
435
  }
436
+ })
437
+ .fail( function(xhr, textStatus, errorThrown) {
438
+ document.getElementsByName('attachments['+postID+'][kgflashmediaplayer-autothumb-error]')[0].value = errorThrown;
439
+ jQuery('#attachments-'+postID+'-thumbnailplaceholder').empty();
440
+ jQuery('#attachments-'+postID+'-thumbnailplaceholder').html('<div class="kgvid_thumbnail_box kgvid_chosen_thumbnail_box">'+errorThrown+'</div>');
441
+ });
442
  }
443
 
444
  function kgvid_thumbnail_saveall_progress(postID, total) {
451
 
452
  if ( number == total ) {
453
  jQuery('#saveallthumbs-'+postID+'-div').slideUp(1000);
454
+ jQuery('#attachments-'+postID+'-thumbnailplaceholder .kgvid_save_overlay').fadeOut();
455
+ jQuery('#attachments-'+postID+'-kgflashmediaplayer-thumbnailboxoverlay').fadeTo(500, 1);
456
+ jQuery('#attachments-'+postID+'-thumbnailplaceholder input').removeAttr('disabled');
457
  }
458
 
459
  }
464
  var thumbnails = jQuery('#attachments-'+postID+'-kgflashmediaplayer-thumbnailbox').find('.kgvid_thumbnail');
465
  var total = thumbnails.length;
466
 
467
+ jQuery('#saveallthumbs-'+postID+'-div').append('<br><div style="margin:5px;" id="saving_thumbs_meter" class="kgvid_meter"><div class="kgvid_meter_bar" style="width:0%;"><div class="kgvid_meter_text"></div></div></div><span id="saving_thumbs_status"> '+kgvidL10n.saving+'</span>');
468
 
469
  jQuery.each(thumbnails, function(key, value) {
470
  if ( value.tagName.toLowerCase() == "canvas" ) {
507
  var video_aspect = video.videoHeight/video.videoWidth;
508
  var time_id = Math.round(video.currentTime);
509
  var time_display = kgvid_convert_to_timecode(video.currentTime);
510
+ document.getElementById('attachments-'+postID+'-kgflashmediaplayer-thumbtime').value = time_display;
511
  jQuery("#attachments-"+postID+"-thumbnailplaceholder").html('<div class="kgvid_thumbnail_box kgvid_chosen_thumbnail_box"><canvas style="height:'+Math.round(200*video_aspect)+'px;" id="'+postID+'_thumb_'+time_id+'"></canvas></div>');
512
  var canvas = document.getElementById(postID+'_thumb_'+time_id);
513
  canvas.width = video.videoWidth;
536
  page = "queue";
537
  }
538
 
539
+ var formats = new Array("fullres", "1080", "720", "mobile", "ogg", "webm", "vp9", "custom");
540
  var kgvid_encode = new Object();
541
  jQuery.each(formats, function(key,formats) {
542
  kgvid_encode[formats] = "";
587
  jQuery('#kgflashmediaplayer-table').data("kgvid_attachment_id", basename);
588
  jQuery('#attachments-'+oldbasename+'-kgflashmediaplayer-encodeboxes').attr('id', 'attachments-'+basename+'-kgflashmediaplayer-encodeboxes');
589
  document.getElementById('attachments-'+oldbasename+'-thumbnailplaceholder').id = 'attachments-'+basename+'-thumbnailplaceholder';
590
+ //document.getElementById('attachments-'+basename+'-thumbnailplaceholder').setAttribute("onchange", "document.getElementById('attachments-"+basename+"-kgflashmediaplayer-thumbtime').value='';");
591
+ document.getElementById('attachments-'+basename+'-kgflashmediaplayer-numberofthumbs').setAttribute("onchange", "document.getElementById('attachments-"+basename+"-kgflashmediaplayer-thumbtime').value='';");
592
  jQuery('#attachments-'+basename+'-thumbgenerate').replaceWith('<input disabled="disabled" type="button" id="attachments-'+basename+'-thumbgenerate" class="button-secondary" value="'+kgvidL10n.generate+'" name="thumbgenerate" onclick="kgvid_generate_thumb(\''+basename+'\', \'generate\');" >');
593
  jQuery('#attachments-'+basename+'-thumbrandomize').replaceWith('<input disabled="disabled" type="button" id="attachments-'+basename+'-thumbrandomize" class="button-secondary" value="'+kgvidL10n.randomize+'" name="thumbgenerate" onclick="kgvid_generate_thumb(\''+basename+'\', \'random\');" >');
594
  document.getElementById('attachments-'+basename+'-kgflashmediaplayer-width').setAttribute("onchange", "kgvid_set_dimension('"+basename+"', 'height', this.value);")
632
  extensionExists = true;
633
  jQuery.post(ajaxurl, { action:"kgvid_sanitize_url", security: kgflashmediaplayersecurity, movieurl: url }, function(data) {
634
  basename = data.singleurl_id;
635
+ if ( url != data.movieurl ) { document.getElementById('attachments-'+oldbasename+'-kgflashmediaplayer-url').value = data.movieurl; }
636
  url = data.movieurl;
637
  kgvid_change_singleurl(url, basename, oldbasename);
638
  jQuery('#attachments-'+basename+'-kgflashmediaplayer-encodeboxes').css('opacity', '0.5');
698
  shortcode += ' track_src="' + document.getElementById('attachments-'+basename+'-kgflashmediaplayer-track_src').value + '"';
699
  if (document.getElementById('attachments-'+basename+'-kgflashmediaplayer-track_srclang').value !="") { shortcode += ' track_srclang="' + document.getElementById('attachments-'+basename+'-kgflashmediaplayer-track_srclang').value + '"'; }
700
  if (document.getElementById('attachments-'+basename+'-kgflashmediaplayer-track_label').value !="") { shortcode += ' track_label="' + document.getElementById('attachments-'+basename+'-kgflashmediaplayer-track_label').value + '"'; }
701
+ if (document.getElementById('attachments-'+basename+'-kgflashmediaplayer-track_default').value == "default") { shortcode += ' track_default="default"'; }
702
  }
703
  if (document.getElementById('downloadlink').checked ) { shortcode += ' downloadlink="true"'; }
704
  shortcode += ']' + url + '[/KGVID] '; }
767
 
768
  }
769
 
770
+ function kgvid_update_encode_queue() {
771
+
772
+ if ( pagenow == 'tools_page_kgvid_video_encoding_queue' || pagenow == 'settings_page_kgvid_network_video_encoding_queue-network' ) {
773
+ var page = 'queue';
774
+ var kgflashmediaplayersecurity = document.getElementsByName('attachments[kgflashmediaplayer-security]')[0].value;
775
+ }
776
+ else {
777
+ var page = 'attachment';
778
+ var checkboxes_id = jQuery('.kgvid_checkboxes_section').first().attr('id');
779
+ if ( checkboxes_id ) {
780
+ var post_id = checkboxes_id.match("attachments-(.*)-kgflashmediaplayer-encodeboxes");
781
+ post_id = post_id[1];
782
+ var kgflashmediaplayersecurity = document.getElementsByName('attachments['+post_id+'][kgflashmediaplayer-security]')[0].value;
783
+ }
784
+ }
785
+
786
+ if ( page == 'queue') { var container_element = jQuery('#kgvid_encode_queue_table'); }
787
+ else { var container_element = jQuery('#attachments-'+post_id+'-kgflashmediaplayer-encodeboxes'); }
788
+ var encode_queue_timeouts = container_element.data('encode_queue_timeouts');
789
+ for( key in encode_queue_timeouts ){ clearTimeout(encode_queue_timeouts[key]); }
790
+ container_element.removeData('encode_queue_timeouts');
791
+
792
+ if ( kgflashmediaplayersecurity ) { //sometimes this tries to run after the media modal is closed
793
+
794
+ jQuery.post(ajaxurl, { action:"kgvid_update_encode_queue", security: kgflashmediaplayersecurity, page: page }, function(data) {
795
+
796
+ var check_again = false;
797
+ var queued = false;
798
+ var time_to_wait = 5000;
799
+
800
+ jQuery.each(data.queue, function(video_key, video_entry) {
801
+
802
+ if ( page != "queue" && jQuery('#attachments-'+video_entry.attachmentID+'-kgflashmediaplayer-encodeboxes').length == 0 ) { return true; }
803
+
804
+ if ( video_entry.hasOwnProperty('encode_formats') ) {
805
+
806
+ var currently_encoding = false;
807
+
808
+ jQuery.each(video_entry.encode_formats, function(format, format_entry) {
809
+
810
+ if ( format_entry.status == 'encoding' ) {
811
+
812
+ currently_encoding = true;
813
+ check_again = true;
814
+
815
+ if ( page == "queue" ) {
816
+
817
+ if ( jQuery('#clear_'+video_entry.attachmentID).css("display") != "none" ) {
818
+ jQuery('#clear_'+video_entry.attachmentID).css("display", "none");
819
+ }
820
+ if ( !jQuery('#tr_'+video_entry.attachmentID).hasClass('currently_encoding') ) {
821
+ jQuery('#tr_'+video_entry.attachmentID).addClass('currently_encoding');
822
+ }
823
+ if ( jQuery('#tr_'+video_entry.attachmentID).hasClass('kgvid_complete') ) {
824
+ jQuery('#tr_'+video_entry.attachmentID).removeClass('kgvid_complete');
825
+ }
826
+
827
+ }
828
+
829
+ }
830
+
831
+ if ( format_entry.status == 'queued' ) {
832
+ queued = true;
833
+ }
834
+
835
+ if ( format_entry.hasOwnProperty('meta_array') ) {
836
+
837
+ var meta_entry = jQuery('#attachments-'+video_entry.attachmentID+'-kgflashmediaplayer-meta'+format);
838
+ var checkbox = jQuery('#attachments-'+video_entry.attachmentID+'-kgflashmediaplayer-encode'+format);
839
+
840
+ if ( format_entry.status == 'encoding') { time_to_wait = format_entry.meta_array.time_to_wait; }
841
+
842
+ if ( meta_entry.html() != undefined && format_entry.meta_array.meta != meta_entry.html() ) {
843
+ check_again = true;
844
+ meta_entry.empty();
845
+ meta_entry.html(format_entry.meta_array.meta);
846
+ }
847
+
848
+ if ( format_entry.meta_array.checked != '' ) {
849
+ checkbox.attr('checked', true);
850
+ }
851
+ else if ( format_entry.status == 'Encoding Complete' ) { checkbox.removeAttr('checked'); }
852
+
853
+ if ( format_entry.meta_array.disabled != '' ) {
854
+ checkbox.attr('disabled', true);
855
+ }
856
+ else { checkbox.removeAttr('disabled'); }
857
+
858
+ }
859
+
860
+ }); //end loop through encode formats
861
+
862
+ }
863
+
864
+ if ( page == 'queue' && currently_encoding == false ) {
865
+
866
+ if ( queued == false ) { jQuery('#tr_'+video_entry.attachmentID).addClass('kgvid_complete'); }
867
+
868
+ if ( jQuery('#tr_'+video_entry.attachmentID).hasClass('currently_encoding') ) {
869
+ jQuery('#tr_'+video_entry.attachmentID).removeClass('currently_encoding');
870
+ }
871
+ if ( jQuery('#tr_'+video_entry.attachmentID+' #clear_'+video_entry.attachmentID).css("display") != "block" ) {
872
+ jQuery('#tr_'+video_entry.attachmentID+' #clear_'+video_entry.attachmentID).css("display", "block");
873
+ }
874
+
875
+ }
876
+
877
+ }); //end loop through queue
878
+
879
+ if ( check_again == true ) {
880
+ var encode_queue_timeouts = container_element.data('encode_queue_timeouts');
881
+ if ( encode_queue_timeouts == null ) { encode_queue_timeouts = new Array(); }
882
+ encode_queue_timeout = setTimeout(function(){ kgvid_update_encode_queue() }, time_to_wait);
883
+ encode_queue_timeouts.push(encode_queue_timeout);
884
+ container_element.data('encode_queue_timeouts', encode_queue_timeouts);
885
+ }
886
+
887
+ }, "json" );
888
+
889
+ }
890
+
891
+ }
892
+
893
  function kgvid_redraw_encode_checkboxes(movieurl, postID, page, blogID) {
894
 
895
  var kgflashmediaplayersecurity = jQuery('#attachments-'+postID+'-kgflashmediaplayer-security').val();
907
  JSON.stringify(kgvid_encode);
908
 
909
  jQuery.post(ajaxurl, { action:"kgvid_generate_encode_checkboxes", security: kgflashmediaplayersecurity, movieurl: movieurl, post_id: postID, page: page, blog_id: blogID, encodeformats: kgvid_encode }, function(data) {
910
+ jQuery('#attachments-'+postID+'-kgflashmediaplayer-encodeboxes').empty();
911
+ jQuery('#attachments-'+postID+'-kgflashmediaplayer-encodeboxes').append(data.checkboxes);
912
+ if ( page == "queue" ) {
913
+ jQuery('#tr_'+postID+'.currently_encoding').removeClass('currently_encoding');
914
+ jQuery('#tr_'+postID+' #clear_'+postID).css("display", "block");
915
+ if ( data.encoding == true ) {
916
+ jQuery('#clear_'+postID).css("display", "none");
917
+ jQuery('#tr_'+postID).addClass('currently_encoding');
 
918
  }
919
+
920
+ }
921
+
922
+ setTimeout( function(){ kgvid_update_encode_queue() }, 3000 ); //start the loop
923
+
924
+ jQuery('#attachments-'+postID+'-kgflashmediaplayer-encodeboxes').removeAttr('style');
925
  }, "json" );
926
  }
927
  }
944
  .css('height', '100%')
945
  .css('padding-top', '0');
946
  }
947
+ jQuery('#attachments-'+postID+'-kgflashmediaplayer-poster').change();
948
  }
949
  else if ( data.thumb_error ) { jQuery('#attachments-'+postID+'-thumbnailplaceholder').html('<div class="kgvid_thumbnail_box kgvid_chosen_thumbnail_box"><span>'+data.thumb_error+'</span></div>'); }
950
  else { setTimeout(function(){ kgvid_redraw_thumbnail_box(postID) }, 5000); }
973
 
974
  if ( action == "clear_completed" ) {
975
  jQuery('tbody > .kgvid_complete').fadeTo('slow', 0.5);
976
+ jQuery.post(ajaxurl, { action:"kgvid_clear_completed_queue", security: kgflashmediaplayersecurity, type:"manual", scope: scope }, function(data) {
977
  jQuery('table.widefat > tbody').replaceWith("<tbody class='rows'>"+data+"</tbody>");
978
  }, "html" );
979
  }
980
 
981
+ if ( action == "clear_queued" ) {
982
+
983
+ var clear_for_sure = confirm(kgvidL10n.clearqueuedwarning+"\n"+kgvidL10n.cancel_ok);
984
+
985
+ if ( clear_for_sure == true ) {
986
+ jQuery('tbody > .kgvid_queued').fadeTo('slow', 0.5);
987
+ jQuery.post(ajaxurl, { action:"kgvid_clear_completed_queue", security: kgflashmediaplayersecurity, type:"queued", scope: scope }, function(data) {
988
+ jQuery('table.widefat > tbody').replaceWith("<tbody class='rows'>"+data+"</tbody>");
989
+ }, "html" );
990
+ }
991
+
992
+ }
993
+
994
  }
995
 
996
  function kgvid_save_plugin_settings(input_obj) {
1089
 
1090
  var overlay_embedcode = jQuery("#overlay_embedcode");
1091
  var open_graph = jQuery("#open_graph");
1092
+ var oembed_provider = jQuery("#oembed_provider");
1093
 
1094
  if (checked == false) {
1095
  overlay_embedcode[0].checked=false;
1098
  open_graph[0].checked=false;
1099
  open_graph[0].disabled=true;
1100
  open_graph.change();
1101
+ oembed_provider[0].checked=false;
1102
+ oembed_provider[0].disabled=true;
1103
  }
1104
  else {
1105
  overlay_embedcode[0].disabled=false;
1106
  open_graph[0].disabled=false;
1107
+ oembed_provider[0].disabled=false;
1108
  }
1109
  }
1110
 
1240
 
1241
  }
1242
 
1243
+ function kgvid_hide_watermark_url(obj) {
1244
+
1245
+ if ( obj.value == 'custom' ) {
1246
+ jQuery('#watermark_url').fadeIn().removeAttr('style');
1247
+ }
1248
+ else {
1249
+ jQuery('#watermark_url').fadeOut();
1250
+ if ( jQuery('#watermark_url').val() != '' ) { jQuery('#watermark_url').val('').change(); }
1251
+ }
1252
+
1253
+ }
1254
+
1255
+ function kgvid_hide_paginate_gallery_setting(obj) {
1256
+
1257
+ if ( obj.checked ) {
1258
+ jQuery('#gallery_per_page').val('9');
1259
+ jQuery('#gallery_per_page_span').fadeIn().removeAttr('style');
1260
+ }
1261
+ else {
1262
+ jQuery('#gallery_per_page_span').fadeOut();
1263
+ jQuery('#gallery_per_page').val('');
1264
+ }
1265
+
1266
+ }
1267
+
1268
  function kgvid_set_bitrate_display() {
1269
 
1270
  var resolutions = [1080, 720, 360];
1338
 
1339
  }, "text" );
1340
 
 
 
 
 
 
 
 
 
1341
  }
1342
 
1343
  function kgvid_check_cms_progress(total, cms_type) {
1367
  // Build the choose from library frame.
1368
 
1369
  var $el = jQuery(button);
1370
+ if ( typeof event !== 'undefined' ) { event.preventDefault(); }
1371
 
1372
  // If the media frame already exists, reopen it.
1373
  if ( frame ) {
1416
  // Build the choose from library frame.
1417
 
1418
  var $el = jQuery(button);
1419
+ if ( typeof event !== 'undefined' ) { event.preventDefault(); }
1420
 
1421
  // If the media frame already exists, reopen it.
1422
  if ( frame ) {
1459
  // Build the choose from library frame.
1460
 
1461
  var $el = jQuery(button);
1462
+ if ( typeof event !== 'undefined' ) { event.preventDefault(); }
1463
 
1464
  // If the media frame already exists, reopen it.
1465
  if ( frame ) {
1526
  var tracks = jQuery('#kgflashmediaplayer-'+id+'-trackdiv');
1527
  track_number = tracks.children().length;
1528
  track_label = track_number+1;
1529
+ tracks.append('<div id="kgflashmediaplayer-'+id+'-trackdiv-'+track_number+'" class="kgvid_thumbnail_box kgvid_track_box"><strong>Track '+track_label+'</strong><span class="kgvid_track_box_removeable">X</span><br />'+kgvidL10n.tracktype+' <select name="attachments['+id+'][kgflashmediaplayer-track]['+track_number+'][kind]" id="attachments-'+id+'-kgflashmediaplayer-track_'+track_number+'_kind]"><option value="subtitles">'+kgvidL10n.subtitles+'</option><option value="captions">'+kgvidL10n.captions+'</option><option value="chapters">'+kgvidL10n.chapters+'</option></select><br /><span id="pick-track'+track_number+'" class="button-secondary" style="margin:10px 0;" data-choose="'+kgvidL10n.choosetextfile+'" data-update="'+kgvidL10n.settracksource+'" data-change="attachments-'+id+'-kgflashmediaplayer-track_'+track_number+'_src" onclick="kgvid_pick_attachment(this);">'+kgvidL10n.choosefromlibrary+'</span><br />URL: <input name="attachments['+id+'][kgflashmediaplayer-track]['+track_number+'][src]" id="attachments-'+id+'-kgflashmediaplayer-track_'+track_number+'_src" type="text" value="" class="text" style="width:180px;"><br />'+kgvidL10n.languagecode+' <input name="attachments['+id+'][kgflashmediaplayer-track]['+track_number+'][srclang]" id="attachments-'+id+'-kgflashmediaplayer-track_'+track_number+'_srclang" type="text" value="" maxlength="2" style="width:40px;"><br />'+kgvidL10n.label+' <input name="attachments['+id+'][kgflashmediaplayer-track]['+track_number+'][label]" id="attachments-'+id+'-kgflashmediaplayer-track_'+track_number+'_label" type="text" value="" class="text" style="width:172px;"><br />'+kgvidL10n.trackdefault+' <input name="attachments['+id+'][kgflashmediaplayer-track]['+track_number+'][default]" id="attachments-'+id+'-kgflashmediaplayer-track_'+track_number+'_default" type="checkbox" value="default"></div>');
1530
  jQuery('.kgvid_track_box_removeable').click(function() { jQuery(this).parent().remove(); jQuery('form.compat-item input').first().change(); });
1531
  }
languages/video-embed-thumbnail-generator-es_ES.mo CHANGED
Binary file
languages/video-embed-thumbnail-generator-es_ES.po CHANGED
@@ -2,109 +2,107 @@
2
  # This file is distributed under the same license as the Video Embed & Thumbnail Generator package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Video Embed & Thumbnail Generator 4.3.2\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/tag/video-embed-thumbnail-"
7
- "generator\n"
8
- "POT-Creation-Date: 2014-10-31 12:34-0000\n"
9
- "PO-Revision-Date: 2014-10-31 12:35-0000\n"
10
  "Last-Translator: Agustin Luis Estevez <aluiest@gmail.com>\n"
11
- "Language-Team: aluiest@gmail.com <LL@li.org>\n"
12
  "Language: es_ES\n"
13
  "MIME-Version: 1.0\n"
14
  "Content-Type: text/plain; charset=UTF-8\n"
15
  "Content-Transfer-Encoding: 8bit\n"
16
- "X-Generator: Poedit 1.6.10\n"
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
  "X-Poedit-SourceCharset: UTF-8\n"
19
- "X-Poedit-KeywordsList: __;_x;_n:1,2;_n_noop:1,2;_nc;_nx:1,2;_nx_noop:1,2\n"
20
- "X-Poedit-Basepath: .\n"
21
- "X-Poedit-SearchPath-0: d:\\Users\\aluiest\\Desktop\\video-embed-thumbnail-"
22
- "generator\n"
 
23
 
24
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:232
25
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3262
26
  msgid "same resolution H.264"
27
  msgstr "H.264 de la misma resolución"
28
 
29
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:347
30
  #, php-format
31
  msgid "Replace original with %s"
32
  msgstr "Reemplazar el original con %s"
33
 
34
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:454
35
  msgid "Settings"
36
  msgstr "Configuración"
37
 
38
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:462
39
  msgid "Network Settings"
40
  msgstr "Configuración de red"
41
 
42
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1319
 
43
  msgid "Wait"
44
  msgstr "Espere"
45
 
46
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1320
47
  msgid "Hide video..."
48
  msgstr "Ocultar vídeo ..."
49
 
50
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1321
51
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4222
52
  msgid "Choose from video..."
53
  msgstr "Elija vídeo ..."
54
 
55
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1322
56
  msgid "Can't load video"
57
  msgstr "No se puede cargar el vídeo"
58
 
59
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1323
60
  msgid "Choose Thumbnail:"
61
  msgstr "Elija miniatura:"
62
 
63
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1324
64
  msgid "Save All Thumbnails"
65
  msgstr "Guarde todas las miniaturas"
66
 
67
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1325
68
  msgid "Saving..."
69
  msgstr "Guardando..."
70
 
71
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1326
72
  msgid "Loading..."
73
  msgstr "Cargando…"
74
 
75
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1327
76
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4239
77
  msgid "Generate"
78
  msgstr "Generar"
79
 
80
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1328
81
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4240
82
  msgid "Randomize"
83
  msgstr "Aleatorizar"
84
 
85
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1329
86
  #, php-format
87
  msgid "%s not found"
88
  msgstr "%s no encontrado"
89
 
90
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1330
91
  msgid ""
92
- "Please enter a URL that points to a valid video file. Video sharing sites "
93
- "are not supported by this plugin.\n"
94
- "To embed from YouTube, Vimeo, etc, just paste the link directly into the "
95
- "post window and WordPress will handle the rest."
96
- msgstr ""
97
- "Por favor introduzca una URL que apunte a un archivo de vídeo válido. Sitios "
98
- "de intercambio de video no son compatibles con este plugin. \n"
99
- "Para incrustar desde YouTube, Vimeo, etc., basta con pegar el enlace "
100
- "directamente en la ventana del mensaje y WordPress se encargará del resto."
101
-
102
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1331
103
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2201
 
104
  msgid "Please enter a valid video URL"
105
  msgstr "Introduce una URL de vídeo válida"
106
 
107
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1332
108
  msgid ""
109
  "You are about to permanently delete the encoded video.\n"
110
  " 'Cancel' to stop, 'OK' to delete."
@@ -112,1917 +110,2269 @@ msgstr ""
112
  "Vas a eliminar permanentemente el video codificado. \n"
113
  " \"Cancelar\" para detener, 'OK' para borrar."
114
 
115
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1333
116
  msgid "Saved."
117
  msgstr "Guardado."
118
 
119
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1334
120
  msgid "Running test..."
121
  msgstr "Ejecutando la prueba ..."
122
 
123
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1335
124
  msgid "FFMPEG or LIBAV required for these functions."
125
  msgstr "FFMPEG o LIBAV requerido para estas funciones."
126
 
127
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1336
128
  msgid ""
129
- "You are about to set all existing video thumbnails previously generated by "
130
- "this plugin as the featured images for their posts. There is no 'undo' "
131
- "button, so proceed at your own risk."
132
  msgstr ""
133
- "Usted está a punto de establecer todas las miniaturas de vídeo existentes "
134
- "previamente generados por este plugin como las imágenes destacadas para sus "
135
- "puestos. No hay botón de \"deshacer\", así que proceda a su propio riesgo."
136
 
137
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1337
138
  msgid ""
139
- "You are about to create thumbnails for every video in your Media Library "
140
- "that doesn't already have one. This might take a long time. There is no "
141
- "'undo' button, so proceed at your own risk.\n"
142
  "\n"
143
  "Number of videos without thumbnails: "
144
  msgstr ""
145
- "Usted está a punto de crear miniaturas para cada vídeo en su Librería de "
146
- "Medios que no tenga una previamente. Esto puede tardar bastante. No ha hay "
147
- "botón de deshacer, por tanto ejecútelo bajo su responsabilidad.\n"
148
  "\n"
149
  "Número de vídeos sin miniatura:"
150
 
151
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1338
152
  msgid ""
153
- "You are about to add every video in your Media Library to the video encode "
154
- "queue if it hasn't already been encoded. This might take a long time."
155
  msgstr ""
156
- "Estás a punto de añadir cada video de tu Librería de Medios en la cola de "
157
- "codificación de video si todavía no han sido codificados. Esto puede tardar "
158
- "bastante tiempo."
159
 
160
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1339
161
  msgid "No thumbnails generated. All videos have thumbnails already."
162
- msgstr ""
163
- "No se ha generado ninguna miniatura. Todos los vídeo ya tiene miniatura."
164
 
165
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1340
166
  msgid "'Cancel' to stop, 'OK' to proceed."
167
  msgstr "\"Cancelar\" para detener, en 'Aceptar' para continuar."
168
 
169
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1341
170
  msgid "Processing..."
171
  msgstr "Processing ..."
172
 
173
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1342
174
  msgid ""
175
- "You are about to set all existing video thumbnails previously generated by "
176
- "this plugin as attachments of their posts rather than their associated "
177
- "videos. Proceed at your own risk."
178
  msgstr ""
179
- "Usted está a punto de establecer todas las miniaturas de vídeo existentes "
180
- "previamente generados por este plugin como archivos adjuntos de sus mensajes "
181
- "en lugar de sus vídeos asociados. Proceda a su propio riesgo."
182
 
183
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1343
184
  msgid ""
185
- "You are about to set all existing video thumbnails previously generated by "
186
- "this plugin as attachments of their videos rather than their associated "
187
- "posts. Proceed at your own risk."
188
  msgstr ""
189
- "Usted está a punto de establecer todas las miniaturas de vídeo existentes "
190
- "previamente generados por este plugin como archivos adjuntos de sus videos "
191
- "en lugar de sus mensajes asociados. Proceda a su propio riesgopista:."
192
 
193
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1344
194
  msgid "Complete"
195
  msgstr "Completo"
196
 
197
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1345
198
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4294
199
  msgid "Track type:"
200
  msgstr "Tipo de Rastreo:"
201
 
202
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1346
203
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4285
204
  msgid "subtitles"
205
  msgstr "Subtítulos"
206
 
207
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1347
208
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4285
209
  msgid "captions"
210
  msgstr "Subtítulos"
211
 
212
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1348
213
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4285
214
  msgid "chapters"
215
  msgstr "Capítulos"
216
 
217
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1349
218
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4295
219
  msgid "Choose a Text File"
220
  msgstr "Elija un archivo de texto"
221
 
222
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1350
223
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4295
224
  msgid "Set as track source"
225
  msgstr "Establecer como fuente de rastreo"
226
 
227
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1351
228
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2340
229
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2940
230
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2946
231
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2952
232
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3352
233
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4254
234
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4295
235
  msgid "Choose from Library"
236
  msgstr "Elija desde Biblioteca"
237
 
238
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1352
239
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4297
240
  msgid "Language code:"
241
  msgstr "Código Idioma:"
242
 
243
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1353
244
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4298
245
  msgid "Label:"
246
  msgstr "Etiqueta:"
247
 
248
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1354
249
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3263
250
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3532
 
 
 
 
251
  msgid "Custom"
252
  msgstr "Personalizado"
253
 
254
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1885
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  #, php-format
256
  msgid "%s view"
257
  msgid_plural "%s views"
258
  msgstr[0] "%s reproducción"
259
  msgstr[1] "%s reproducciones"
260
 
261
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1895
262
  msgid "Click on this link to download"
263
  msgstr "Pulse en este enlace para descargar"
264
 
265
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1898
266
  msgid "Right-click or ctrl-click on this link to download"
267
  msgstr "Haga clic derecho o ctrl-clic en este enlace para descargar"
268
 
269
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1914
 
270
  msgid "Embed:"
271
- msgstr "Incrustar:"
272
-
273
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1959
274
- msgid "Play Start"
275
- msgstr "Iniciar reproducción"
276
-
277
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1960
278
- msgid "Complete View"
279
- msgstr "Vista completa"
280
-
281
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1961
282
- msgid "Next"
283
- msgstr "Siguiente"
284
 
285
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:1962
286
- msgid "Previous"
287
- msgstr "Anterior"
288
-
289
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2209
290
- #, php-format
291
- msgid "%1$s not found at %2$s"
292
- msgstr "%1$s no encontrado en %2$s"
293
-
294
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2299
295
  msgid "Clear Format"
296
  msgstr "Borrar Formato"
297
 
298
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2302
299
  msgid "Delete Permanently"
300
  msgstr "Eliminar permanentemente"
301
 
302
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2320
303
  msgid "Currently encoding"
304
  msgstr "Codificando Actualmente"
305
 
306
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2327
307
  msgid "Format already exists"
308
  msgstr "Formato ya existe"
309
 
310
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2334
311
  msgid "You don't have permission to encode videos"
312
  msgstr "Usted no tiene permiso para codificar vídeos"
313
 
314
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2340
 
 
 
 
 
 
315
  #, php-format
316
  msgid "Choose %s"
317
  msgstr "Elija %s"
318
 
319
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2340
320
  #, php-format
321
  msgid "Set as %s"
322
  msgstr "Establecer como %s"
323
 
324
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2349
325
  msgid "Nothing to encode"
326
  msgstr "Nada para codificar"
327
 
328
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2353
 
329
  msgid "Update"
330
  msgstr "Actualizar"
331
 
332
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2356
 
333
  msgid "Encode selected"
334
- msgstr "Codificar los seleccionados"
335
 
336
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2362
337
- msgid ""
338
- "Generates additional video formats compatible with most mobile & HTML5-"
339
- "compatible browsers"
340
  msgstr ""
341
- "Genera formatos de vídeo adicionales compatibles con los navegadores más "
342
- "móviles y compatibles con HTML5"
343
 
344
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2386
 
345
  msgid "Order"
346
  msgstr "Orden"
347
 
348
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2387
 
349
  msgid "User"
350
  msgstr "Usuario"
351
 
352
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2388
 
353
  msgid "Thumbnail"
354
  msgstr "Miniatura"
355
 
356
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2389
 
357
  msgid "File"
358
  msgstr "Archivo"
359
 
360
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2390
 
361
  msgid "Formats"
362
  msgstr "Formatos"
363
 
364
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2391
 
365
  msgid "Actions"
366
  msgstr "Acciones"
367
 
368
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2395
 
369
  msgid "Site"
370
  msgstr "Sitio"
371
 
372
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2514
373
  msgid "Other user's video"
374
  msgstr "Vídeo de otro usuario"
375
 
376
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2521
377
  msgid "Queue is empty"
378
- msgstr "Cola está vacía"
379
 
380
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2530
381
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2537
382
  msgid "Video Embed & Thumbnail Generator Encoding Queue"
383
- msgstr "Cola para codificación de generador de miniaturas y video incrustado"
384
 
385
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2530
 
386
  msgid "Video Encode Queue"
387
- msgstr "Cola para codificación de video"
388
 
389
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2537
 
390
  msgid "Network Video Encode Queue"
391
- msgstr "Cola para codificación de video en red"
392
 
393
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2564
 
 
 
 
394
  msgid "Clear All Completed"
395
  msgstr "Borrar Todo lo Completado"
396
 
397
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2572
398
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2688
399
  msgid "Video Embed & Thumbnail Generator"
400
- msgstr "Video Embed & Thumbnail Generator "
401
 
402
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2608
403
- msgid ""
404
- "Video Embed & Thumbnail Generator network settings reset to default values."
405
- msgstr ""
406
- "Ajustes de red de Video Embed & Thumbnail Generator restablecidas a valores "
407
- "por defecto."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
408
 
409
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2659
410
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2715
 
 
 
411
  msgid "Save Changes"
412
  msgstr "Guardar cambios"
413
 
414
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2660
415
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2716
416
  msgid "Reset Options"
417
  msgstr "Resetear opciones"
418
 
419
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2683
 
 
 
 
 
 
 
 
420
  #, php-format
 
421
  msgid "%s settings tab."
422
  msgstr "%s pestaña de configuración."
423
 
424
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2707
 
 
 
 
 
425
  #, php-format
 
426
  msgid "%s Settings"
427
- msgstr "Configuración %s"
428
 
429
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2807
430
  msgid "Default Video Playback Settings"
431
  msgstr "Configuración predeterminada de reproducción de vídeo"
432
 
433
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2808
434
  msgid "The following options will only affect Flash playback"
435
  msgstr "Las siguientes opciones sólo afectarán Reproducción de Flash"
436
 
437
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2809
438
  msgid "Plugin Settings"
439
  msgstr "Configuración Plugin"
440
 
441
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2810
442
  msgid "Video Encoding Settings"
443
  msgstr "Configuración de codificación de Vídeo"
444
 
445
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2812
446
  msgid "Default thumbnail:"
447
  msgstr "Miniaturas por defecto:"
448
 
449
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2813
450
  msgid "End of video image:"
451
  msgstr "Imagen de vídeo final:"
452
 
453
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2814
454
  msgid "Watermark overlay:"
455
  msgstr "Superposición de Marca de Agua"
456
 
457
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2815
458
  msgid "Video alignment:"
459
  msgstr "Alineación del vídeo:"
460
 
461
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2816
462
- msgid "Automatically resize videos:"
463
- msgstr "Cambio de tamaño automático vídeos:"
464
 
465
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2817
466
  msgid "Inline videos:"
467
  msgstr "Vídeos Inline:"
468
 
469
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2818
470
  msgid "Max embedded video dimensions:"
471
- msgstr "Número máximo de dimensiones de vídeo incorporado:"
472
-
473
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2819
474
- msgid "Max gallery video dimensions:"
475
- msgstr "Dimensiones máximas de galería de vídeo:"
476
 
477
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2820
478
- msgid "Gallery thumbnail width:"
479
- msgstr "Ancho Galería de miniaturas:"
480
 
481
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2821
482
- msgid "Gallery playback end action:"
483
- msgstr "Acción final de la reproducción de la Galería:"
484
-
485
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2822
486
  msgid "Video controls:"
487
  msgstr "Controles de vídeo:"
488
 
489
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2823
490
  msgid "Autoplay:"
491
  msgstr "Reproducción automática:"
492
 
493
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2824
 
494
  msgid "Loop:"
495
- msgstr "Repetir:"
496
 
497
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2825
498
  msgid "Volume:"
499
  msgstr "Volumen:"
500
 
501
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2826
502
  msgid "Preload:"
503
  msgstr "Precarga:"
504
 
505
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2827
 
506
  msgid "Skin class:"
507
- msgstr "Clase de la máscara:"
508
 
509
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2828
510
  msgid "Custom attributes:"
511
  msgstr "Atributos personalizados:"
512
 
513
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2830
514
  msgid "Background color:"
515
  msgstr "Color de fondo:"
516
 
517
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2831
518
  msgid "XML configuration file:"
519
  msgstr "Archivo de configuración XML:"
520
 
521
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2832
522
  msgid "Video skin file:"
523
  msgstr "Archivo de máscara de vídeo:"
524
 
525
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2833
526
  msgid "Video stream type:"
527
  msgstr "Tipo de stream de video:"
528
 
529
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2834
530
  msgid "Video scale mode:"
531
  msgstr "Modo de escala de vídeo:"
532
 
533
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2835
534
  msgid "Autohide:"
535
  msgstr "Ocultar automáticamente:"
536
 
537
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2836
538
  msgid "Play button overlay:"
539
  msgstr "Superposición del Botón de reproducción:"
540
 
541
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2838
542
  msgid "Default number of thumbnails to generate:"
543
  msgstr "Número predeterminado de miniaturas para generar:"
544
 
545
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2839
546
  msgid "User capabilities:"
547
  msgstr "Capacidades de los usuarios:"
548
 
549
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2840
550
  msgid "Video security:"
551
  msgstr "Seguridad del vídeo:"
552
 
553
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2841
554
  msgid "Featured image:"
555
  msgstr "Imagen destacada:"
556
 
557
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2842
558
  msgid "Attach thumbnails to:"
559
  msgstr "Adjuntar miniaturas a:"
560
 
561
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2843
562
  msgid "Delete associated attachments:"
563
  msgstr "Eliminar archivos adjuntos asociados:"
564
 
565
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2844
566
  msgid "Video title text HTML formatting:"
567
  msgstr "Formato HTML del texto de título de vídeo:"
568
 
569
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2845
570
  msgid "Attachment page design:"
571
  msgstr "Visualización de la plantilla adjuntos:"
572
 
573
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2848
574
  msgid "Path to applications folder on server:"
575
  msgstr "Ruta a la carpeta de aplicaciones en el servidor:"
576
 
577
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2849
578
- msgid "Application for thumbnails & encoding:"
579
- msgstr "Aplicación para miniaturas y codificación:"
580
-
581
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2852
582
  msgid "Enable in-browser thumbnails:"
583
  msgstr "Activar miniaturas en el navegador:"
584
 
585
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2853
586
  msgid "Default video encode formats:"
587
  msgstr "Formatos de codificación de vídeo por defecto:"
588
 
589
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2854
590
  msgid "Do automatically on upload:"
591
  msgstr "Realice automáticamente al cargar:"
592
 
593
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2855
594
  msgid "For previously uploaded videos:"
595
  msgstr "Para vídeos subidos anteriormente:"
596
 
597
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2856
598
  msgid "htaccess login:"
599
  msgstr "Inicio de sesión htaccess:"
600
 
601
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2857
602
  msgid "Add watermark to encoded files:"
603
  msgstr "Añadir marca de agua a los archivos codificados:"
604
 
605
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2859
606
- msgid "Method to fix encoded H.264 headers for streaming:"
607
- msgstr ""
608
- "Método para corregir encabezados H.264 codificados para la transmisión:"
609
-
610
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2861
611
  msgid "Encode quality control method:"
612
  msgstr "Método de control de calidad de codificación:"
613
 
614
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2862
615
  msgid "Constant Rate Factors (CRF):"
616
  msgstr "Factores constantes de tasa (CRF):"
617
 
618
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2863
619
  msgid "Average Bit Rate:"
620
  msgstr "Tasa de bits promedio:"
621
 
622
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2864
623
  msgid "H.264 profile:"
624
  msgstr "perfil H.264:"
625
 
626
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2865
627
  msgid "Audio bit rate:"
628
  msgstr "Tasa de bits de audio:"
629
 
630
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2868
631
- msgid "FFMPEG legacy options:"
632
- msgstr "Opciones adicionales FFMPEG:"
633
-
634
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2869
635
  msgid "Execution:"
636
  msgstr "Ejecución:"
637
 
638
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2872
639
  msgid "Test FFMPEG:"
640
  msgstr "Prueba FFMPEG:"
641
 
642
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2894
643
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4315
644
  msgid "WordPress Default"
645
  msgstr "WordPress por defecto"
646
 
647
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2916
648
  msgid "(deprecated)"
649
  msgstr "( desuso)"
650
 
651
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2918
652
  msgid "Video player:"
653
  msgstr "Reproductor de vídeo:"
654
 
655
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2923
656
  msgid ""
657
- "Video.js is the default player. Users running WordPress 3.6 or higher can "
658
- "choose the WordPress Default Mediaelement.js player which may already be "
659
- "skinned to match your theme. If the JW Player WordPress plugin is active it "
660
- "should be available as a video player. In the past this plugin used Adobe's "
661
- "Strobe Media Playback Flash player, which hasn't been updated since 2011 and "
662
- "is not recommended. It should still work, but new plugin functions are not "
663
- "guaranteed to be compatible."
664
- msgstr ""
665
- "Video.js es el reproductor predeterminado. Los usuarios que ejecutan "
666
- "WordPress 3.6 o superior pueden elegir el reproductor Mediaelement.js "
667
- "WordPress por defecto que puede ya tener una piel para que coincida con su "
668
- "tema. Si el plugin JW Player WordPress está activo debe estar disponible "
669
- "como un reproductor de vídeo. En el pasado este plugin utilizaba el "
670
- "reproductor Adobe's Strobe Media Playback Flash, que no ha sido actualizado "
671
- "desde 2011 y no se recomienda. Aún debería funcionar, pero las nuevas "
672
- "funciones del plugin no se garantiza que sea compatible."
673
-
674
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2927
675
  msgid "Overlay video title"
676
- msgstr "Título de vídeo de cubierta"
677
 
678
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2928
679
  msgid "Overlay embed code"
680
- msgstr "Código de inserción de cubierta"
681
 
682
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2931
683
  msgid "Show download link"
684
  msgstr "Mostrar enlace de descarga"
685
 
686
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2932
687
  msgid "Show view count"
688
- msgstr "Mostrar contador de vistas"
689
 
690
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2940
691
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4254
692
  msgid "Choose a Thumbnail"
693
  msgstr "Elija una miniatura"
694
 
695
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2940
696
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4254
697
  msgid "Set as video thumbnail"
698
  msgstr "Establecer como miniatura de vídeo"
699
 
700
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2945
701
  msgid "Display thumbnail image again when video ends."
702
  msgstr "Mostrar la miniatura de nuevo cuando el vídeo termina."
703
 
704
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2946
705
  msgid "Choose End of Video Image"
706
  msgstr "Elija imagen de fin de vídeo"
707
 
708
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2946
709
  msgid "Set as end of video image"
710
  msgstr "Establecer como miniatura de vídeo"
711
 
712
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2947
713
  msgid "Display alternate image when video ends."
714
  msgstr "Mostrar la miniatura de nuevo cuando el vídeo termina."
715
 
716
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2952
717
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3352
 
 
 
718
  msgid "Choose a Watermark"
719
  msgstr "elegir una Marca de Agua"
720
 
721
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2952
722
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3352
723
  msgid "Set as watermark"
724
  msgstr "conjuntocomo marca de agua"
725
 
726
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2957
727
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3354
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
728
  msgid "left"
729
  msgstr "izquierda"
730
 
731
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2957
732
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3354
733
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3366
734
  msgid "center"
735
  msgstr "Centro"
736
 
737
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2957
738
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3354
739
  msgid "right"
740
  msgstr "Derecha"
741
 
742
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2968
743
  msgid "Make video player responsive."
744
- msgstr "Haga responsivo el reproductor de vídeo"
 
 
 
 
745
 
746
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2969
747
- msgid "Choose video resolution automatically based on player size."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
748
  msgstr ""
749
- "Selecciona automáticamente la resolución del vídeo basado en el tamaño del "
750
- "reproductor."
 
751
 
752
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2974
753
  msgid "Allow other content on the same line as the video."
754
  msgstr "Permitir otros contenidos en la misma línea que el video"
755
 
756
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2979
757
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2986
758
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4267
759
  msgid "Width:"
760
  msgstr "Ancho:"
761
 
762
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2979
763
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2986
764
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4267
765
  msgid "Height:"
766
  msgstr "Altura:"
767
 
768
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2980
769
  msgid "Enlarge lower resolution videos to max width."
770
  msgstr "Ampliar vídeos de baja resolución al ancho máximo."
771
 
772
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2980
773
  msgid ""
774
- "Usually if a video's resolution is less than the max width, the video player "
775
- "is set to the actual width of the video. Enabling this will always set the "
776
- "same width regardless of the quality of the video. When necessary you can "
777
- "override by setting the dimensions manually."
778
  msgstr ""
779
- "Por lo general, si una resolución de vídeo es menor que el ancho máximo, el "
780
- "reproductor de vídeo está ajustado a la anchura real del vídeo. Al habilitar "
781
- "esto siempre se establece la misma anchura, independientemente de la calidad "
782
- "del vídeo. Cuando es necesario, puede anular ajustando las dimensiones de "
783
- "forma manual."
784
 
785
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2981
786
  msgid "Set all videos to expand to fill their containers."
787
  msgstr "Los vídeos se expanden para rellenar sus contenedores."
788
 
789
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2981
790
  msgid ""
791
- "Enabling this will ignore any other width settings and set the width of the "
792
- "video to the width of the container it's in."
793
  msgstr ""
794
- "Habilitando esto se ignorará cualquier otra configuración de ancho y se "
795
- "establecerá el ancho del video al de su contenedor."
796
 
797
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2998
 
 
 
 
 
 
 
 
798
  msgid "Stop, but leave popup window open"
799
  msgstr "Parar, pero dejar la ventana emergente abierta"
800
 
801
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:2999
802
  msgid "Autoplay next video in the gallery"
803
  msgstr "Reproduce automáticamente el siguiente vídeo de la galería"
804
 
805
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3000
806
  msgid "Close popup window"
807
  msgstr "Cerrar la ventana emergente"
808
 
809
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3012
 
 
 
 
 
 
 
 
 
 
 
 
810
  msgid "docked"
811
  msgstr "Atracado"
812
 
813
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3013
814
  msgid "floating"
815
  msgstr "Flotante"
816
 
817
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3014
818
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3054
819
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3107
820
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3196
821
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3382
822
  msgid "none"
823
- msgstr "Ninguno"
824
 
825
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3025
826
  msgid "Play automatically when page loads."
827
  msgstr "Reproducir automáticamente cuando se carga la página."
828
 
829
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3030
830
  msgid "Loop to beginning when video ends."
831
  msgstr "Bucle al inicio cuando termina el video."
832
 
833
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3038
834
  #, php-format
 
835
  msgid "%d%%"
836
  msgstr "%d%%"
837
 
838
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3045
839
  msgid "Mute"
840
  msgstr "Quitar sonido"
841
 
842
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3052
843
  msgid "metadata"
844
  msgstr "metadato"
845
 
846
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3053
847
  msgid "auto"
848
  msgstr "auto"
849
 
850
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3060
 
851
  msgid ""
852
- "Controls how much of a video to load before the user starts playback. Mobile "
853
- "browsers never preload any video information. Selecting \"metadata\" will "
854
- "load the height and width and format information along with a few seconds of "
855
- "the video in some desktop browsers. \"Auto\" will preload nearly a minute of "
856
- "video in most desktop browsers. \"None\" will prevent all data from "
857
  "preloading."
858
  msgstr ""
859
- "Controla la cantidad de un vídeo a cargar antes de que el usuario inicie la "
860
- "reproducción. Los navegadores móviles nunca precargan información de vídeo. "
861
- "Seleccionar \"metadata\" cargará la altura y la anchura y la información de "
862
- "formato, junto con unos pocos segundos de vídeo en algunos navegadores de "
863
- "escritorio. \"Auto\" precarga casi un minuto de vídeo en la mayoría de los "
864
- "navegadores de escritorio. \"No\" evitará que todos los datos se precarguen."
865
-
866
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3065
867
  #, php-format
868
- msgid ""
869
- "Use %s for a nice, circular play button. Leave blank for the default square "
870
- "play button."
871
  msgstr ""
872
- "Utilice %s para un botón bonito, circular para reproducir. Dejar en blanco "
873
- "para el botón predeterminado cuadrado."
874
 
875
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3065
876
  msgid "Or build your own CSS skin."
877
  msgstr "O construir su propia piel CSS."
878
 
879
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3070
880
  #, php-format
881
  msgid "Space-separated list to add to all videos. Example: %s"
882
- msgstr ""
883
- "Lista separada por espacios para añadir a todos los vídeos. Ejemplo: %s"
884
 
885
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3085
886
  #, php-format
887
  msgid "Use %s for a modern, circular play button."
888
  msgstr "Utilice %s para un botón moderno, circular para reproducir."
889
 
890
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3085
891
  msgid "Leave blank for the off-center square play button."
892
  msgstr "Dejar en blanco para el botón no centrado para reproducir."
893
 
894
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3091
895
  msgid "liveOrRecorded"
896
- msgstr "liveOrRecorded"
897
 
898
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3092
899
  msgid "live"
900
- msgstr "BuzónEstirar"
901
 
902
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3093
903
  msgid "recorded"
904
  msgstr "grabado"
905
 
906
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3094
907
  msgid "dvr"
908
  msgstr "dvr"
909
 
910
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3106
911
  msgid "letterbox"
912
  msgstr "Buzón"
913
 
914
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3108
915
  msgid "stretch"
916
  msgstr "Estirar"
917
 
918
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3109
919
  msgid "zoom"
920
  msgstr "Acercar"
921
 
922
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3121
923
  msgid "Autohide controlbar."
924
  msgstr "Ocultar automáticamente barra de control."
925
 
926
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3126
927
  msgid "Overlay play button on poster frame."
928
  msgstr "Botón de reproducción en el marco del cartel."
929
 
930
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3138
931
  msgid "Can make thumbnails"
932
  msgstr "Puede hacer miniaturas"
933
 
934
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3138
935
  msgid "Can encode videos"
936
  msgstr "Puede codificar videos"
937
 
938
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3138
939
  msgid "Can view & modify other users encode queue"
940
  msgstr "Puede ver y modificar la cola de codificación de otros usuarios"
941
 
942
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3172
943
  msgid "Allow users to embed your videos on other sites."
944
  msgstr "Permitir a los usuarios incrustar sus videos en otros sitios."
945
 
946
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3173
 
947
  msgid "Enable Open Graph video tags"
948
- msgstr "Habilitar etiquetas de video Open Graph"
949
 
950
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3173
951
  msgid ""
952
- "Facebook and some other social media sites will use these tags to embed the "
953
- "first video in your post. For the majority of Facebook users who have "
954
- "enabled secure browsing, your video must be served via https in order to be "
955
- "embedded directly on the page."
956
  msgstr ""
957
- "Facebook y otros sitios de medios sociales van a usar las siguientes "
958
- "etiquetas para incrustar el primer video en tu mensaje. Para la mayoría de "
959
- "usuarios de Facebook que han habilitado navegación segura, el vídeo debe ser "
960
- "servido a través de https para ser incorporado directamente en la página."
 
 
 
 
 
961
 
962
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
963
  msgid "Allow right-clicking on videos."
964
  msgstr "Permitir clic derecho sobre los vídeos."
965
 
966
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3174
967
  msgid ""
968
- "We can't prevent a user from simply saving the downloaded video file from "
969
- "the browser's cache, but disabling right-clicking will make it more "
970
- "difficult for casual users to save your videos."
971
  msgstr ""
972
- "No podemos evitar que un usuario simplemente guarde el archivo de vídeo "
973
- "descargado desde la caché del navegador, pero desactivando el botón derecho "
974
- "hará que sea más difícil para los usuarios ocasionales guardar sus videos."
975
 
976
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3179
977
  msgid "Set generated video thumbnails as featured images."
978
  msgstr "Establecer miniaturas de vídeo generadas como imágenes destacadas."
979
 
980
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3179
981
  msgid ""
982
- "If your theme uses the featured image meta tag, this will automatically set "
983
- "a video's parent post's featured image to the most recently saved thumbnail "
984
- "image."
985
  msgstr ""
986
- "Si el tema utiliza la etiqueta meta de la imagen destacada, esto establecerá "
987
- "automáticamente después la imagen destacada de una publicación padre de un "
988
- "vídeo a la miniatura guardada más recientemente."
989
 
990
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3179
 
991
  msgid "Set all as featured"
992
- msgstr "Establece todas como destacadas"
993
 
994
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3179
995
  msgid ""
996
- "If you've generated thumbnails before enabling this option, this will set "
997
- "all existing thumbnails as featured images. Be careful!"
998
  msgstr ""
999
- "Si usted ha generado miniaturas antes de habilitar esta opción, esto hará "
1000
- "que todas las miniaturas existentes se establezcan como imágenes destacadas. "
1001
- "¡Tenga cuidado!"
1002
 
1003
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3190
1004
  msgid ""
1005
- "This depends on your theme. Thumbnails generated by the plugin can be saved "
1006
- "as children of the video attachment or the post. Some themes use an image "
1007
- "attached to a post instead of the built-in featured image meta tag. Version "
1008
- "3.x of this plugin saved all thumbnails as children of the video."
1009
  msgstr ""
1010
- "Esto depende de su tema. Miniaturas generadas por el plugin se pueden "
1011
- "guardar como hijos del adjunto de video o en la publicación. Algunos temas "
1012
- "usan una imagen adjunta a un mensaje en lugar de la etiqueta meta de la "
1013
- "imagen destacada incorporada. La Versión 3.x de este plugin guardaba todas "
1014
- "las miniaturas como hijos del vídeo."
1015
 
1016
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3190
1017
  msgid "Set all parents"
1018
  msgstr "Establecer todos los padres"
1019
 
1020
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3190
1021
  msgid ""
1022
- "If you've generated thumbnails before changing this option, this will set "
1023
- "all existing thumbnails as children of your currently selected option."
1024
  msgstr ""
1025
- "Si usted ha generado miniaturas antes de cambiar esta opción, esto "
1026
- "establecerá todas las miniaturas existentes como hijas de la opción "
1027
- "seleccionada actualmente."
1028
 
1029
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3197
1030
  msgid "all"
1031
  msgstr "todo"
1032
 
1033
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3198
1034
  msgid "encoded videos only"
1035
  msgstr "solo videos codificados"
1036
 
1037
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3204
1038
  msgid ""
1039
- "If you delete the original video you can choose to delete all associated "
1040
- "attachments (thumbnails & videos) or keep the thumbnail."
1041
  msgstr ""
1042
- "Si elimina el vídeo original usted puede optar por eliminar todos los "
1043
- "archivos adjuntos asociados (miniaturas y videos) o mantener la vista en "
1044
- "miniatura."
1045
 
1046
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3209
1047
  #, php-format
1048
  msgid ""
1049
- "HTML tag applied to titles inserted above the video. Examples: %s. "
1050
- "Corresponding closing tags will be applied to the end of the title "
1051
- "automatically."
1052
  msgstr ""
1053
- "Etiqueta HTML aplicada a títulos insertados por encima del vídeo. Ejemplos: "
1054
- "%s. Las etiquetas de cierre correspondientes se aplicarán al final del "
1055
- "título de forma automática."
1056
 
1057
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3214
1058
  msgid "Match plugin settings"
1059
  msgstr "Ajustar la configuración del plugin"
1060
 
1061
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3214
1062
  msgid "WordPress default"
1063
  msgstr "Por defecto de WordPress "
1064
 
1065
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3214
1066
  msgid "Video only (deprecated)"
1067
  msgstr "Sólo Video (obsoleto)"
1068
 
1069
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3220
1070
  msgid ""
1071
- "The plugin can filter your media attachment page to display videos using "
1072
- "your chosen settings, or completely replace your attachment template to show "
1073
- "only the video. If you were one of the few people using iframe embed codes "
1074
- "before version 4.0 of this plugin then you should continue to use \"Video "
1075
- "only\" but otherwise it's not recommended."
1076
- msgstr ""
1077
- "El plugin puede filtrar su página de adjuntos de medios de comunicación para "
1078
- "mostrar videos utilizando la configuración seleccionada, o reemplazar "
1079
- "completamente la plantilla de adjuntos para mostrar sólo el video. Si usted "
1080
- "es una de las pocas personas que utilizaban códigos dentro de un iframe "
1081
- "antes de la versión 4.0 de este plugin, entonces usted debe seguir usando "
1082
- "\"Video solamente\" pero no se recomienda utilizarlo de otra forma."
1083
-
1084
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3234
1085
  #, php-format
1086
  msgid ""
1087
- "This should be the folder where applications are installed on your server, "
1088
- "not a direct path to an application, so it doesn't usually end with %1$s. "
1089
- "Example: %2$s."
1090
  msgstr ""
1091
- "Esto debería ser la carpeta donde las aplicaciones se instalan en el "
1092
- "servidor, no un camino directo a una aplicación, por lo que no suelen acabar "
1093
- "con %1$s. Ejemplo: %2$s"
1094
 
1095
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3246
1096
  msgid ""
1097
- "FFMPEG split into two separate branches in 2011. The new branch is called "
1098
- "LIBAV and executes using \"avconv\" instead of \"ffmpeg.\" Both are still "
1099
- "actively developed and FFMPEG frequently incorporates LIBAV features. Debian "
1100
- "& Ubuntu users probably have LIBAV installed."
1101
  msgstr ""
1102
- "FFMPEG se divide en dos ramas separadas en 2011. La nueva rama se llama "
1103
- "LIBAV y se ejecuta usando \"avconv\" en vez de \"ffmpeg.\" Ambos aún se "
1104
- "están desarrollando activamente y FFMPEG con frecuencia incorpora "
1105
- "características LIBAV. Los usuarios de Debian y Ubuntu, probablemente tienen "
1106
- "LIBAV instalado."
1107
 
1108
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3252
1109
  #, php-format
1110
  msgid ""
1111
- "When possible, use the browser's built-in video capabilities to make "
1112
- "thumbnails instead of %s."
1113
  msgstr ""
1114
- "Cuando sea posible, utilice las capacidades de vídeo integradas de su "
1115
- "navegador para hacer miniaturas en lugar de %s."
 
 
 
 
1116
 
1117
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3266
1118
  msgid "Replace original with"
1119
  msgstr "Reemplazar el original con"
1120
 
1121
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3276
1122
  msgid ""
1123
- "If you have FFMPEG/LIBAV and the proper libraries installed, you can choose "
1124
- "to replace your uploaded video with your preferred format, and also "
1125
- "transcode into as many as six additional formats depending on the resolution "
1126
- "of your original source. Different browsers have different playback "
1127
- "capabilities. Most desktop browsers can play H.264, and all modern mobile "
1128
- "devices can play at least 360p H.264. If you create multiple H.264 "
1129
- "resolutions, the highest resolution supported by the device will be served "
1130
- "up automatically. The plugin will not upconvert your video, so if you upload "
1131
- "a 720p video, it will not waste your time creating a 1080p version. There "
1132
- "was a time when it seemed like a good idea to provide OGV or WEBM for some "
1133
- "desktop browsers, but even Firefox allows H.264 playback on Windows now. I "
1134
- "no longer recommend encoding OGV or WEBM unless you expect a large number of "
1135
- "no-Flash sticklers visiting your site."
1136
- msgstr ""
1137
- "Si tiene FFMPEG/LIBAV y las bibliotecas adecuadas instaladas, puede optar "
1138
- "por reemplazar su vídeo subido con un video de H.264, y también "
1139
- "transcodificar en un máximo de cinco formatos adicionales dependiendo de la "
1140
- "resolución de su fuente original. Diferentes navegadores tienen diferentes "
1141
- "capacidades de reproducción. La mayoría de los navegadores de escritorio "
1142
- "puede reproducir H.264, y todos los dispositivos móviles modernos pueden "
1143
- "reproducir al menos 480p H.264. Si crea varias resoluciones H.264, la "
1144
- "resolución más alta admitida por el dispositivo se servirá de forma "
1145
- "automática. El plugin no convierte el vídeo, por lo que si sube un video de "
1146
- "720p, no va a perder el tiempo creando una versión 1080p. Hubo un momento en "
1147
- "que parecía como una buena idea proporcionar OGV o WEBM para algunos "
1148
- "navegadores de escritorio, pero incluso Firefox permite la reproducción de "
1149
- "H.264 en Windows ahora. Ya no recomiendo codificar OGV o WEBM a menos que "
1150
- "usted espera un gran número de rigoristas no-Flash visitando su sitio."
1151
-
1152
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3277
1153
- msgid ""
1154
- "(iPhone 4s+, iPad 2+, modern Android, Windows Phone 8, Chrome, Safari, IE "
1155
- "9+, Firefox Windows)"
1156
- msgstr ""
1157
- "(IPhone 4s +, iPad 2 +, Android moderno, Windows Phone 8, Chrome, Safari, IE "
1158
- "9 +, Firefox Windows)"
1159
-
1160
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3278
1161
- msgid "(iPhone 4+, iPad, most Android, Chrome, Safari, IE 9+, Firefox Windows)"
1162
- msgstr ""
1163
- "( iPhone 4 +, iPad, casi todos los Android, Chrome, Safari, IE 9 +, Firefox "
1164
- "Windows)"
1165
-
1166
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3308
1167
  #, php-format
1168
  msgid "Generate %1$s thumbnail from %2$s%% of the way through the video."
1169
  msgid_plural "Generate %1$s thumbnails and set #%2$s as the main image."
1170
- msgstr[0] ""
1171
- "Generar %1$s miniatura desde %2$s%% sobre la marcha a través del vídeo."
1172
- msgstr[1] ""
1173
- "Generar %1$s miniaturas desde %2$s%% sobre la marcha a través del vídeo."
1174
 
1175
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3316
1176
  msgid "Encode formats selected above."
1177
  msgstr "Formatos de codificación seleccionados arriba"
1178
 
1179
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3336
1180
  msgid "Generate thumbnails"
1181
  msgstr "Generar miniaturas"
1182
 
1183
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3336
1184
  #, php-format
1185
  msgid ""
1186
- "Use %s to automatically generate thumbnails for every video in the Media "
1187
- "Library that doesn't already have them. Uses the automatic thumbnail "
1188
- "settings above. This could take a very long time if you have a lot of "
1189
- "videos. Proceed with caution!"
1190
  msgstr ""
1191
- "Usar %s para automáticamente generar miniaturas para cada vídeo de la "
1192
- "Librería de Medios que no la tenga previamente. Utiliza la configuración de "
1193
- "miniaturas automáticas de más arriba. Este procesos puede tardar bastante "
1194
- "tiempo. ¡Ejecútalo con precaución!"
1195
 
1196
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3337
1197
  msgid "Encode videos"
1198
  msgstr "Codificar vídeos"
1199
 
1200
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3337
1201
  msgid ""
1202
- "Add every video in the Media Library to the encode queue if it hasn't "
1203
- "already been encoded. Uses the default encode formats chosen above."
1204
  msgstr ""
1205
- "Añadir cada vídeo en la Librería de Medios a la cola de codificación si "
1206
- "todavía no ha sido codificado. Utiliza el formato por defecto seleccionado "
1207
- "más arriba."
1208
 
1209
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3344
1210
  msgid "Username:"
1211
  msgstr "Nombre de Usuario:"
1212
 
1213
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3345
1214
  msgid "Password:"
1215
  msgstr "Contraseña:"
1216
 
1217
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3345
1218
  #, php-format
1219
- msgid ""
1220
- "If your videos are htaccess protected, %s will access them using these "
1221
- "credentials."
1222
  msgstr ""
1223
- "Si sus vídeos están protegidos por htaccess,%s accederá a ellos utilizando "
1224
- "estas credenciales."
1225
 
1226
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3353
1227
  #, php-format
1228
  msgid "Scale: %s%% of video covered by the watermark."
1229
  msgstr "Escala: %s%% del vídeo cubierta por la marca de agua."
1230
 
1231
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3355
 
 
 
 
 
1232
  msgid "Horizontal align:"
1233
  msgstr "Alineación horizontal:"
1234
 
1235
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3364
 
 
 
 
1236
  msgid "Vertical align:"
1237
  msgstr "Alineación vertical"
1238
 
1239
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3366
1240
  msgid "top"
1241
  msgstr "parte superior"
1242
 
1243
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3366
 
 
 
 
 
1244
  msgid "bottom"
1245
  msgstr "inferior"
1246
 
1247
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3388
1248
  #, php-format
1249
  msgid ""
1250
- "By default %1$s places moov atoms at the end of H.264 encoded files, which "
1251
- "forces the entire file to download before playback can start and can prevent "
1252
- "Flash players from playing them at all. Since approximately October 2012 "
1253
- "%1$s can fix the problem at the end of the encoding process by using the "
1254
- "option `movflags faststart`. This is the easiest and fastest way to correct "
1255
- "the problem, but older versions of %1$s will not work if you select the "
1256
- "movflags option. If you can't update to a new version of %1$s, select qt-"
1257
- "faststart or MP4Box which will run after encoding is finished if they are "
1258
- "installed on your server."
1259
- msgstr ""
1260
- "Por defecto %1$s coloca átomos moov al final de archivos H.264 codificados, "
1261
- "lo que obliga a todo el archivo a descargar antes de que la reproducción se "
1262
- "pueda iniciar y se puede evitar que los reproductores Flash los puedan re"
1263
- "´roducir. Desde aproximadamente en Octubre de 2012 %1$s puede corregir el "
1264
- "problema al final del proceso de codificación mediante el uso de la opción "
1265
- "`movflags faststart`. Esta es la forma más fácil y rápida para corregir el "
1266
- "problema, pero las versiones anteriores de %1$s no funcionarán si se "
1267
- "selecciona la opción movflags. Si no se puede actualizar a una nueva versión "
1268
- "de %1$s, seleccione qt-faststart o MP4Box que se ejecutarán después de que "
1269
  "la codificación termine si están instalados en su servidor."
1270
 
1271
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3402
1272
- msgid ""
1273
- "Constant Rate Factor (CRF) attempts to maintain a particular quality output "
1274
- "for the entire video and only uses bits the encoder determines are "
1275
- "necessary. Average Bit Rate is similar to the method used in older versions "
1276
- "of this plugin. If CRF is selected, WEBM encoding will also use the ABR "
1277
- "setting to set a max bit rate 25% higher than the ABR. Without a max bit "
1278
- "rate setting WEBM files are terrible quality."
1279
- msgstr ""
1280
- "Constant Rate Factor (CRF) (Factor de Tasa Constante) intenta mantener una "
1281
- "salida de calidad especial para todo el vídeo y sólo utiliza bits que el "
1282
- "codificador determina que son necesarios. Velocidad de bits media es similar "
1283
- "al método utilizado en las versiones anteriores de este plugin. Si se "
1284
- "selecciona el CRF, la codificación WEBM también utilizará la configuración "
1285
- "de ABR para establecer una tasa de bits máxima de 25% más alta que el ABR. "
1286
- "Sin una tasa de bits máxima los archivos de configuración WEBM son de "
1287
- "terrible calidad."
1288
-
1289
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3414
1290
- msgid ""
1291
- "Lower values are higher quality. 18 is considered visually lossless. Default "
1292
- "is 23."
1293
- msgstr ""
1294
- "Los valores más bajos son de mayor calidad. 18 se considera visualmente sin "
1295
- "pérdidas. El valor predeterminado es 23."
1296
 
1297
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3421
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1298
  msgid "Lower values are higher quality. Default is 10."
1299
- msgstr ""
1300
- "Los valores más bajos son de mayor calidad. El valor predeterminado es 10."
1301
 
1302
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3428
1303
  msgid "Higher values are higher quality. Default is 6."
1304
- msgstr ""
1305
- "Los valores más altos son de mayor calidad. El valor predeterminado es 6."
1306
 
1307
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3440
1308
  msgid "bits per pixel."
1309
  msgstr "Bits por píxel."
1310
 
1311
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3440
1312
  msgid "Default is 0.1"
1313
  msgstr "Por defecto es 0.1"
1314
 
1315
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3456
 
1316
  msgid "profile"
1317
  msgstr "perfil"
1318
 
1319
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3456
1320
  msgid ""
1321
- "Lower profiles will slightly increase file sizes. This mostly depends on "
1322
- "your need for compatability with Android devices. Main profile seems to work "
1323
- "on recent phones, although officially Android only supports baseline. High "
1324
- "profile is not recommended for mobile or Flash compatibility, and anything "
1325
- "above high is designed for professional video and probably incompatible with "
1326
- "consumer devices. Older versions of FFMPEG might ignore this setting "
1327
  "altogether."
1328
  msgstr ""
1329
- "Perfiles menores aumentan ligeramente el tamaño de los archivos. Esto "
1330
- "depende principalmente de su necesidad de compatibilidad con los "
1331
- "dispositivos Android. Perfil principal parece funcionar en los teléfonos más "
1332
- "recientes, aunque oficialmente Android sólo es compatible con la línea de "
1333
- "base. Alto perfil, no se recomienda para la compatibilidad móvil o Flash, y "
1334
- "cualquier cosa por encima de alto está diseñada para vídeo profesional y "
1335
- "probablemente incompatible con los dispositivos de consumo. Las versiones "
1336
- "anteriores de FFMPEG pueden ignorar esta configuración por completo."
1337
-
1338
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3463
1339
  msgid "level"
1340
  msgstr "nivel"
1341
 
1342
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3463
1343
  msgid ""
1344
- "3.0 is default. Lower levels will lower maximum bit rates and decoding "
1345
- "complexity. This mostly depends on your need for compatability with mobile "
1346
- "devices. Older versions of FFMPEG might ignore this setting altogether."
1347
  msgstr ""
1348
- "3.0 es el predeterminado. Los niveles más bajos reducirán las tasas de bits "
1349
- "máxima y la complejidad de decodificación. Esto depende principalmente de su "
1350
- "necesidad de compatibilidad con dispositivos móviles. Las versiones "
1351
- "anteriores de FFMPEG pueden ignorar esta configuración por completo."
1352
 
1353
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3483
1354
  msgid "Enable legacy FFMPEG \"-b\" and \"-ba\" bitrate flags."
1355
- msgstr "Habilitar banderas de bitrato FFMPEG \"b\" y \"-ba\" legacy."
 
 
 
 
 
 
 
 
 
1356
 
1357
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3483
 
 
 
 
1358
  msgid ""
1359
- "Enable if your installed version of FFMPEG is old enough that you can't use "
1360
- "the newer -b:v flags (Dreamhost users must turn this on). It may cause newer "
1361
- "versions of FFMPEG to fail."
1362
  msgstr ""
1363
- "Habilitar si la versión instalada de FFMPEG es tan antigua que no puede "
1364
- "utilizar las banderas –b:v más nuevas (usuarios Dreamhost deben habilitar "
1365
- "esta función). Puede causar que nuevas versiones de FFMPEG fallen."
 
1366
 
1367
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3484
1368
- msgid "Enable legacy FFMPEG parameters."
1369
- msgstr "Habilitar parámetros FFMPEG heredados."
1370
 
1371
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3484
1372
  msgid ""
1373
- "Enable if your installed version of FFMPEG is old enough that libx264 "
1374
- "requires additional configuration to operate (Dreamhost users must turn this "
1375
- "on). This should help if you can encode WEBM or OGV files but H264/Mobile "
1376
- "files fail. It could cause newer versions of FFMPEG to fail."
1377
  msgstr ""
1378
- "Habilitar si la versión instalada de FFMPEG es tan antigua que libx264 "
1379
- "requiere una configuración adicional para operar (usuarios Dreamhost deben "
1380
- "habilitar esta función). Esto debería ayudar si usted puede codificar "
1381
- "archivos WEBM o OGV pero los archivos H264/Mobile fallan. Podría causar que "
1382
- "nuevas versiones de ffmpeg para fallen."
1383
 
1384
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3485
1385
  msgid "Disable stdin."
1386
  msgstr "Desactivar stdin."
1387
 
1388
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3485
1389
  msgid ""
1390
- "Turn off this checkbox if your installed version of FFMPEG is old enough "
1391
- "that it does not recognize the nostdin flag (Dreamhost users must turn this "
1392
- "off)."
1393
  msgstr ""
1394
- "Habilitar si la versión instalada de FFMPEG es tan antigua que no reconoce "
1395
- "la bandera nostdin (Los usuarios de Dreamhost deben deshabilitar esta "
1396
- "función)."
1397
 
1398
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3498
1399
  msgid "Simultaneous encodes."
1400
  msgstr "Codificaciones simultáneas."
1401
 
1402
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3498
1403
  #, php-format
1404
  msgid ""
1405
- "Increasing the number will allow %1$s to encode more than one file at a "
1406
- "time, but may lead to %1$s monopolizing system resources."
1407
  msgstr ""
1408
- "Aumentar el número permitirá %1$s para codificar más de un archivo a la vez, "
1409
- "pero pueden dar lugar a %1$s monopolizando los recursos del sistema."
1410
 
1411
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3505
 
1412
  msgid "threads"
1413
  msgstr "hilos"
1414
 
1415
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3505
1416
  #, php-format
1417
  msgid ""
1418
- "Default is 1, which limits encoding speed but prevents encoding from using "
1419
- "too many system resources. Selecting 0 will allow %1$s to optimize the "
1420
- "number of threads or you can set the number manually. This may lead to %1$s "
1421
- "monopolizing system resources."
1422
  msgstr ""
1423
- "Por defecto es 1, que limita la velocidad de codificación, pero evita a la "
1424
- "codificación utilizar demasiados recursos del sistema. Seleccionar 0 "
1425
- "permitirá %1$s para optimizar el número de hilos o puede configurar el "
1426
- "número manualmente. Esto puede llevar a %1$s a monopolizar los recursos del "
1427
- "sistema"
1428
 
1429
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3507
 
1430
  msgid "Run"
1431
  msgstr "Ejecutar"
1432
 
1433
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3507
1434
  #, php-format
1435
- msgid ""
1436
- "Tells %1$s to run at a lower priority to avoid monopolizing system resources."
1437
  msgstr ""
1438
- "Dice a %1$s que se ejecute con una prioridad más baja para evitar la "
1439
- "monopolización de los recursos delsistema."
1440
 
1441
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3531
1442
  msgid "Replace"
1443
  msgstr "Reemplazar"
1444
 
1445
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3541
1446
  #, php-format
1447
  msgid "%1$s sample %2$s encode command"
1448
  msgstr "%1$s muestra %2$s comando de codificación"
1449
 
1450
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3542
1451
  #, php-format
1452
  msgid "%s test output:"
1453
  msgstr "%s salida de prueba:"
1454
 
1455
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3542
1456
  #, php-format
1457
  msgid "For help interpreting this output, %s try our Wiki page on Github"
1458
- msgstr ""
1459
- "Para ayudar a la interpretación de esta salida,%s, pruebe nuestra página "
1460
- "Wiki en Github"
1461
 
1462
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3748
1463
  #, php-format
1464
  msgid ""
1465
- "%1$s is disabled in PHP settings. You can embed existing videos and make "
1466
- "thumbnails with compatible browsers, but video encoding will not work. "
1467
- "Contact your System Administrator to find out if you can enable %1$s."
1468
  msgstr ""
1469
- "%1$s está deshabilitado en la configuración de PHP. Puede insertar vídeos "
1470
- "existentes y crear las miniaturas con los navegadores compatibles, pero la "
1471
- "codificación de vídeo no funcionará. Póngase en contacto con el "
1472
- "administrador del sistema para averiguar si se puede habilitar %1$s."
1473
 
1474
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3756
1475
  #, php-format
1476
  msgid ""
1477
- "%1$s is not executing correctly at %2$s. You can embed existing videos and "
1478
- "make thumbnails with compatible browsers, but video encoding is not possible "
1479
- "without %1$s."
1480
  msgstr ""
1481
- "%1$s no se encuentra en %2$s. Puede insertar videos existentes y hacer "
1482
- "miniaturas con los navegadores compatibles, pero la codificación de vídeo no "
1483
- "es posible sin %1$s."
1484
 
1485
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3756
1486
  msgid "Error message:"
1487
  msgstr "Mensaje de error:"
1488
 
1489
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3771
1490
  msgid "Video Embed & Thumbnail Generator settings reset to default values."
1491
- msgstr ""
1492
- "Ajustes de Video Embed & Thumbnail Generator restablecidas a valores por "
1493
- "defecto."
1494
 
1495
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3782
1496
  msgid "You must enter a value for the maximum video width."
1497
  msgstr "Debe ingresar un valor para el ancho máximo del video."
1498
 
1499
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3786
1500
  msgid "You must enter a value for the maximum video height."
1501
  msgstr "Debe ingresar un valor para la altura máxima del video."
1502
 
1503
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3790
1504
  msgid "You must enter a value for the maximum gallery video width."
1505
  msgstr "Debe ingresar un valor para el ancho máximo de la galería del vídeo."
1506
 
1507
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:3794
1508
- msgid "You must enter a value for the maximum gallery video height."
1509
- msgstr "Debe ingresar un valor para la altura máxima de la galería de vídeo."
1510
-
1511
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4141
1512
  msgid "Video Stats"
1513
  msgstr "Estadísticas Vídeo"
1514
 
1515
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4143
 
1516
  #, php-format
1517
- msgid "%1$s Starts, %2$s Complete Views"
1518
- msgstr "%1$s Comenzadas, %2$s Reproducciones completas"
 
 
1519
 
1520
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4169
1521
  #, php-format
1522
- msgid ""
1523
- "%1$s not found at %2$s and unable to load video in browser for thumbnail "
1524
- "generation."
 
 
 
 
 
 
 
 
 
1525
  msgstr ""
1526
- "%1$s no encontrado en %2$s y no puede cargar el video en el navegador para "
1527
- "la generación de imágenes en miniatura."
 
 
 
 
 
 
 
 
 
 
1528
 
1529
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4241
1530
  msgid "Force 1st frame thumbnail"
1531
  msgstr "Forzar el 1er cuadro de la miniatura"
1532
 
1533
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4243
1534
  msgid "Thumbnail timecode:"
1535
  msgstr "Código de tiempo de la miniatura:"
1536
 
1537
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4247
 
1538
  msgid "Thumbnails"
1539
  msgstr "Miniaturas"
1540
 
1541
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4255
1542
  msgid "Set thumbnail as featured image"
1543
  msgstr "Establecer miniatura como imagen destacada"
1544
 
1545
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4257
1546
  msgid "Thumbnail URL"
1547
  msgstr "URL de Miniatura"
1548
 
1549
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4259
1550
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4874
1551
  #, php-format
1552
  msgid "Leave blank to use %sdefault thumbnail"
1553
  msgstr "Dejar en blanco para usar miniatura %s por defecto"
1554
 
1555
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4265
1556
  msgid "Video Embed Dimensions"
1557
  msgstr "Dimensiones Incrustación de Video"
1558
 
1559
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4270
1560
  msgid "Lock to aspect ratio"
1561
  msgstr "Bloquear a la relación de aspecto"
1562
 
1563
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4271
1564
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4879
1565
  #, php-format
1566
  msgid "Leave blank to use %sdefault dimensions"
1567
  msgstr "Dejar en blanco para usar %s dimensiones por defecto"
1568
 
1569
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4276
1570
  msgid "Additional Formats"
1571
  msgstr "Formatos adicionales"
1572
 
1573
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4293
 
1574
  msgid "Track"
1575
  msgstr "Pista"
1576
 
1577
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4302
 
 
 
 
 
 
 
 
 
1578
  msgid "Subtitles & Captions"
1579
  msgstr "Subtítulos y capciones"
1580
 
1581
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4304
1582
  msgid "Add track"
1583
  msgstr "Añadir pista"
1584
 
1585
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4315
1586
  msgid "Single Video"
1587
  msgstr "Vídeo Único"
1588
 
1589
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4315
1590
  msgid "Video Gallery"
1591
  msgstr "Galería Vídeo"
1592
 
1593
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4323
1594
  msgid "Video Embed Options"
1595
  msgstr "Opciones Incrustación Video"
1596
 
1597
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4326
1598
  msgid "Insert title above video"
1599
  msgstr "Insertar título vídeo de arriba"
1600
 
1601
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4328
1602
  msgid "Insert download link below video"
1603
  msgstr "Insertar enlace de descarga a continuación"
1604
 
1605
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4328
1606
  msgid "Makes it easier for users to download file."
1607
  msgstr "Hace que sea más fácil para los usuarios descargar el archivo."
1608
 
1609
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4329
 
1610
  msgid "Insert"
1611
  msgstr "Insertar"
1612
 
1613
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4362
1614
  msgid "Gallery Settings (all optional)"
1615
  msgstr "Configuración de la Galería (todos opcionales)"
1616
 
1617
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4364
1618
  msgid "Thumbnail Width"
1619
  msgstr "Ancho Miniatura"
1620
 
1621
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4365
1622
  msgid "Order By"
1623
  msgstr "Ordenar Por"
1624
 
1625
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4366
1626
  msgid "Sort Order"
1627
  msgstr "Orden de Clasificación"
1628
 
1629
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4367
1630
  msgid "Exclude"
1631
  msgstr "Excluir"
1632
 
1633
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4368
1634
  msgid "Include"
1635
  msgstr "Incluir"
1636
 
1637
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4369
1638
  msgid "Post ID"
1639
  msgstr "Identificación de la publicación"
1640
 
1641
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4548
 
1642
  msgid "thumbnail"
1643
  msgstr "miniatura"
1644
 
1645
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4819
 
1646
  msgid "Embed Video from URL"
1647
- msgstr "Incrustar el vídeo desde la URL"
 
 
 
 
 
 
 
 
1648
 
1649
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4951
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1650
  msgid "Sample Video"
1651
- msgstr "Muestra de video"
1652
 
1653
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4952
1654
  msgid "Sample Embed Code"
1655
  msgstr "Muestra de Código Incrustado"
1656
 
1657
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:4953
1658
- msgid ""
1659
- "If text is entered in the attachment's caption field it is displayed here "
1660
- "automatically."
1661
  msgstr ""
1662
- "Si se introduce texto en el campo de título del adjunto, se muestra aquí de "
1663
- "forma automática."
1664
 
1665
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5213
1666
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5353
1667
  msgid "Can't open movie file."
1668
  msgstr "No se puede abrir el archivo de película."
1669
 
1670
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5331
1671
  #, php-format
1672
  msgid "%1$s updated in existing queue entry in position %2$s."
1673
  msgstr "%1$s actualizad en la cola de entrada en la posición %2$s."
1674
 
1675
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5332
1676
  #, php-format
1677
  msgid "Video is already queued in position %s."
1678
  msgstr "El vídeo ya está en la cola en la posición %s."
1679
 
1680
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5339
1681
  msgid "Starting"
1682
  msgstr "Iniciando"
1683
 
1684
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5340
1685
  #, php-format
1686
  msgid "%1$s added to queue in position %2$s."
1687
  msgstr "%1$s añadido a la cola en la posición %2$s."
1688
 
1689
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5344
1690
  msgid "Nothing to encode."
1691
  msgstr "Nada para codificar"
1692
 
1693
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5406
1694
  #, php-format
1695
  msgid ""
1696
- "Error: %1$s not found. Verify that %1$s is installed at %2$s and check the "
1697
- "%3$sapplication path plugin setting"
1698
  msgstr ""
1699
- "Error: %1$s no encontrado. Verifiqueque %1$s está instalado en %2$s y "
1700
- "compruebe la configuración de ruta del plugin a la aplicación %3$s."
1701
 
1702
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5501
1703
  #, php-format
1704
  msgid "%s already encoded"
1705
  msgstr "%s ya se encuentra codificado"
1706
 
1707
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5505
1708
  #, php-format
1709
  msgid "%s missing library libx264 required for H.264 encoding"
1710
  msgstr "%s falta biblioteca libx264 necesaria para la codificación H.264"
1711
 
1712
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5510
1713
  msgid "or"
1714
  msgstr "o"
1715
 
1716
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5511
1717
  #, php-format
1718
- msgid ""
1719
- "and missing an AAC encoding library. Please install and enable libx264 and %s"
1720
- msgstr ""
1721
- "y falta una biblioteca de codificación AAC.Por favor, instalar y habilitar "
1722
- "libx264 y %s"
1723
 
1724
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5515
1725
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5534
1726
  msgid "Missing libraries"
1727
  msgstr "Bibliotecas faltantes"
1728
 
1729
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5525
1730
  #, php-format
1731
  msgid "Encoding %s"
1732
  msgstr "Codificando %s"
1733
 
1734
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5531
1735
  #, php-format
1736
  msgid "%1$s missing library %2$s required for %3$s encoding."
1737
  msgstr "%1$s biblioteca faltante %2$s necesaria para la codificación %3$s."
1738
 
1739
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5537
1740
  #, php-format
1741
  msgid "%s already encoded."
1742
  msgstr "%s ya se encuentra codificada"
1743
 
1744
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5554
1745
  msgid "Error: Command 'escapeshellcmd' is disabled on your server."
1746
  msgstr "Error: Comando 'escapeshellcmd' está deshabilitado en el servidor"
1747
 
1748
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5740
1749
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5750
1750
  msgid "Encoding"
1751
  msgstr "Codificando"
1752
 
1753
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5743
1754
  msgid "Cancel"
1755
  msgstr "Cancelar"
1756
 
1757
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5746
1758
  msgid "Elapsed:"
1759
  msgstr "Transcurrido:"
1760
 
1761
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5746
1762
  msgid "Remaining:"
1763
  msgstr "Quedan:"
1764
 
1765
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5746
 
1766
  msgid "FPS:"
1767
  msgstr "FPS:"
1768
 
1769
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5825
1770
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5855
1771
  msgid "Encoding Complete"
1772
  msgstr "Codificación completa"
1773
 
1774
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5865
1775
  msgid "Encoding was canceled."
1776
  msgstr "Codificación se canceló."
1777
 
1778
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5876
1779
  msgid "No log file"
1780
  msgstr "ningún archivo de registro"
1781
 
1782
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5883
1783
  msgid "Error:"
1784
  msgstr "Error:"
1785
 
1786
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:5895
1787
  msgid "Waiting..."
1788
  msgstr "Esperando ..."
1789
 
1790
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6071
1791
  msgid "Fixing moov atom for streaming"
1792
  msgstr "Corregir átomo moov para el streaming"
1793
 
1794
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6595
1795
  msgid "Video Embed & Thumbnail Generator Shortcode Reference"
1796
  msgstr "Referencia Código corto Video Embed & Thumbnail Generator"
1797
 
1798
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6596
1799
  msgid "Use these optional attributes in the [KGVID] shortcode:"
1800
  msgstr "Usar estos atributos opcionales en el código corto [KGVID]:"
1801
 
1802
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6597
1803
  msgid "video attachment ID (instead of using a URL)."
1804
  msgstr "ID video adjunto (en lugar de mediante una dirección URL)."
1805
 
1806
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6598
1807
  msgid "number of attached videos to display if no URL or ID is given."
1808
  msgstr "número de videos adjuntos a mostrar si hay URL o ID es dado."
1809
 
1810
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6599
1811
  msgid "criteria for sorting attached videos if no URL or ID is given."
1812
  msgstr "criterios para clasificar los vídeos adjuntos si no se da el URL o ID."
1813
 
1814
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6600
1815
  msgid "sort order."
1816
  msgstr "orden de clasificación."
1817
 
1818
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6601
1819
  msgid "sets the thumbnail."
1820
  msgstr "establece la miniatura."
1821
 
1822
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6602
1823
  msgid "sets the image shown when the video ends."
1824
  msgstr "establece la imagen que aparece cuando termina el video."
1825
 
1826
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6605
1827
  msgid "set video to always expand to fill its container."
1828
  msgstr "establece que el vídeo siempre se expande para rellenar su contenedor."
1829
 
1830
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6607
1831
  msgid "allow other content on the same line as the video"
1832
  msgstr "permitir otras contenidos en la misma línea que el vídeo"
1833
 
1834
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6608
1835
  msgid "pre-sets the volume for unusually loud videos. Value between 0 and 1."
1836
- msgstr ""
1837
- "pre-configura el volumen para videos inusualmente fuertes. Valor entre 0 y 1."
1838
 
1839
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6609
1840
  msgid "sets the mute button on or off."
1841
  msgstr "selecciona el botón de silencio encendido o apagado."
1842
 
1843
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6610
1844
- msgid ""
1845
- "sets the controlbar position. \"Floating\" option only works with Strobe "
1846
- "Media Playback."
1847
  msgstr ""
1848
- "Establece la posición de barra de control. La opción \"Flotante \" sólo "
1849
- "funciona con Strobe Media Playback."
1850
 
1851
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6613
1852
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6614
1853
  #, php-format
1854
  msgid "or %s to disable."
1855
- msgstr "Ó %s para desactivar."
1856
 
1857
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6615
 
 
 
 
 
 
 
1858
  #, php-format
1859
  msgid ""
1860
- "changes text displayed in the embed code overlay in order to provide a "
1861
- "custom method for embedding a video or %s to disable."
1862
  msgstr ""
1863
- "Cambia el texto que aparece en la superposición de código de inserción con "
1864
- "el fin de proporcionar un método personalizado para incrustar un vídeo ó %s "
1865
- "para desactivarlo."
1866
 
1867
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6616
1868
  msgid "turns the view count on or off."
1869
  msgstr "Enciende o apaga el conteo de vistas."
1870
 
1871
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6617
1872
- msgid ""
1873
- "text that is displayed below the video (not subtitles or closed captioning)"
1874
  msgstr "texto que se muestra debajo del video (no subtítulos o capciones)"
1875
 
1876
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6618
1877
  msgid "Used for metadata only."
1878
  msgstr "Se utiliza sólo para metadatos."
1879
 
1880
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6619
1881
  msgid ""
1882
- "generates a link below the video to make it easier for users to save the "
1883
- "video file to their computers."
1884
  msgstr ""
1885
- "genera un enlace debajo del video para que sea más fácil para los usuarios "
1886
- "guardar el archivo de vídeo en sus ordenadores."
1887
 
1888
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6620
1889
  msgid "allow or disable right-clicking on the video player."
1890
- msgstr ""
1891
- "permitir o deshabilitar el botón derecho sobre el reproductor de vídeo."
1892
 
1893
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6621
1894
  msgid "allow or disable responsive resizing."
1895
  msgstr "permitir o deshabilitar el cambio de tamaño responsivo."
1896
 
1897
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6622
1898
- msgid "let the plugin select the best resolution for the size of the player."
1899
- msgstr ""
1900
- "dejar que el plugin seleccione la mejor resolución según el tamaño del "
1901
- "reproductor."
1902
 
1903
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6624
1904
  msgid "These options will add a subtitle/caption track."
1905
  msgstr "Estas opciones añaden una pista para subtítulo/capción."
1906
 
1907
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6625
1908
  msgid "URL of the WebVTT file."
1909
  msgstr "URL del archivo WebVTT."
1910
 
1911
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6627
1912
  msgid "the track's two-character language code (en, fr, es, etc)"
1913
  msgstr "Idioma del Código de dos caracteres de la pista (in, fr, es, etc.)"
1914
 
1915
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6628
1916
  msgid "text that will be shown to the user when selecting the track."
1917
  msgstr "el texto que se mostrará al usuario cuando seleccione la pista."
1918
 
1919
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6630
 
 
 
 
1920
  msgid "These options will only affect Video.js playback"
1921
  msgstr "Estas opciones sólo afectan la reproducción de Video.js"
1922
 
1923
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6631
1924
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6640
1925
  #, php-format
1926
  msgid "Completely change the look of the video player. %sInstructions here."
1927
- msgstr ""
1928
- "Cambiar completamente el aspecto del reproductor de vídeo. %sInstrucciones "
1929
- "aquí."
1930
 
1931
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6633
1932
  msgid ""
1933
- "These options will only affect Flash playback in Strobe Media Playback video "
1934
- "elements. They will have no effect on other players."
1935
  msgstr ""
1936
- "Estas opciones sólo afectan la reproducción de Flash en elementos de vídeo "
1937
- "Strobe Media Playback. Ellas no tendrán ningún efecto sobre otros "
1938
- "reproductores."
1939
 
1940
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6634
1941
  msgid "specify whether to autohide the control bar after a few seconds."
1942
- msgstr ""
1943
- "Especificar si se oculta automáticamente la barra de control al cabo de unos "
1944
- "segundos."
1945
 
1946
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6635
1947
  msgid "turns the big play button overlay in the middle of the video on or off."
1948
  msgstr "Enciende o apaga el overlay del botón jugar en el medio del video."
1949
 
1950
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6636
1951
  msgid "I honestly don't know what this is for."
1952
  msgstr "Sinceramente, no sé para qué es esto."
1953
 
1954
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6637
1955
  msgid ""
1956
- "If the video display size isn't the same as the video file, this determines "
1957
- "how the video will be scaled."
1958
  msgstr ""
1959
- "Si el tamaño de la pantalla de vídeo no es el mismo que el archivo de vídeo, "
1960
- "esto determina cómo se escalará el video."
1961
 
1962
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6638
1963
  msgid "#rrggbb"
1964
  msgstr "# rrggbb"
1965
 
1966
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6638
1967
  msgid "set the background color to whatever hex code you want."
1968
  msgstr "establezca el color de fondo alo código hex que desee."
1969
 
1970
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6639
1971
  msgid "Lets you specify all these flashvars in an XML file."
1972
  msgstr "Permite especificar todos estos flashvars en un archivo XML."
1973
 
1974
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6642
1975
  msgid ""
1976
- "These options are available for video galleries (options work the same as "
1977
- "standard WordPress image galleries)"
1978
  msgstr ""
1979
- "Estas opciones están disponibles para las galerías de vídeo (las opciones "
1980
- "funcionan igual que las galerías de imágenes de WordPress estándar)"
1981
 
1982
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6643
1983
  msgid "turns on the gallery"
1984
  msgstr "Enciende la galería"
1985
 
1986
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6644
1987
  msgid "width in pixels to display gallery thumbnails"
1988
  msgstr "anchoen píxeles para mostrar imágenes en miniatura de la galería"
1989
 
1990
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6645
1991
- msgid ""
1992
- "comma separated video attachment IDs. Excludes the videos from the gallery."
1993
- msgstr ""
1994
- "IDs de adjuntos de vídeo separados por comas. Excluye los vídeos de la "
1995
- "galería."
1996
 
1997
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6646
1998
  msgid ""
1999
- "comma separated video attachment IDs. Includes only these videos in the "
2000
- "gallery. Please note that include and exclude cannot be used together."
2001
  msgstr ""
2002
- "IDs de adjuntos de vídeo separados por comas. Incluye sólo estos videos en "
2003
- "la galería. Tenga en cuenta que incluir y excluir no se pueden utilizar "
2004
- "juntos."
2005
 
2006
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6647
2007
  msgid "criteria for sorting the gallery"
2008
  msgstr "Criterios para clasificar la galería"
2009
 
2010
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6648
2011
  msgid "sort order"
2012
  msgstr "Orden de la clasificación"
2013
 
2014
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6649
2015
- msgid ""
2016
- "post ID to display a gallery made up of videos associated with a different "
2017
- "post."
2018
  msgstr ""
2019
- "ID del mensaje para mostrar una galería compuesta por vídeos asociados a una "
2020
- "publicación diferente."
2021
 
2022
- #: d:\Users\aluiest\Desktop\video-embed-thumbnail-generator/video-embed-thumbnail-generator.php:6650
2023
  msgid ""
2024
- "either close the pop-up or start playing the next video when the current "
2025
- "video finishes playing."
 
 
 
 
 
 
2026
  msgstr ""
2027
- "Ya sea cerrar el pop-up o empezar a reproducir el siguiente video cuando el "
2028
- "vídeo actual termine de reproducirse."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  # This file is distributed under the same license as the Video Embed & Thumbnail Generator package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Video Embed & Thumbnail Generator 4.5\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/video-embed-thumbnail-generator\n"
7
+ "POT-Creation-Date: 2015-06-24 10:04-0000\n"
8
+ "PO-Revision-Date: 2015-06-24 10:16-0000\n"
 
9
  "Last-Translator: Agustin Luis Estevez <aluiest@gmail.com>\n"
10
+ "Language-Team: Agustin Luis <aluiest@gmail.com>\n"
11
  "Language: es_ES\n"
12
  "MIME-Version: 1.0\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Poedit 1.7.4\n"
16
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
  "X-Poedit-SourceCharset: UTF-8\n"
18
+ "X-Poedit-KeywordsList: __;_x:1,2c;_n:1,2;_n_noop:1,2;_nc;_nx:4c,1,2;_nx_noop:3c,1,2;_ex:1,2c;"
19
+ "esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;__ngettext_noop:1,2;"
20
+ "_e\n"
21
+ "X-Poedit-Basepath: ..\n"
22
+ "X-Poedit-SearchPath-0: .\n"
23
 
24
+ #: video-embed-thumbnail-generator.php:333 video-embed-thumbnail-generator.php:3735
 
25
  msgid "same resolution H.264"
26
  msgstr "H.264 de la misma resolución"
27
 
28
+ #: video-embed-thumbnail-generator.php:459
29
  #, php-format
30
  msgid "Replace original with %s"
31
  msgstr "Reemplazar el original con %s"
32
 
33
+ #: video-embed-thumbnail-generator.php:566
34
  msgid "Settings"
35
  msgstr "Configuración"
36
 
37
+ #: video-embed-thumbnail-generator.php:574
38
  msgid "Network Settings"
39
  msgstr "Configuración de red"
40
 
41
+ #: video-embed-thumbnail-generator.php:1451
42
+ msgctxt "please wait"
43
  msgid "Wait"
44
  msgstr "Espere"
45
 
46
+ #: video-embed-thumbnail-generator.php:1452
47
  msgid "Hide video..."
48
  msgstr "Ocultar vídeo ..."
49
 
50
+ #: video-embed-thumbnail-generator.php:1453 video-embed-thumbnail-generator.php:4742
 
51
  msgid "Choose from video..."
52
  msgstr "Elija vídeo ..."
53
 
54
+ #: video-embed-thumbnail-generator.php:1454
55
  msgid "Can't load video"
56
  msgstr "No se puede cargar el vídeo"
57
 
58
+ #: video-embed-thumbnail-generator.php:1455
59
  msgid "Choose Thumbnail:"
60
  msgstr "Elija miniatura:"
61
 
62
+ #: video-embed-thumbnail-generator.php:1456
63
  msgid "Save All Thumbnails"
64
  msgstr "Guarde todas las miniaturas"
65
 
66
+ #: video-embed-thumbnail-generator.php:1457
67
  msgid "Saving..."
68
  msgstr "Guardando..."
69
 
70
+ #: video-embed-thumbnail-generator.php:1458
71
  msgid "Loading..."
72
  msgstr "Cargando…"
73
 
74
+ #: video-embed-thumbnail-generator.php:1459 video-embed-thumbnail-generator.php:5370
 
75
  msgid "Generate"
76
  msgstr "Generar"
77
 
78
+ #: video-embed-thumbnail-generator.php:1460 video-embed-thumbnail-generator.php:5371
 
79
  msgid "Randomize"
80
  msgstr "Aleatorizar"
81
 
82
+ #: video-embed-thumbnail-generator.php:1461
83
  #, php-format
84
  msgid "%s not found"
85
  msgstr "%s no encontrado"
86
 
87
+ #: video-embed-thumbnail-generator.php:1462
88
  msgid ""
89
+ "Please enter a URL that points to a valid video file. Video sharing sites are not supported by "
90
+ "this plugin.\n"
91
+ "To embed from YouTube, Vimeo, etc, just paste the link directly into the post window and "
92
+ "WordPress will handle the rest."
93
+ msgstr ""
94
+ "Por favor introduzca una URL que apunte a un archivo de vídeo válido. Sitios de intercambio de "
95
+ "video no son compatibles con este plugin. \n"
96
+ "Para incrustar desde YouTube, Vimeo, etc., basta con pegar el enlace directamente en la ventana "
97
+ "del mensaje y WordPress se encargará del resto."
98
+
99
+ #: video-embed-thumbnail-generator.php:1463 video-embed-thumbnail-generator.php:2700
100
+ #: video-embed-thumbnail-generator.php:5370 video-embed-thumbnail-generator.php:5371
101
+ #: video-embed-thumbnail-generator.php:5405
102
  msgid "Please enter a valid video URL"
103
  msgstr "Introduce una URL de vídeo válida"
104
 
105
+ #: video-embed-thumbnail-generator.php:1464
106
  msgid ""
107
  "You are about to permanently delete the encoded video.\n"
108
  " 'Cancel' to stop, 'OK' to delete."
110
  "Vas a eliminar permanentemente el video codificado. \n"
111
  " \"Cancelar\" para detener, 'OK' para borrar."
112
 
113
+ #: video-embed-thumbnail-generator.php:1465
114
  msgid "Saved."
115
  msgstr "Guardado."
116
 
117
+ #: video-embed-thumbnail-generator.php:1466
118
  msgid "Running test..."
119
  msgstr "Ejecutando la prueba ..."
120
 
121
+ #: video-embed-thumbnail-generator.php:1467
122
  msgid "FFMPEG or LIBAV required for these functions."
123
  msgstr "FFMPEG o LIBAV requerido para estas funciones."
124
 
125
+ #: video-embed-thumbnail-generator.php:1468
126
  msgid ""
127
+ "You are about to set all existing video thumbnails previously generated by this plugin as the "
128
+ "featured images for their posts. There is no 'undo' button, so proceed at your own risk."
 
129
  msgstr ""
130
+ "Usted está a punto de establecer todas las miniaturas de vídeo existentes previamente generados "
131
+ "por este plugin como las imágenes destacadas para sus puestos. No hay botón de \"deshacer\", así "
132
+ "que proceda a su propio riesgo."
133
 
134
+ #: video-embed-thumbnail-generator.php:1469
135
  msgid ""
136
+ "You are about to create thumbnails for every video in your Media Library that doesn't already "
137
+ "have one. This might take a long time. There is no 'undo' button, so proceed at your own risk.\n"
 
138
  "\n"
139
  "Number of videos without thumbnails: "
140
  msgstr ""
141
+ "Usted está a punto de crear miniaturas para cada vídeo en su Librería de Medios que no tenga una "
142
+ "previamente. Esto puede tardar bastante. No ha hay botón de deshacer, por tanto ejecútelo bajo "
143
+ "su responsabilidad.\n"
144
  "\n"
145
  "Número de vídeos sin miniatura:"
146
 
147
+ #: video-embed-thumbnail-generator.php:1470
148
  msgid ""
149
+ "You are about to add every video in your Media Library to the video encode queue if it hasn't "
150
+ "already been encoded. This might take a long time."
151
  msgstr ""
152
+ "Estás a punto de añadir cada video de tu Librería de Medios en la cola de codificación de video "
153
+ "si todavía no han sido codificados. Esto puede tardar bastante tiempo."
 
154
 
155
+ #: video-embed-thumbnail-generator.php:1471
156
  msgid "No thumbnails generated. All videos have thumbnails already."
157
+ msgstr "No se ha generado ninguna miniatura. Todos los vídeo ya tiene miniatura."
 
158
 
159
+ #: video-embed-thumbnail-generator.php:1472
160
  msgid "'Cancel' to stop, 'OK' to proceed."
161
  msgstr "\"Cancelar\" para detener, en 'Aceptar' para continuar."
162
 
163
+ #: video-embed-thumbnail-generator.php:1473
164
  msgid "Processing..."
165
  msgstr "Processing ..."
166
 
167
+ #: video-embed-thumbnail-generator.php:1474
168
  msgid ""
169
+ "You are about to set all existing video thumbnails previously generated by this plugin as "
170
+ "attachments of their posts rather than their associated videos. Proceed at your own risk."
 
171
  msgstr ""
172
+ "Usted está a punto de establecer todas las miniaturas de vídeo existentes previamente generados "
173
+ "por este plugin como archivos adjuntos de sus mensajes en lugar de sus vídeos asociados. Proceda "
174
+ "a su propio riesgo."
175
 
176
+ #: video-embed-thumbnail-generator.php:1475
177
  msgid ""
178
+ "You are about to set all existing video thumbnails previously generated by this plugin as "
179
+ "attachments of their videos rather than their associated posts. Proceed at your own risk."
 
180
  msgstr ""
181
+ "Usted está a punto de establecer todas las miniaturas de vídeo existentes previamente generados "
182
+ "por este plugin como archivos adjuntos de sus videos en lugar de sus mensajes asociados. Proceda "
183
+ "a su propio riesgopista:."
184
 
185
+ #: video-embed-thumbnail-generator.php:1476
186
  msgid "Complete"
187
  msgstr "Completo"
188
 
189
+ #: video-embed-thumbnail-generator.php:1477 video-embed-thumbnail-generator.php:4811
190
+ #: video-embed-thumbnail-generator.php:5397
191
  msgid "Track type:"
192
  msgstr "Tipo de Rastreo:"
193
 
194
+ #: video-embed-thumbnail-generator.php:1478 video-embed-thumbnail-generator.php:4802
195
+ #: video-embed-thumbnail-generator.php:5397
196
  msgid "subtitles"
197
  msgstr "Subtítulos"
198
 
199
+ #: video-embed-thumbnail-generator.php:1479 video-embed-thumbnail-generator.php:4802
200
+ #: video-embed-thumbnail-generator.php:5397
201
  msgid "captions"
202
  msgstr "Subtítulos"
203
 
204
+ #: video-embed-thumbnail-generator.php:1480 video-embed-thumbnail-generator.php:4802
205
+ #: video-embed-thumbnail-generator.php:5397
206
  msgid "chapters"
207
  msgstr "Capítulos"
208
 
209
+ #: video-embed-thumbnail-generator.php:1481 video-embed-thumbnail-generator.php:4812
 
210
  msgid "Choose a Text File"
211
  msgstr "Elija un archivo de texto"
212
 
213
+ #: video-embed-thumbnail-generator.php:1482 video-embed-thumbnail-generator.php:4812
 
214
  msgid "Set as track source"
215
  msgstr "Establecer como fuente de rastreo"
216
 
217
+ #: video-embed-thumbnail-generator.php:1483 video-embed-thumbnail-generator.php:2773
218
+ #: video-embed-thumbnail-generator.php:3377 video-embed-thumbnail-generator.php:3383
219
+ #: video-embed-thumbnail-generator.php:3389 video-embed-thumbnail-generator.php:3826
220
+ #: video-embed-thumbnail-generator.php:4777 video-embed-thumbnail-generator.php:4812
 
 
 
 
221
  msgid "Choose from Library"
222
  msgstr "Elija desde Biblioteca"
223
 
224
+ #: video-embed-thumbnail-generator.php:1484 video-embed-thumbnail-generator.php:5397
 
225
  msgid "Language code:"
226
  msgstr "Código Idioma:"
227
 
228
+ #: video-embed-thumbnail-generator.php:1485
229
+ msgctxt "noun"
230
  msgid "Label:"
231
  msgstr "Etiqueta:"
232
 
233
+ #: video-embed-thumbnail-generator.php:1486 video-embed-thumbnail-generator.php:4816
234
+ #: video-embed-thumbnail-generator.php:5397
235
+ msgid "Default:"
236
+ msgstr "Por defecto:"
237
+
238
+ #: video-embed-thumbnail-generator.php:1487
239
+ msgctxt "Custom format"
240
  msgid "Custom"
241
  msgstr "Personalizado"
242
 
243
+ #: video-embed-thumbnail-generator.php:1629
244
+ msgctxt "noun for Google Analytics event"
245
+ msgid "Play Start"
246
+ msgstr "Comenzar reproducción"
247
+
248
+ #: video-embed-thumbnail-generator.php:1630
249
+ msgctxt "noun for Google Analytics event"
250
+ msgid "Complete View"
251
+ msgstr "Vista completa"
252
+
253
+ #: video-embed-thumbnail-generator.php:1631
254
+ msgctxt "button text to play next video"
255
+ msgid "Next"
256
+ msgstr "Siguiente"
257
+
258
+ #: video-embed-thumbnail-generator.php:1632
259
+ msgctxt "button text to play previous video"
260
+ msgid "Previous"
261
+ msgstr "Anterior"
262
+
263
+ #: video-embed-thumbnail-generator.php:1754
264
+ msgid "Previous"
265
+ msgstr "Anterior"
266
+
267
+ #: video-embed-thumbnail-generator.php:1761
268
+ msgid "Next"
269
+ msgstr "Siguiente"
270
+
271
+ #: video-embed-thumbnail-generator.php:2303
272
  #, php-format
273
  msgid "%s view"
274
  msgid_plural "%s views"
275
  msgstr[0] "%s reproducción"
276
  msgstr[1] "%s reproducciones"
277
 
278
+ #: video-embed-thumbnail-generator.php:2313
279
  msgid "Click on this link to download"
280
  msgstr "Pulse en este enlace para descargar"
281
 
282
+ #: video-embed-thumbnail-generator.php:2316
283
  msgid "Right-click or ctrl-click on this link to download"
284
  msgstr "Haga clic derecho o ctrl-clic en este enlace para descargar"
285
 
286
+ #: video-embed-thumbnail-generator.php:2330
287
+ msgctxt "precedes code for embedding video"
288
  msgid "Embed:"
289
+ msgstr "Incrustar"
 
 
 
 
 
 
 
 
 
 
 
 
290
 
291
+ #: video-embed-thumbnail-generator.php:2574
 
 
 
 
 
 
 
 
 
292
  msgid "Clear Format"
293
  msgstr "Borrar Formato"
294
 
295
+ #: video-embed-thumbnail-generator.php:2577
296
  msgid "Delete Permanently"
297
  msgstr "Eliminar permanentemente"
298
 
299
+ #: video-embed-thumbnail-generator.php:2594
300
  msgid "Currently encoding"
301
  msgstr "Codificando Actualmente"
302
 
303
+ #: video-embed-thumbnail-generator.php:2602
304
  msgid "Format already exists"
305
  msgstr "Formato ya existe"
306
 
307
+ #: video-embed-thumbnail-generator.php:2609
308
  msgid "You don't have permission to encode videos"
309
  msgstr "Usted no tiene permiso para codificar vídeos"
310
 
311
+ #: video-embed-thumbnail-generator.php:2708
312
+ #, php-format
313
+ msgctxt "ex: FFMPEG not found at /usr/local/bin"
314
+ msgid "%1$s not found at %2$s"
315
+ msgstr "%1$s no se encontró en %2$s"
316
+
317
+ #: video-embed-thumbnail-generator.php:2773
318
  #, php-format
319
  msgid "Choose %s"
320
  msgstr "Elija %s"
321
 
322
+ #: video-embed-thumbnail-generator.php:2773
323
  #, php-format
324
  msgid "Set as %s"
325
  msgstr "Establecer como %s"
326
 
327
+ #: video-embed-thumbnail-generator.php:2782
328
  msgid "Nothing to encode"
329
  msgstr "Nada para codificar"
330
 
331
+ #: video-embed-thumbnail-generator.php:2786
332
+ msgctxt "Button text"
333
  msgid "Update"
334
  msgstr "Actualizar"
335
 
336
+ #: video-embed-thumbnail-generator.php:2789
337
+ msgctxt "Button text"
338
  msgid "Encode selected"
339
+ msgstr "Codificar selección"
340
 
341
+ #: video-embed-thumbnail-generator.php:2795
342
+ msgid "Generates additional video formats compatible with most mobile & HTML5-compatible browsers"
 
 
343
  msgstr ""
344
+ "Genera formatos de vídeo adicionales compatibles con los navegadores más móviles y compatibles "
345
+ "con HTML5"
346
 
347
+ #: video-embed-thumbnail-generator.php:2823
348
+ msgctxt "noun, column header"
349
  msgid "Order"
350
  msgstr "Orden"
351
 
352
+ #: video-embed-thumbnail-generator.php:2824
353
+ msgctxt "username, column header"
354
  msgid "User"
355
  msgstr "Usuario"
356
 
357
+ #: video-embed-thumbnail-generator.php:2825
358
+ msgctxt "noun, column header"
359
  msgid "Thumbnail"
360
  msgstr "Miniatura"
361
 
362
+ #: video-embed-thumbnail-generator.php:2826
363
+ msgctxt "noun, column header"
364
  msgid "File"
365
  msgstr "Archivo"
366
 
367
+ #: video-embed-thumbnail-generator.php:2827
368
+ msgctxt "noun, column header"
369
  msgid "Formats"
370
  msgstr "Formatos"
371
 
372
+ #: video-embed-thumbnail-generator.php:2828
373
+ msgctxt "noun, column header"
374
  msgid "Actions"
375
  msgstr "Acciones"
376
 
377
+ #: video-embed-thumbnail-generator.php:2832
378
+ msgctxt "multisite site name, column header"
379
  msgid "Site"
380
  msgstr "Sitio"
381
 
382
+ #: video-embed-thumbnail-generator.php:2953
383
  msgid "Other user's video"
384
  msgstr "Vídeo de otro usuario"
385
 
386
+ #: video-embed-thumbnail-generator.php:2960
387
  msgid "Queue is empty"
388
+ msgstr "La cola está vacía"
389
 
390
+ #: video-embed-thumbnail-generator.php:2969 video-embed-thumbnail-generator.php:2976
391
+ msgctxt "Tools page title"
392
  msgid "Video Embed & Thumbnail Generator Encoding Queue"
393
+ msgstr "Cola de codificación de Video Embed & Thumbnail Generator"
394
 
395
+ #: video-embed-thumbnail-generator.php:2969
396
+ msgctxt "Title in admin sidebar"
397
  msgid "Video Encode Queue"
398
+ msgstr "Cola de codificación de vídeo"
399
 
400
+ #: video-embed-thumbnail-generator.php:2976
401
+ msgctxt "Title in network admin sidebar"
402
  msgid "Network Video Encode Queue"
403
+ msgstr "Cola de codificación de vídeo de la red"
404
 
405
+ #: video-embed-thumbnail-generator.php:2986
406
+ msgid "Video Embed & Thumbnail Generator Encoding Queue"
407
+ msgstr "Cola para codificación de generador de miniaturas y video incrustado"
408
+
409
+ #: video-embed-thumbnail-generator.php:3003
410
  msgid "Clear All Completed"
411
  msgstr "Borrar Todo lo Completado"
412
 
413
+ #: video-embed-thumbnail-generator.php:3011 video-embed-thumbnail-generator.php:3127
414
+ msgctxt "Settings page title"
415
  msgid "Video Embed & Thumbnail Generator"
416
+ msgstr "Video Embed & Thumbnail Generator"
417
 
418
+ #: video-embed-thumbnail-generator.php:3011 video-embed-thumbnail-generator.php:3127
419
+ msgctxt "Settings page title in admin sidebar"
420
+ msgid "Video Embed & Thumbnail Generator"
421
+ msgstr "Video Embed & Thumbnail Generator"
422
+
423
+ #: video-embed-thumbnail-generator.php:3047
424
+ msgid "Video Embed & Thumbnail Generator network settings reset to default values."
425
+ msgstr "Ajustes de red de Video Embed & Thumbnail Generator restablecidas a valores por defecto."
426
+
427
+ #: video-embed-thumbnail-generator.php:3069
428
+ msgid "Path to applications on the server:"
429
+ msgstr "Ruta a las aplicaciones en el servidor:"
430
+
431
+ #: video-embed-thumbnail-generator.php:3072 video-embed-thumbnail-generator.php:3286
432
+ msgid "Application for thumbnails & encoding:"
433
+ msgstr "Aplicación para miniaturas y codificación:"
434
+
435
+ #: video-embed-thumbnail-generator.php:3076 video-embed-thumbnail-generator.php:3296
436
+ msgid "Method to fix encoded H.264 headers for streaming:"
437
+ msgstr "Método para corregir encabezados H.264 codificados para la transmisión:"
438
+
439
+ #: video-embed-thumbnail-generator.php:3080 video-embed-thumbnail-generator.php:3305
440
+ msgid "FFMPEG legacy options:"
441
+ msgstr "Opciones adicionales FFMPEG:"
442
+
443
+ #: video-embed-thumbnail-generator.php:3084
444
+ msgid "Execution:"
445
+ msgstr "Ejecución:"
446
+
447
+ #: video-embed-thumbnail-generator.php:3088
448
+ msgid "User capabilties for new sites:"
449
+ msgstr "Capacidades de los usuarios para nuevos sitios:"
450
 
451
+ #: video-embed-thumbnail-generator.php:3092
452
+ msgid "Super Admins only:"
453
+ msgstr "Sólo Super Administradores:"
454
+
455
+ #: video-embed-thumbnail-generator.php:3098 video-embed-thumbnail-generator.php:3154
456
  msgid "Save Changes"
457
  msgstr "Guardar cambios"
458
 
459
+ #: video-embed-thumbnail-generator.php:3099 video-embed-thumbnail-generator.php:3155
 
460
  msgid "Reset Options"
461
  msgstr "Resetear opciones"
462
 
463
+ #: video-embed-thumbnail-generator.php:3103 video-embed-thumbnail-generator.php:3159
464
+ msgid ""
465
+ "If you're getting some use out of this plugin, please consider donating a few dollars to support "
466
+ "its future development."
467
+ msgstr ""
468
+ "Si saca algún partido de este plugin, por favor considere hacer un donativo para dar soporte a "
469
+ "los futuros desarrollos."
470
+
471
+ #: video-embed-thumbnail-generator.php:3122
472
  #, php-format
473
+ msgctxt "FFMPEG settings tab"
474
  msgid "%s settings tab."
475
  msgstr "%s pestaña de configuración."
476
 
477
+ #: video-embed-thumbnail-generator.php:3145
478
+ msgctxt "Adjective, tab title"
479
+ msgid "General"
480
+ msgstr "General"
481
+
482
+ #: video-embed-thumbnail-generator.php:3146
483
  #, php-format
484
+ msgctxt "FFMPEG Settings, tab title"
485
  msgid "%s Settings"
486
+ msgstr "%s Configuraciones"
487
 
488
+ #: video-embed-thumbnail-generator.php:3246
489
  msgid "Default Video Playback Settings"
490
  msgstr "Configuración predeterminada de reproducción de vídeo"
491
 
492
+ #: video-embed-thumbnail-generator.php:3247
493
  msgid "The following options will only affect Flash playback"
494
  msgstr "Las siguientes opciones sólo afectarán Reproducción de Flash"
495
 
496
+ #: video-embed-thumbnail-generator.php:3248
497
  msgid "Plugin Settings"
498
  msgstr "Configuración Plugin"
499
 
500
+ #: video-embed-thumbnail-generator.php:3249
501
  msgid "Video Encoding Settings"
502
  msgstr "Configuración de codificación de Vídeo"
503
 
504
+ #: video-embed-thumbnail-generator.php:3251
505
  msgid "Default thumbnail:"
506
  msgstr "Miniaturas por defecto:"
507
 
508
+ #: video-embed-thumbnail-generator.php:3252
509
  msgid "End of video image:"
510
  msgstr "Imagen de vídeo final:"
511
 
512
+ #: video-embed-thumbnail-generator.php:3253
513
  msgid "Watermark overlay:"
514
  msgstr "Superposición de Marca de Agua"
515
 
516
+ #: video-embed-thumbnail-generator.php:3254
517
  msgid "Video alignment:"
518
  msgstr "Alineación del vídeo:"
519
 
520
+ #: video-embed-thumbnail-generator.php:3255
521
+ msgid "Automatically adjust videos:"
522
+ msgstr "Ajustar vídeos automáticamente:"
523
 
524
+ #: video-embed-thumbnail-generator.php:3256
525
  msgid "Inline videos:"
526
  msgstr "Vídeos Inline:"
527
 
528
+ #: video-embed-thumbnail-generator.php:3257
529
  msgid "Max embedded video dimensions:"
530
+ msgstr "Dimensiones máximas del vídeo incrustado:"
 
 
 
 
531
 
532
+ #: video-embed-thumbnail-generator.php:3258
533
+ msgid "Video gallery:"
534
+ msgstr "Galería de vídeo:"
535
 
536
+ #: video-embed-thumbnail-generator.php:3259
 
 
 
 
537
  msgid "Video controls:"
538
  msgstr "Controles de vídeo:"
539
 
540
+ #: video-embed-thumbnail-generator.php:3260
541
  msgid "Autoplay:"
542
  msgstr "Reproducción automática:"
543
 
544
+ #: video-embed-thumbnail-generator.php:3261
545
+ msgctxt "verb"
546
  msgid "Loop:"
547
+ msgstr "Bucle:"
548
 
549
+ #: video-embed-thumbnail-generator.php:3262
550
  msgid "Volume:"
551
  msgstr "Volumen:"
552
 
553
+ #: video-embed-thumbnail-generator.php:3263
554
  msgid "Preload:"
555
  msgstr "Precarga:"
556
 
557
+ #: video-embed-thumbnail-generator.php:3264
558
+ msgctxt "CSS class for video skin"
559
  msgid "Skin class:"
560
+ msgstr "Clase para el skin:"
561
 
562
+ #: video-embed-thumbnail-generator.php:3265
563
  msgid "Custom attributes:"
564
  msgstr "Atributos personalizados:"
565
 
566
+ #: video-embed-thumbnail-generator.php:3267
567
  msgid "Background color:"
568
  msgstr "Color de fondo:"
569
 
570
+ #: video-embed-thumbnail-generator.php:3268
571
  msgid "XML configuration file:"
572
  msgstr "Archivo de configuración XML:"
573
 
574
+ #: video-embed-thumbnail-generator.php:3269
575
  msgid "Video skin file:"
576
  msgstr "Archivo de máscara de vídeo:"
577
 
578
+ #: video-embed-thumbnail-generator.php:3270
579
  msgid "Video stream type:"
580
  msgstr "Tipo de stream de video:"
581
 
582
+ #: video-embed-thumbnail-generator.php:3271
583
  msgid "Video scale mode:"
584
  msgstr "Modo de escala de vídeo:"
585
 
586
+ #: video-embed-thumbnail-generator.php:3272
587
  msgid "Autohide:"
588
  msgstr "Ocultar automáticamente:"
589
 
590
+ #: video-embed-thumbnail-generator.php:3273
591
  msgid "Play button overlay:"
592
  msgstr "Superposición del Botón de reproducción:"
593
 
594
+ #: video-embed-thumbnail-generator.php:3275
595
  msgid "Default number of thumbnails to generate:"
596
  msgstr "Número predeterminado de miniaturas para generar:"
597
 
598
+ #: video-embed-thumbnail-generator.php:3276
599
  msgid "User capabilities:"
600
  msgstr "Capacidades de los usuarios:"
601
 
602
+ #: video-embed-thumbnail-generator.php:3277
603
  msgid "Video security:"
604
  msgstr "Seguridad del vídeo:"
605
 
606
+ #: video-embed-thumbnail-generator.php:3278
607
  msgid "Featured image:"
608
  msgstr "Imagen destacada:"
609
 
610
+ #: video-embed-thumbnail-generator.php:3279
611
  msgid "Attach thumbnails to:"
612
  msgstr "Adjuntar miniaturas a:"
613
 
614
+ #: video-embed-thumbnail-generator.php:3280
615
  msgid "Delete associated attachments:"
616
  msgstr "Eliminar archivos adjuntos asociados:"
617
 
618
+ #: video-embed-thumbnail-generator.php:3281
619
  msgid "Video title text HTML formatting:"
620
  msgstr "Formato HTML del texto de título de vídeo:"
621
 
622
+ #: video-embed-thumbnail-generator.php:3282
623
  msgid "Attachment page design:"
624
  msgstr "Visualización de la plantilla adjuntos:"
625
 
626
+ #: video-embed-thumbnail-generator.php:3285
627
  msgid "Path to applications folder on server:"
628
  msgstr "Ruta a la carpeta de aplicaciones en el servidor:"
629
 
630
+ #: video-embed-thumbnail-generator.php:3289
 
 
 
 
631
  msgid "Enable in-browser thumbnails:"
632
  msgstr "Activar miniaturas en el navegador:"
633
 
634
+ #: video-embed-thumbnail-generator.php:3290
635
  msgid "Default video encode formats:"
636
  msgstr "Formatos de codificación de vídeo por defecto:"
637
 
638
+ #: video-embed-thumbnail-generator.php:3291
639
  msgid "Do automatically on upload:"
640
  msgstr "Realice automáticamente al cargar:"
641
 
642
+ #: video-embed-thumbnail-generator.php:3292
643
  msgid "For previously uploaded videos:"
644
  msgstr "Para vídeos subidos anteriormente:"
645
 
646
+ #: video-embed-thumbnail-generator.php:3293
647
  msgid "htaccess login:"
648
  msgstr "Inicio de sesión htaccess:"
649
 
650
+ #: video-embed-thumbnail-generator.php:3294
651
  msgid "Add watermark to encoded files:"
652
  msgstr "Añadir marca de agua a los archivos codificados:"
653
 
654
+ #: video-embed-thumbnail-generator.php:3298
 
 
 
 
 
655
  msgid "Encode quality control method:"
656
  msgstr "Método de control de calidad de codificación:"
657
 
658
+ #: video-embed-thumbnail-generator.php:3299
659
  msgid "Constant Rate Factors (CRF):"
660
  msgstr "Factores constantes de tasa (CRF):"
661
 
662
+ #: video-embed-thumbnail-generator.php:3300
663
  msgid "Average Bit Rate:"
664
  msgstr "Tasa de bits promedio:"
665
 
666
+ #: video-embed-thumbnail-generator.php:3301
667
  msgid "H.264 profile:"
668
  msgstr "perfil H.264:"
669
 
670
+ #: video-embed-thumbnail-generator.php:3302
671
  msgid "Audio bit rate:"
672
  msgstr "Tasa de bits de audio:"
673
 
674
+ #: video-embed-thumbnail-generator.php:3306
675
+ msgctxt "program execution options"
 
 
 
676
  msgid "Execution:"
677
  msgstr "Ejecución:"
678
 
679
+ #: video-embed-thumbnail-generator.php:3309
680
  msgid "Test FFMPEG:"
681
  msgstr "Prueba FFMPEG:"
682
 
683
+ #: video-embed-thumbnail-generator.php:3331 video-embed-thumbnail-generator.php:4825
 
684
  msgid "WordPress Default"
685
  msgstr "WordPress por defecto"
686
 
687
+ #: video-embed-thumbnail-generator.php:3353
688
  msgid "(deprecated)"
689
  msgstr "( desuso)"
690
 
691
+ #: video-embed-thumbnail-generator.php:3355
692
  msgid "Video player:"
693
  msgstr "Reproductor de vídeo:"
694
 
695
+ #: video-embed-thumbnail-generator.php:3360
696
  msgid ""
697
+ "Video.js is the default player. Users running WordPress 3.6 or higher can choose the WordPress "
698
+ "Default Mediaelement.js player which may already be skinned to match your theme. If the JW "
699
+ "Player WordPress plugin is active it should be available as a video player. In the past this "
700
+ "plugin used Adobe's Strobe Media Playback Flash player, which hasn't been updated since 2011 and "
701
+ "is not recommended. It should still work, but new plugin functions are not guaranteed to be "
702
+ "compatible."
703
+ msgstr ""
704
+ "Video.js es el reproductor predeterminado. Los usuarios que ejecutan WordPress 3.6 o superior "
705
+ "pueden elegir el reproductor Mediaelement.js WordPress por defecto que puede ya tener una piel "
706
+ "para que coincida con su tema. Si el plugin JW Player WordPress está activo debe estar "
707
+ "disponible como un reproductor de vídeo. En el pasado este plugin utilizaba el reproductor "
708
+ "Adobe's Strobe Media Playback Flash, que no ha sido actualizado desde 2011 y no se recomienda. "
709
+ "Aún debería funcionar, pero las nuevas funciones del plugin no se garantiza que sea compatible."
710
+
711
+ #: video-embed-thumbnail-generator.php:3364
 
 
 
712
  msgid "Overlay video title"
713
+ msgstr "Título de vídeo sobrepuesto"
714
 
715
+ #: video-embed-thumbnail-generator.php:3365
716
  msgid "Overlay embed code"
717
+ msgstr "Código de incrustación sobrepuesto"
718
 
719
+ #: video-embed-thumbnail-generator.php:3368
720
  msgid "Show download link"
721
  msgstr "Mostrar enlace de descarga"
722
 
723
+ #: video-embed-thumbnail-generator.php:3369
724
  msgid "Show view count"
725
+ msgstr "Mostrar contador de reproducciones"
726
 
727
+ #: video-embed-thumbnail-generator.php:3377 video-embed-thumbnail-generator.php:4777
 
728
  msgid "Choose a Thumbnail"
729
  msgstr "Elija una miniatura"
730
 
731
+ #: video-embed-thumbnail-generator.php:3377 video-embed-thumbnail-generator.php:4777
 
732
  msgid "Set as video thumbnail"
733
  msgstr "Establecer como miniatura de vídeo"
734
 
735
+ #: video-embed-thumbnail-generator.php:3382
736
  msgid "Display thumbnail image again when video ends."
737
  msgstr "Mostrar la miniatura de nuevo cuando el vídeo termina."
738
 
739
+ #: video-embed-thumbnail-generator.php:3383
740
  msgid "Choose End of Video Image"
741
  msgstr "Elija imagen de fin de vídeo"
742
 
743
+ #: video-embed-thumbnail-generator.php:3383
744
  msgid "Set as end of video image"
745
  msgstr "Establecer como miniatura de vídeo"
746
 
747
+ #: video-embed-thumbnail-generator.php:3384
748
  msgid "Display alternate image when video ends."
749
  msgstr "Mostrar la miniatura de nuevo cuando el vídeo termina."
750
 
751
+ #: video-embed-thumbnail-generator.php:3389
752
+ msgid "Image:"
753
+ msgstr "Imagen:"
754
+
755
+ #: video-embed-thumbnail-generator.php:3389 video-embed-thumbnail-generator.php:3826
756
  msgid "Choose a Watermark"
757
  msgstr "elegir una Marca de Agua"
758
 
759
+ #: video-embed-thumbnail-generator.php:3389 video-embed-thumbnail-generator.php:3826
 
760
  msgid "Set as watermark"
761
  msgstr "conjuntocomo marca de agua"
762
 
763
+ #: video-embed-thumbnail-generator.php:3390
764
+ msgid "Link to:"
765
+ msgstr "Enlazar a:"
766
+
767
+ #: video-embed-thumbnail-generator.php:3392
768
+ msgid "Home page"
769
+ msgstr "Pagina de inicio"
770
+
771
+ #: video-embed-thumbnail-generator.php:3393
772
+ msgid "Parent post"
773
+ msgstr "Vídeo padre"
774
+
775
+ #: video-embed-thumbnail-generator.php:3394
776
+ msgid "Video attachment page"
777
+ msgstr "Página de adjunto del vídeo"
778
+
779
+ #: video-embed-thumbnail-generator.php:3395
780
+ msgid "Download video"
781
+ msgstr "Descargar vídeo"
782
+
783
+ #: video-embed-thumbnail-generator.php:3396
784
+ msgid "Custom URL"
785
+ msgstr "URL personalizada"
786
+
787
+ #: video-embed-thumbnail-generator.php:3397
788
+ msgid "None"
789
+ msgstr "Ninguno"
790
+
791
+ #: video-embed-thumbnail-generator.php:3416 video-embed-thumbnail-generator.php:3828
792
  msgid "left"
793
  msgstr "izquierda"
794
 
795
+ #: video-embed-thumbnail-generator.php:3416
 
 
796
  msgid "center"
797
  msgstr "Centro"
798
 
799
+ #: video-embed-thumbnail-generator.php:3416 video-embed-thumbnail-generator.php:3828
 
800
  msgid "right"
801
  msgstr "Derecha"
802
 
803
+ #: video-embed-thumbnail-generator.php:3427
804
  msgid "Make video player responsive."
805
+ msgstr "Haga respondido el reproductor de vídeo"
806
+
807
+ #: video-embed-thumbnail-generator.php:3428
808
+ msgid "automatic"
809
+ msgstr "automático"
810
 
811
+ #: video-embed-thumbnail-generator.php:3428
812
+ msgid "highest"
813
+ msgstr "más alto"
814
+
815
+ #: video-embed-thumbnail-generator.php:3428
816
+ msgid "lowest"
817
+ msgstr "más bajo"
818
+
819
+ #: video-embed-thumbnail-generator.php:3429
820
+ msgid "Default playback resolution"
821
+ msgstr "Resolución por defecto de reproducción"
822
+
823
+ #: video-embed-thumbnail-generator.php:3434
824
+ msgid ""
825
+ "If multiple H.264 resolutions for a video are available, you can choose to load the highest or "
826
+ "lowest available resolution by default, or automatically select the resolution based on the size "
827
+ "of the video window."
828
  msgstr ""
829
+ "Si están disponibles múltiples resoluciones para vídeo H264, puede elegir cargar la resolución "
830
+ "mas alta o la mas baja por defecto, o seleccionar automáticamente lar resolución basándose en el "
831
+ "tamaño de la ventana de vídeo."
832
 
833
+ #: video-embed-thumbnail-generator.php:3440
834
  msgid "Allow other content on the same line as the video."
835
  msgstr "Permitir otros contenidos en la misma línea que el video"
836
 
837
+ #: video-embed-thumbnail-generator.php:3445 video-embed-thumbnail-generator.php:4786
838
+ #: video-embed-thumbnail-generator.php:5386
 
839
  msgid "Width:"
840
  msgstr "Ancho:"
841
 
842
+ #: video-embed-thumbnail-generator.php:3445 video-embed-thumbnail-generator.php:4786
843
+ #: video-embed-thumbnail-generator.php:5386
 
844
  msgid "Height:"
845
  msgstr "Altura:"
846
 
847
+ #: video-embed-thumbnail-generator.php:3446
848
  msgid "Enlarge lower resolution videos to max width."
849
  msgstr "Ampliar vídeos de baja resolución al ancho máximo."
850
 
851
+ #: video-embed-thumbnail-generator.php:3446
852
  msgid ""
853
+ "Usually if a video's resolution is less than the max width, the video player is set to the "
854
+ "actual width of the video. Enabling this will always set the same width regardless of the "
855
+ "quality of the video. When necessary you can override by setting the dimensions manually."
 
856
  msgstr ""
857
+ "Por lo general, si una resolución de vídeo es menor que el ancho máximo, el reproductor de "
858
+ "vídeo está ajustado a la anchura real del vídeo. Al habilitar esto siempre se establece la misma "
859
+ "anchura, independientemente de la calidad del vídeo. Cuando es necesario, puede anular ajustando "
860
+ "las dimensiones de forma manual."
 
861
 
862
+ #: video-embed-thumbnail-generator.php:3447
863
  msgid "Set all videos to expand to fill their containers."
864
  msgstr "Los vídeos se expanden para rellenar sus contenedores."
865
 
866
+ #: video-embed-thumbnail-generator.php:3447
867
  msgid ""
868
+ "Enabling this will ignore any other width settings and set the width of the video to the width "
869
+ "of the container it's in."
870
  msgstr ""
871
+ "Habilitando esto se ignorará cualquier otra configuración de ancho y se establecerá el ancho del "
872
+ "video al de su contenedor."
873
 
874
+ #: video-embed-thumbnail-generator.php:3452
875
+ msgid "Maximum popup width:"
876
+ msgstr "Ancho máximo de la ventana emergente:"
877
+
878
+ #: video-embed-thumbnail-generator.php:3453
879
+ msgid "Thumbnail width:"
880
+ msgstr "Ancho de la miniatura:"
881
+
882
+ #: video-embed-thumbnail-generator.php:3457
883
  msgid "Stop, but leave popup window open"
884
  msgstr "Parar, pero dejar la ventana emergente abierta"
885
 
886
+ #: video-embed-thumbnail-generator.php:3458
887
  msgid "Autoplay next video in the gallery"
888
  msgstr "Reproduce automáticamente el siguiente vídeo de la galería"
889
 
890
+ #: video-embed-thumbnail-generator.php:3459
891
  msgid "Close popup window"
892
  msgstr "Cerrar la ventana emergente"
893
 
894
+ #: video-embed-thumbnail-generator.php:3466
895
+ msgid "Paginate video galleries."
896
+ msgstr "Paginar las galerías de vídeo."
897
+
898
+ #: video-embed-thumbnail-generator.php:3469
899
+ msgid "videos per gallery page."
900
+ msgstr "vídeos por página de la galería."
901
+
902
+ #: video-embed-thumbnail-generator.php:3470
903
+ msgid "Show video title overlay on thumbnails."
904
+ msgstr "Mostrar el título del vídeo sobrepuesto en las miniaturas."
905
+
906
+ #: video-embed-thumbnail-generator.php:3477
907
  msgid "docked"
908
  msgstr "Atracado"
909
 
910
+ #: video-embed-thumbnail-generator.php:3478
911
  msgid "floating"
912
  msgstr "Flotante"
913
 
914
+ #: video-embed-thumbnail-generator.php:3479 video-embed-thumbnail-generator.php:3519
915
+ #: video-embed-thumbnail-generator.php:3572 video-embed-thumbnail-generator.php:3669
916
+ #: video-embed-thumbnail-generator.php:3857
 
 
917
  msgid "none"
918
+ msgstr "ninguno"
919
 
920
+ #: video-embed-thumbnail-generator.php:3490
921
  msgid "Play automatically when page loads."
922
  msgstr "Reproducir automáticamente cuando se carga la página."
923
 
924
+ #: video-embed-thumbnail-generator.php:3495
925
  msgid "Loop to beginning when video ends."
926
  msgstr "Bucle al inicio cuando termina el video."
927
 
928
+ #: video-embed-thumbnail-generator.php:3503
929
  #, php-format
930
+ msgctxt "a list of percentages. eg: 15%"
931
  msgid "%d%%"
932
  msgstr "%d%%"
933
 
934
+ #: video-embed-thumbnail-generator.php:3510
935
  msgid "Mute"
936
  msgstr "Quitar sonido"
937
 
938
+ #: video-embed-thumbnail-generator.php:3517
939
  msgid "metadata"
940
  msgstr "metadato"
941
 
942
+ #: video-embed-thumbnail-generator.php:3518
943
  msgid "auto"
944
  msgstr "auto"
945
 
946
+ #: video-embed-thumbnail-generator.php:3525
947
+ msgctxt "Suggest not translating the words in quotation marks"
948
  msgid ""
949
+ "Controls how much of a video to load before the user starts playback. Mobile browsers never "
950
+ "preload any video information. Selecting \"metadata\" will load the height and width and format "
951
+ "information along with a few seconds of the video in some desktop browsers. \"Auto\" will "
952
+ "preload nearly a minute of video in most desktop browsers. \"None\" will prevent all data from "
 
953
  "preloading."
954
  msgstr ""
955
+ "Controla cuanto se recarga de un vídeo antes comenzar la reproducción. Los navegadores móviles "
956
+ "nuca precargan ninguna información de vídeo. Seleccionando \"medatados\" cargará información de "
957
+ "dimensiones y formato en algunos navegadores de escritorio. \"auto\" preparará aproximadamente "
958
+ "un minuto en la mayoría de navegadores de escritorio. \"ninguno\" no preparará nada."
959
+
960
+ #: video-embed-thumbnail-generator.php:3530
 
 
961
  #, php-format
962
+ msgid "Use %s for a nice, circular play button. Leave blank for the default square play button."
 
 
963
  msgstr ""
964
+ "Utilice %s para un botón bonito, circular para reproducir. Dejar en blanco para el botón "
965
+ "predeterminado cuadrado."
966
 
967
+ #: video-embed-thumbnail-generator.php:3530
968
  msgid "Or build your own CSS skin."
969
  msgstr "O construir su propia piel CSS."
970
 
971
+ #: video-embed-thumbnail-generator.php:3535
972
  #, php-format
973
  msgid "Space-separated list to add to all videos. Example: %s"
974
+ msgstr "Lista separada por espacios para añadir a todos los vídeos. Ejemplo: %s"
 
975
 
976
+ #: video-embed-thumbnail-generator.php:3550
977
  #, php-format
978
  msgid "Use %s for a modern, circular play button."
979
  msgstr "Utilice %s para un botón moderno, circular para reproducir."
980
 
981
+ #: video-embed-thumbnail-generator.php:3550
982
  msgid "Leave blank for the off-center square play button."
983
  msgstr "Dejar en blanco para el botón no centrado para reproducir."
984
 
985
+ #: video-embed-thumbnail-generator.php:3556
986
  msgid "liveOrRecorded"
987
+ msgstr "directoOGrabado"
988
 
989
+ #: video-embed-thumbnail-generator.php:3557
990
  msgid "live"
991
+ msgstr "directo"
992
 
993
+ #: video-embed-thumbnail-generator.php:3558
994
  msgid "recorded"
995
  msgstr "grabado"
996
 
997
+ #: video-embed-thumbnail-generator.php:3559
998
  msgid "dvr"
999
  msgstr "dvr"
1000
 
1001
+ #: video-embed-thumbnail-generator.php:3571
1002
  msgid "letterbox"
1003
  msgstr "Buzón"
1004
 
1005
+ #: video-embed-thumbnail-generator.php:3573
1006
  msgid "stretch"
1007
  msgstr "Estirar"
1008
 
1009
+ #: video-embed-thumbnail-generator.php:3574
1010
  msgid "zoom"
1011
  msgstr "Acercar"
1012
 
1013
+ #: video-embed-thumbnail-generator.php:3586
1014
  msgid "Autohide controlbar."
1015
  msgstr "Ocultar automáticamente barra de control."
1016
 
1017
+ #: video-embed-thumbnail-generator.php:3591
1018
  msgid "Overlay play button on poster frame."
1019
  msgstr "Botón de reproducción en el marco del cartel."
1020
 
1021
+ #: video-embed-thumbnail-generator.php:3603
1022
  msgid "Can make thumbnails"
1023
  msgstr "Puede hacer miniaturas"
1024
 
1025
+ #: video-embed-thumbnail-generator.php:3603
1026
  msgid "Can encode videos"
1027
  msgstr "Puede codificar videos"
1028
 
1029
+ #: video-embed-thumbnail-generator.php:3603
1030
  msgid "Can view & modify other users encode queue"
1031
  msgstr "Puede ver y modificar la cola de codificación de otros usuarios"
1032
 
1033
+ #: video-embed-thumbnail-generator.php:3643
1034
  msgid "Allow users to embed your videos on other sites."
1035
  msgstr "Permitir a los usuarios incrustar sus videos en otros sitios."
1036
 
1037
+ #: video-embed-thumbnail-generator.php:3644
1038
+ msgctxt "\"Open Graph\" is a proper noun and might not need translation"
1039
  msgid "Enable Open Graph video tags"
1040
+ msgstr "Permite etiquetas de vídeo Open Grapa"
1041
 
1042
+ #: video-embed-thumbnail-generator.php:3644
1043
  msgid ""
1044
+ "Facebook and some other social media sites will use these tags to embed the first video in your "
1045
+ "post. For the majority of Facebook users who have enabled secure browsing, your video must be "
1046
+ "served via https in order to be embedded directly on the page."
 
1047
  msgstr ""
1048
+ "Facebook y otros sitios de medios sociales van a usar las siguientes etiquetas para incrustar el "
1049
+ "primer video en tu mensaje. Para la mayoría de usuarios de Facebook que han habilitado "
1050
+ "navegación segura, el vídeo debe ser servido a través de https para ser incorporado directamente "
1051
+ "en la página."
1052
+
1053
+ #: video-embed-thumbnail-generator.php:3645
1054
+ msgctxt "\"oEmbed\" is a proper noun and might not need translation"
1055
+ msgid "Enable oEmbed provider"
1056
+ msgstr "Permite oEmbed"
1057
 
1058
+ #: video-embed-thumbnail-generator.php:3645
1059
+ msgid ""
1060
+ "Allows users of other websites to embed your videos using just the post URL rather than the full "
1061
+ "iframe embed code. For security reasons, this will not work on other WordPress sites unless "
1062
+ "they've enabled oEmbed discovery from unkown providers."
1063
+ msgstr ""
1064
+ "Permite a otros sitios web incrustar sus vídeos usando la URL del mismo en lugar del código de "
1065
+ "incrustración en iframe. Por razones de seguridad, esto no funcionará en otros sitios con "
1066
+ "WordPress, a menos que permitan descubrimiento oEmbed desde proveedores desconocidos."
1067
+
1068
+ #: video-embed-thumbnail-generator.php:3646
1069
+ msgctxt "\"oEmbed\" is a proper noun and might not need translation"
1070
+ msgid "Enable oEmbeds from unknown providers"
1071
+ msgstr "Permite oEmbed desde proveedores desconocidos"
1072
+
1073
+ #: video-embed-thumbnail-generator.php:3646
1074
+ msgid ""
1075
+ "Allows your own users to embed content from any oEmbed provider. User must have the "
1076
+ "\"unfiltered_html\" capability which is limited to Administrators and Editors by default."
1077
+ msgstr ""
1078
+ "Permite a sus usuarios incrustar contenido desde cualquier proveedor oEmbed. El usuario debe "
1079
+ "tener la capacidad \"unfiltered_html\" la cual está limitada a Administradores y editores por "
1080
+ "defecto."
1081
+
1082
+ #: video-embed-thumbnail-generator.php:3647
1083
  msgid "Allow right-clicking on videos."
1084
  msgstr "Permitir clic derecho sobre los vídeos."
1085
 
1086
+ #: video-embed-thumbnail-generator.php:3647
1087
  msgid ""
1088
+ "We can't prevent a user from simply saving the downloaded video file from the browser's cache, "
1089
+ "but disabling right-clicking will make it more difficult for casual users to save your videos."
 
1090
  msgstr ""
1091
+ "No podemos evitar que un usuario simplemente guarde el archivo de vídeo descargado desde la "
1092
+ "caché del navegador, pero desactivando el botón derecho hará que sea más difícil para los "
1093
+ "usuarios ocasionales guardar sus videos."
1094
 
1095
+ #: video-embed-thumbnail-generator.php:3652
1096
  msgid "Set generated video thumbnails as featured images."
1097
  msgstr "Establecer miniaturas de vídeo generadas como imágenes destacadas."
1098
 
1099
+ #: video-embed-thumbnail-generator.php:3652
1100
  msgid ""
1101
+ "If your theme uses the featured image meta tag, this will automatically set a video's parent "
1102
+ "post's featured image to the most recently saved thumbnail image."
 
1103
  msgstr ""
1104
+ "Si el tema utiliza la etiqueta meta de la imagen destacada, esto establecerá automáticamente "
1105
+ "después la imagen destacada de una publicación padre de un vídeo a la miniatura guardada más "
1106
+ "recientemente."
1107
 
1108
+ #: video-embed-thumbnail-generator.php:3652
1109
+ msgctxt "implied \"Set all thumbnails as featured\""
1110
  msgid "Set all as featured"
1111
+ msgstr "Establecer todas como destacadas"
1112
 
1113
+ #: video-embed-thumbnail-generator.php:3652
1114
  msgid ""
1115
+ "If you've generated thumbnails before enabling this option, this will set all existing "
1116
+ "thumbnails as featured images. Be careful!"
1117
  msgstr ""
1118
+ "Si usted ha generado miniaturas antes de habilitar esta opción, esto hará que todas las "
1119
+ "miniaturas existentes se establezcan como imágenes destacadas. ¡Tenga cuidado!"
 
1120
 
1121
+ #: video-embed-thumbnail-generator.php:3663
1122
  msgid ""
1123
+ "This depends on your theme. Thumbnails generated by the plugin can be saved as children of the "
1124
+ "video attachment or the post. Some themes use an image attached to a post instead of the built-"
1125
+ "in featured image meta tag. Version 3.x of this plugin saved all thumbnails as children of the "
1126
+ "video."
1127
  msgstr ""
1128
+ "Esto depende de su tema. Miniaturas generadas por el plugin se pueden guardar como hijos del "
1129
+ "adjunto de video o en la publicación. Algunos temas usan una imagen adjunta a un mensaje en "
1130
+ "lugar de la etiqueta meta de la imagen destacada incorporada. La Versión 3.x de este plugin "
1131
+ "guardaba todas las miniaturas como hijos del vídeo."
 
1132
 
1133
+ #: video-embed-thumbnail-generator.php:3663
1134
  msgid "Set all parents"
1135
  msgstr "Establecer todos los padres"
1136
 
1137
+ #: video-embed-thumbnail-generator.php:3663
1138
  msgid ""
1139
+ "If you've generated thumbnails before changing this option, this will set all existing "
1140
+ "thumbnails as children of your currently selected option."
1141
  msgstr ""
1142
+ "Si usted ha generado miniaturas antes de cambiar esta opción, esto establecerá todas las "
1143
+ "miniaturas existentes como hijas de la opción seleccionada actualmente."
 
1144
 
1145
+ #: video-embed-thumbnail-generator.php:3670
1146
  msgid "all"
1147
  msgstr "todo"
1148
 
1149
+ #: video-embed-thumbnail-generator.php:3671
1150
  msgid "encoded videos only"
1151
  msgstr "solo videos codificados"
1152
 
1153
+ #: video-embed-thumbnail-generator.php:3677
1154
  msgid ""
1155
+ "If you delete the original video you can choose to delete all associated attachments (thumbnails "
1156
+ "& videos) or keep the thumbnail."
1157
  msgstr ""
1158
+ "Si elimina el vídeo original usted puede optar por eliminar todos los archivos adjuntos "
1159
+ "asociados (miniaturas y videos) o mantener la vista en miniatura."
 
1160
 
1161
+ #: video-embed-thumbnail-generator.php:3682
1162
  #, php-format
1163
  msgid ""
1164
+ "HTML tag applied to titles inserted above the video. Examples: %s. Corresponding closing tags "
1165
+ "will be applied to the end of the title automatically."
 
1166
  msgstr ""
1167
+ "Etiqueta HTML aplicada a títulos insertados por encima del vídeo. Ejemplos: %s. Las etiquetas de "
1168
+ "cierre correspondientes se aplicarán al final del título de forma automática."
 
1169
 
1170
+ #: video-embed-thumbnail-generator.php:3687
1171
  msgid "Match plugin settings"
1172
  msgstr "Ajustar la configuración del plugin"
1173
 
1174
+ #: video-embed-thumbnail-generator.php:3687
1175
  msgid "WordPress default"
1176
  msgstr "Por defecto de WordPress "
1177
 
1178
+ #: video-embed-thumbnail-generator.php:3687
1179
  msgid "Video only (deprecated)"
1180
  msgstr "Sólo Video (obsoleto)"
1181
 
1182
+ #: video-embed-thumbnail-generator.php:3693
1183
  msgid ""
1184
+ "The plugin can filter your media attachment page to display videos using your chosen settings, "
1185
+ "or completely replace your attachment template to show only the video. If you were one of the "
1186
+ "few people using iframe embed codes before version 4.0 of this plugin then you should continue "
1187
+ "to use \"Video only\" but otherwise it's not recommended."
1188
+ msgstr ""
1189
+ "El plugin puede filtrar su página de adjuntos de medios de comunicación para mostrar videos "
1190
+ "utilizando la configuración seleccionada, o reemplazar completamente la plantilla de adjuntos "
1191
+ "para mostrar sólo el video. Si usted es una de las pocas personas que utilizaban códigos dentro "
1192
+ "de un iframe antes de la versión 4.0 de este plugin, entonces usted debe seguir usando \"Video "
1193
+ "solamente\" pero no se recomienda utilizarlo de otra forma."
1194
+
1195
+ #: video-embed-thumbnail-generator.php:3707
 
 
1196
  #, php-format
1197
  msgid ""
1198
+ "This should be the folder where applications are installed on your server, not a direct path to "
1199
+ "an application, so it doesn't usually end with %1$s. Example: %2$s."
 
1200
  msgstr ""
1201
+ "Esto debería ser la carpeta donde las aplicaciones se instalan en el servidor, no un camino "
1202
+ "directo a una aplicación, por lo que no suelen acabar con %1$s. Ejemplo: %2$s"
 
1203
 
1204
+ #: video-embed-thumbnail-generator.php:3719
1205
  msgid ""
1206
+ "FFMPEG split into two separate branches in 2011. The new branch is called LIBAV and executes "
1207
+ "using \"avconv\" instead of \"ffmpeg.\" Both are still actively developed and FFMPEG frequently "
1208
+ "incorporates LIBAV features. Debian & Ubuntu users probably have LIBAV installed."
 
1209
  msgstr ""
1210
+ "FFMPEG se divide en dos ramas separadas en 2011. La nueva rama se llama LIBAV y se ejecuta "
1211
+ "usando \"avconv\" en vez de \"ffmpeg.\" Ambos aún se están desarrollando activamente y FFMPEG "
1212
+ "con frecuencia incorpora características LIBAV. Los usuarios de Debian y Ubuntu, probablemente "
1213
+ "tienen LIBAV instalado."
 
1214
 
1215
+ #: video-embed-thumbnail-generator.php:3725
1216
  #, php-format
1217
  msgid ""
1218
+ "When possible, use the browser's built-in video capabilities to make thumbnails instead of %s."
 
1219
  msgstr ""
1220
+ "Cuando sea posible, utilice las capacidades de vídeo integradas de su navegador para hacer "
1221
+ "miniaturas en lugar de %s."
1222
+
1223
+ #: video-embed-thumbnail-generator.php:3736 video-embed-thumbnail-generator.php:4008
1224
+ msgid "Custom"
1225
+ msgstr "Personalizado"
1226
 
1227
+ #: video-embed-thumbnail-generator.php:3739
1228
  msgid "Replace original with"
1229
  msgstr "Reemplazar el original con"
1230
 
1231
+ #: video-embed-thumbnail-generator.php:3749
1232
  msgid ""
1233
+ "If you have FFMPEG/LIBAV and the proper libraries installed, you can choose to replace your "
1234
+ "uploaded video with your preferred format, and also transcode into as many as seven additional "
1235
+ "formats depending on the resolution of your original source. Different browsers have different "
1236
+ "playback capabilities. Most desktop browsers can play H.264, and all modern mobile devices can "
1237
+ "play at least 360p H.264. If you create multiple H.264 resolutions, the highest resolution "
1238
+ "supported by the device will be served up automatically. The plugin will not upconvert your "
1239
+ "video, so if you upload a 720p video, it will not waste your time creating a 1080p version. "
1240
+ "There was a time when it seemed like a good idea to provide OGV or WEBM for some desktop "
1241
+ "browsers, but even Firefox allows H.264 playback on most operating systems now. I no longer "
1242
+ "recommend encoding OGV or WEBM unless you expect a large number of no-Flash sticklers visiting "
1243
+ "your site. WEBM VP9 is a new technology and requires a version of FFMPEG or LIBAV newer than "
1244
+ "October 2013."
1245
+ msgstr ""
1246
+ "Si tiene FFMPEG/LIBAV y sus librerías instaladas, puede seleccionar reemplazar el vídeo subido "
1247
+ "por su formato preferido, e incluso transcodificarlo en hasta siete formatos adicionales "
1248
+ "dependiendo de la resolución del original. Los navegadores web tienen diferentes capacidades de "
1249
+ "reproducción. La mayoría de navegadores puede reproducir H.264, y todos los dispositivos móviles "
1250
+ "modernos puede reproducir al menos 360p H.264. Si crea múltiples resoluciones en H.264, ser "
1251
+ "servirá automáticamente la más alta que soporte el dispositivo. Este plugin no aumenta la "
1252
+ "resolución de su vídeo, por tanto si sube un vídeo de 720p, no perderá tiempo creando una "
1253
+ "versión de 1080p. Hubo un momento en el que parecía buena idea proveer formatos OGV o WEBM para "
1254
+ "algunos navegadores de escritorio, pero incluso Firefox permite reproducir H.264 en la mayoría "
1255
+ "de dispositivos ahora. No se recomienda codificar OGV o WEBM a menos que espere un gran número "
1256
+ "de visitas sin Flash a su sitio. WEBM VP9 es una nueva tecnología y requiere una versión de "
1257
+ "FFMPEG o LIBAV posterior a Octubre de 2013."
1258
+
1259
+ #: video-embed-thumbnail-generator.php:3750
1260
+ msgid "(iPhone 4s+, iPad 2+, modern Android, Windows Phone 8, Chrome, Safari, IE 9+, Firefox)"
1261
+ msgstr "(iPhone 4s+, iPad 2+, modern Android, Windows Phone 8, Chrome, Safari, IE 9+, Firefox)"
1262
+
1263
+ #: video-embed-thumbnail-generator.php:3751
1264
+ msgid "(iPhone 4+, iPad, most Android, Chrome, Safari, IE 9+, Firefox)"
1265
+ msgstr "(iPhone 4+, iPad, most Android, Chrome, Safari, IE 9+, Firefox)"
1266
+
1267
+ #: video-embed-thumbnail-generator.php:3782
 
 
 
 
 
 
 
 
 
1268
  #, php-format
1269
  msgid "Generate %1$s thumbnail from %2$s%% of the way through the video."
1270
  msgid_plural "Generate %1$s thumbnails and set #%2$s as the main image."
1271
+ msgstr[0] "Generar %1$s miniatura desde %2$s%% sobre la marcha a través del vídeo."
1272
+ msgstr[1] "Generar %1$s miniaturas desde %2$s%% sobre la marcha a través del vídeo."
 
 
1273
 
1274
+ #: video-embed-thumbnail-generator.php:3790
1275
  msgid "Encode formats selected above."
1276
  msgstr "Formatos de codificación seleccionados arriba"
1277
 
1278
+ #: video-embed-thumbnail-generator.php:3810
1279
  msgid "Generate thumbnails"
1280
  msgstr "Generar miniaturas"
1281
 
1282
+ #: video-embed-thumbnail-generator.php:3810
1283
  #, php-format
1284
  msgid ""
1285
+ "Use %s to automatically generate thumbnails for every video in the Media Library that doesn't "
1286
+ "already have them. Uses the automatic thumbnail settings above. This could take a very long time "
1287
+ "if you have a lot of videos. Proceed with caution!"
 
1288
  msgstr ""
1289
+ "Usar %s para automáticamente generar miniaturas para cada vídeo de la Librería de Medios que no "
1290
+ "la tenga previamente. Utiliza la configuración de miniaturas automáticas de más arriba. Este "
1291
+ "procesos puede tardar bastante tiempo. ¡Ejecútalo con precaución!"
 
1292
 
1293
+ #: video-embed-thumbnail-generator.php:3811
1294
  msgid "Encode videos"
1295
  msgstr "Codificar vídeos"
1296
 
1297
+ #: video-embed-thumbnail-generator.php:3811
1298
  msgid ""
1299
+ "Add every video in the Media Library to the encode queue if it hasn't already been encoded. Uses "
1300
+ "the default encode formats chosen above."
1301
  msgstr ""
1302
+ "Añadir cada vídeo en la Librería de Medios a la cola de codificación si todavía no ha sido "
1303
+ "codificado. Utiliza el formato por defecto seleccionado más arriba."
 
1304
 
1305
+ #: video-embed-thumbnail-generator.php:3818
1306
  msgid "Username:"
1307
  msgstr "Nombre de Usuario:"
1308
 
1309
+ #: video-embed-thumbnail-generator.php:3819
1310
  msgid "Password:"
1311
  msgstr "Contraseña:"
1312
 
1313
+ #: video-embed-thumbnail-generator.php:3819
1314
  #, php-format
1315
+ msgid "If your videos are htaccess protected, %s will access them using these credentials."
 
 
1316
  msgstr ""
1317
+ "Si sus vídeos están protegidos por htaccess,%s accederá a ellos utilizando estas credenciales."
 
1318
 
1319
+ #: video-embed-thumbnail-generator.php:3827
1320
  #, php-format
1321
  msgid "Scale: %s%% of video covered by the watermark."
1322
  msgstr "Escala: %s%% del vídeo cubierta por la marca de agua."
1323
 
1324
+ #: video-embed-thumbnail-generator.php:3828
1325
+ msgctxt "horizontal center"
1326
+ msgid "center"
1327
+ msgstr "centrar"
1328
+
1329
+ #: video-embed-thumbnail-generator.php:3829
1330
  msgid "Horizontal align:"
1331
  msgstr "Alineación horizontal:"
1332
 
1333
+ #: video-embed-thumbnail-generator.php:3836 video-embed-thumbnail-generator.php:3846
1334
+ msgid "offset"
1335
+ msgstr "desplazamiento"
1336
+
1337
+ #: video-embed-thumbnail-generator.php:3838
1338
  msgid "Vertical align:"
1339
  msgstr "Alineación vertical"
1340
 
1341
+ #: video-embed-thumbnail-generator.php:3840
1342
  msgid "top"
1343
  msgstr "parte superior"
1344
 
1345
+ #: video-embed-thumbnail-generator.php:3840
1346
+ msgctxt "vertical center"
1347
+ msgid "center"
1348
+ msgstr "centrar"
1349
+
1350
+ #: video-embed-thumbnail-generator.php:3840
1351
  msgid "bottom"
1352
  msgstr "inferior"
1353
 
1354
+ #: video-embed-thumbnail-generator.php:3863
1355
  #, php-format
1356
  msgid ""
1357
+ "By default %1$s places moov atoms at the end of H.264 encoded files, which forces the entire "
1358
+ "file to download before playback can start and can prevent Flash players from playing them at "
1359
+ "all. Since approximately October 2012 %1$s can fix the problem at the end of the encoding "
1360
+ "process by using the option `movflags faststart`. This is the easiest and fastest way to correct "
1361
+ "the problem, but older versions of %1$s will not work if you select the movflags option. If you "
1362
+ "can't update to a new version of %1$s, select qt-faststart or MP4Box which will run after "
1363
+ "encoding is finished if they are installed on your server."
1364
+ msgstr ""
1365
+ "Por defecto %1$s coloca átomos moov al final de archivos H.264 codificados, lo que obliga a todo "
1366
+ "el archivo a descargar antes de que la reproducción se pueda iniciar y se puede evitar que los "
1367
+ "reproductores Flash los puedan re´roducir. Desde aproximadamente en Octubre de 2012 %1$s puede "
1368
+ "corregir el problema al final del proceso de codificación mediante el uso de la opción `movflags "
1369
+ "faststart`. Esta es la forma más fácil y rápida para corregir el problema, pero las versiones "
1370
+ "anteriores de %1$s no funcionarán si se selecciona la opción movflags. Si no se puede actualizar "
1371
+ "a una nueva versión de %1$s, seleccione qt-faststart o MP4Box que se ejecutarán después de que "
 
 
 
 
1372
  "la codificación termine si están instalados en su servidor."
1373
 
1374
+ #: video-embed-thumbnail-generator.php:3864
1375
+ #, php-format
1376
+ msgid "Path to %s:"
1377
+ msgstr "Ruta a %s:"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1378
 
1379
+ #: video-embed-thumbnail-generator.php:3877
1380
+ msgid ""
1381
+ "Constant Rate Factor (CRF) attempts to maintain a particular quality output for the entire video "
1382
+ "and only uses bits the encoder determines are necessary. Average Bit Rate is similar to the "
1383
+ "method used in older versions of this plugin. If CRF is selected, WEBM encoding will also use "
1384
+ "the ABR setting to set a max bit rate 25% higher than the ABR. Without a max bit rate setting "
1385
+ "WEBM files are terrible quality."
1386
+ msgstr ""
1387
+ "Constant Rate Factor (CRF) (Factor de Tasa Constante) intenta mantener una salida de calidad "
1388
+ "especial para todo el vídeo y sólo utiliza bits que el codificador determina que son necesarios. "
1389
+ "Velocidad de bits media es similar al método utilizado en las versiones anteriores de este "
1390
+ "plugin. Si se selecciona el CRF, la codificación WEBM también utilizará la configuración de ABR "
1391
+ "para establecer una tasa de bits máxima de 25% más alta que el ABR. Sin una tasa de bits máxima "
1392
+ "los archivos de configuración WEBM son de terrible calidad."
1393
+
1394
+ #: video-embed-thumbnail-generator.php:3889
1395
+ msgid "Lower values are higher quality. 18 is considered visually lossless. Default is 23."
1396
+ msgstr ""
1397
+ "Los valores más bajos son de mayor calidad. 18 se considera visualmente sin pérdidas. El valor "
1398
+ "predeterminado es 23."
1399
+
1400
+ #: video-embed-thumbnail-generator.php:3896
1401
  msgid "Lower values are higher quality. Default is 10."
1402
+ msgstr "Los valores más bajos son de mayor calidad. El valor predeterminado es 10."
 
1403
 
1404
+ #: video-embed-thumbnail-generator.php:3903
1405
  msgid "Higher values are higher quality. Default is 6."
1406
+ msgstr "Los valores más altos son de mayor calidad. El valor predeterminado es 6."
 
1407
 
1408
+ #: video-embed-thumbnail-generator.php:3915
1409
  msgid "bits per pixel."
1410
  msgstr "Bits por píxel."
1411
 
1412
+ #: video-embed-thumbnail-generator.php:3915
1413
  msgid "Default is 0.1"
1414
  msgstr "Por defecto es 0.1"
1415
 
1416
+ #: video-embed-thumbnail-generator.php:3931
1417
+ msgctxt "H.264 profile. Might not need translation"
1418
  msgid "profile"
1419
  msgstr "perfil"
1420
 
1421
+ #: video-embed-thumbnail-generator.php:3931
1422
  msgid ""
1423
+ "Lower profiles will slightly increase file sizes. This mostly depends on your need for "
1424
+ "compatability with Android devices. Main profile seems to work on recent phones, although "
1425
+ "officially Android only supports baseline. High profile is not recommended for mobile or Flash "
1426
+ "compatibility, and anything above high is designed for professional video and probably "
1427
+ "incompatible with consumer devices. Older versions of FFMPEG might ignore this setting "
 
1428
  "altogether."
1429
  msgstr ""
1430
+ "Perfiles menores aumentan ligeramente el tamaño de los archivos. Esto depende principalmente de "
1431
+ "su necesidad de compatibilidad con los dispositivos Android. Perfil principal parece funcionar "
1432
+ "en los teléfonos más recientes, aunque oficialmente Android sólo es compatible con la línea de "
1433
+ "base. Alto perfil, no se recomienda para la compatibilidad móvil o Flash, y cualquier cosa por "
1434
+ "encima de alto está diseñada para vídeo profesional y probablemente incompatible con los "
1435
+ "dispositivos de consumo. Las versiones anteriores de FFMPEG pueden ignorar esta configuración "
1436
+ "por completo."
1437
+
1438
+ #: video-embed-thumbnail-generator.php:3938
1439
+ msgctxt "H.264 level. Might not need translation"
1440
  msgid "level"
1441
  msgstr "nivel"
1442
 
1443
+ #: video-embed-thumbnail-generator.php:3938
1444
  msgid ""
1445
+ "3.0 is default. Lower levels will lower maximum bit rates and decoding complexity. This mostly "
1446
+ "depends on your need for compatability with mobile devices. Older versions of FFMPEG might "
1447
+ "ignore this setting altogether."
1448
  msgstr ""
1449
+ "3.0 es el predeterminado. Los niveles más bajos reducirán las tasas de bits máxima y la "
1450
+ "complejidad de decodificación. Esto depende principalmente de su necesidad de compatibilidad con "
1451
+ "dispositivos móviles. Las versiones anteriores de FFMPEG pueden ignorar esta configuración por "
1452
+ "completo."
1453
 
1454
+ #: video-embed-thumbnail-generator.php:3958
1455
  msgid "Enable legacy FFMPEG \"-b\" and \"-ba\" bitrate flags."
1456
+ msgstr "Habilitar banderas de bitratio FFMPEG \"b\" y \"-ba\" legacy."
1457
+
1458
+ #: video-embed-thumbnail-generator.php:3958
1459
+ msgid ""
1460
+ "Enable if your installed version of FFMPEG is old enough that you can't use the newer -b:v flags "
1461
+ "(Dreamhost users must turn this on). It may cause newer versions of FFMPEG to fail."
1462
+ msgstr ""
1463
+ "Habilitar si la versión instalada de FFMPEG es tan antigua que no puede utilizar las banderas –b:"
1464
+ "v más nuevas (usuarios Dreamhost deben habilitar esta función). Puede causar que nuevas "
1465
+ "versiones de FFMPEG fallen."
1466
 
1467
+ #: video-embed-thumbnail-generator.php:3959
1468
+ msgid "Enable legacy libx264 parameters."
1469
+ msgstr "Habilitar parámetros nativos de libx264"
1470
+
1471
+ #: video-embed-thumbnail-generator.php:3959
1472
  msgid ""
1473
+ "Enable if your installed version of FFMPEG is old enough that libx264 requires additional "
1474
+ "configuration to operate (Dreamhost users must turn this on). This should help if you can encode "
1475
+ "WEBM or OGV files but H264/Mobile files fail. It could cause newer versions of FFMPEG to fail."
1476
  msgstr ""
1477
+ "Habilitar si la versión instalada de FFMPEG es tan antigua que libx264 requiere una "
1478
+ "configuración adicional para operar (usuarios Dreamhost deben habilitar esta función). Esto "
1479
+ "debería ayudar si usted puede codificar archivos WEBM o OGV pero los archivos H264/Mobile "
1480
+ "fallan. Podría causar que nuevas versiones de ffmpeg para fallen."
1481
 
1482
+ #: video-embed-thumbnail-generator.php:3960
1483
+ msgid "Enable legacy FFMPEG rotation method."
1484
+ msgstr "Habilitar método de rotación nativo de FFMPEG"
1485
 
1486
+ #: video-embed-thumbnail-generator.php:3960
1487
  msgid ""
1488
+ "Enable if vertical videos shot on mobile devices don't rotate correctly or generate errors. If "
1489
+ "legacy libx264 paramaters are necessary, rotation won't work at all."
 
 
1490
  msgstr ""
1491
+ "Habilitar si los vídeos tomados en vertical en dispositivos móviles no rotan correctamente o "
1492
+ "generan errores. Si son necesarios los parámetros nativos de libx26, la rotación no funcionará."
 
 
 
1493
 
1494
+ #: video-embed-thumbnail-generator.php:3961
1495
  msgid "Disable stdin."
1496
  msgstr "Desactivar stdin."
1497
 
1498
+ #: video-embed-thumbnail-generator.php:3961
1499
  msgid ""
1500
+ "Turn off this checkbox if your installed version of FFMPEG is old enough that it does not "
1501
+ "recognize the nostdin flag (Dreamhost users must turn this off)."
 
1502
  msgstr ""
1503
+ "Habilitar si la versión instalada de FFMPEG es tan antigua que no reconoce la bandera nostdin "
1504
+ "(Los usuarios de Dreamhost deben deshabilitar esta función)."
 
1505
 
1506
+ #: video-embed-thumbnail-generator.php:3974
1507
  msgid "Simultaneous encodes."
1508
  msgstr "Codificaciones simultáneas."
1509
 
1510
+ #: video-embed-thumbnail-generator.php:3974
1511
  #, php-format
1512
  msgid ""
1513
+ "Increasing the number will allow %1$s to encode more than one file at a time, but may lead to "
1514
+ "%1$s monopolizing system resources."
1515
  msgstr ""
1516
+ "Aumentar el número permitirá %1$s para codificar más de un archivo a la vez, pero pueden dar "
1517
+ "lugar a %1$s monopolizando los recursos del sistema."
1518
 
1519
+ #: video-embed-thumbnail-generator.php:3981
1520
+ msgctxt "CPU threads. Might not need translating"
1521
  msgid "threads"
1522
  msgstr "hilos"
1523
 
1524
+ #: video-embed-thumbnail-generator.php:3981
1525
  #, php-format
1526
  msgid ""
1527
+ "Default is 1, which limits encoding speed but prevents encoding from using too many system "
1528
+ "resources. Selecting 0 will allow %1$s to optimize the number of threads or you can set the "
1529
+ "number manually. This may lead to %1$s monopolizing system resources."
 
1530
  msgstr ""
1531
+ "Por defecto es 1, que limita la velocidad de codificación, pero evita a la codificación utilizar "
1532
+ "demasiados recursos del sistema. Seleccionar 0 permitirá %1$s para optimizar el número de hilos "
1533
+ "o puede configurar el número manualmente. Esto puede llevar a %1$s a monopolizar los recursos "
1534
+ "del sistema"
 
1535
 
1536
+ #: video-embed-thumbnail-generator.php:3983
1537
+ msgctxt "execute program"
1538
  msgid "Run"
1539
  msgstr "Ejecutar"
1540
 
1541
+ #: video-embed-thumbnail-generator.php:3983
1542
  #, php-format
1543
+ msgid "Tells %1$s to run at a lower priority to avoid monopolizing system resources."
 
1544
  msgstr ""
1545
+ "Dice a %1$s que se ejecute con una prioridad más baja para evitar la monopolización de los "
1546
+ "recursos delsistema."
1547
 
1548
+ #: video-embed-thumbnail-generator.php:4007
1549
  msgid "Replace"
1550
  msgstr "Reemplazar"
1551
 
1552
+ #: video-embed-thumbnail-generator.php:4017
1553
  #, php-format
1554
  msgid "%1$s sample %2$s encode command"
1555
  msgstr "%1$s muestra %2$s comando de codificación"
1556
 
1557
+ #: video-embed-thumbnail-generator.php:4018
1558
  #, php-format
1559
  msgid "%s test output:"
1560
  msgstr "%s salida de prueba:"
1561
 
1562
+ #: video-embed-thumbnail-generator.php:4018
1563
  #, php-format
1564
  msgid "For help interpreting this output, %s try our Wiki page on Github"
1565
+ msgstr "Para ayudar a la interpretación de esta salida,%s, pruebe nuestra página Wiki en Github"
 
 
1566
 
1567
+ #: video-embed-thumbnail-generator.php:4226
1568
  #, php-format
1569
  msgid ""
1570
+ "%1$s is disabled in PHP settings. You can embed existing videos and make thumbnails with "
1571
+ "compatible browsers, but video encoding will not work. Contact your System Administrator to find "
1572
+ "out if you can enable %1$s."
1573
  msgstr ""
1574
+ "%1$s está deshabilitado en la configuración de PHP. Puede insertar vídeos existentes y crear las "
1575
+ "miniaturas con los navegadores compatibles, pero la codificación de vídeo no funcionará. Póngase "
1576
+ "en contacto con el administrador del sistema para averiguar si se puede habilitar %1$s."
 
1577
 
1578
+ #: video-embed-thumbnail-generator.php:4234
1579
  #, php-format
1580
  msgid ""
1581
+ "%1$s is not executing correctly at %2$s. You can embed existing videos and make thumbnails with "
1582
+ "compatible browsers, but video encoding is not possible without %1$s."
 
1583
  msgstr ""
1584
+ "%1$s no se encuentra en %2$s. Puede insertar videos existentes y hacer miniaturas con los "
1585
+ "navegadores compatibles, pero la codificación de vídeo no es posible sin %1$s."
 
1586
 
1587
+ #: video-embed-thumbnail-generator.php:4234
1588
  msgid "Error message:"
1589
  msgstr "Mensaje de error:"
1590
 
1591
+ #: video-embed-thumbnail-generator.php:4249
1592
  msgid "Video Embed & Thumbnail Generator settings reset to default values."
1593
+ msgstr "Ajustes de Video Embed & Thumbnail Generator restablecidas a valores por defecto."
 
 
1594
 
1595
+ #: video-embed-thumbnail-generator.php:4260
1596
  msgid "You must enter a value for the maximum video width."
1597
  msgstr "Debe ingresar un valor para el ancho máximo del video."
1598
 
1599
+ #: video-embed-thumbnail-generator.php:4264
1600
  msgid "You must enter a value for the maximum video height."
1601
  msgstr "Debe ingresar un valor para la altura máxima del video."
1602
 
1603
+ #: video-embed-thumbnail-generator.php:4268
1604
  msgid "You must enter a value for the maximum gallery video width."
1605
  msgstr "Debe ingresar un valor para el ancho máximo de la galería del vídeo."
1606
 
1607
+ #: video-embed-thumbnail-generator.php:4667 video-embed-thumbnail-generator.php:4882
 
 
 
 
1608
  msgid "Video Stats"
1609
  msgstr "Estadísticas Vídeo"
1610
 
1611
+ #. translators: Start refers to the number of times a video has been started
1612
+ #: video-embed-thumbnail-generator.php:4669 video-embed-thumbnail-generator.php:4895
1613
  #, php-format
1614
+ msgid "%d Start"
1615
+ msgid_plural "%d Starts"
1616
+ msgstr[0] "%d reproducción comenzada"
1617
+ msgstr[1] "%d reproducciones comenzadas"
1618
 
1619
+ #: video-embed-thumbnail-generator.php:4669 video-embed-thumbnail-generator.php:4897
1620
  #, php-format
1621
+ msgid "%d Complete View"
1622
+ msgid_plural "%d Complete Views"
1623
+ msgstr[0] "%d reproducción completa"
1624
+ msgstr[1] "%d reproducciones completas"
1625
+
1626
+ #: video-embed-thumbnail-generator.php:4669
1627
+ msgid "Video ID:"
1628
+ msgstr "ID de Vídeo:"
1629
+
1630
+ #: video-embed-thumbnail-generator.php:4698
1631
+ #, php-format
1632
+ msgid "%1$s not found at %2$s and unable to load video in browser for thumbnail generation."
1633
  msgstr ""
1634
+ "%1$s no encontrado en %2$s y no puede cargar el video en el navegador para la generación de "
1635
+ "imágenes en miniatura."
1636
+
1637
+ #: video-embed-thumbnail-generator.php:4759
1638
+ msgctxt "Button text. Implied \"Generate thumbnails\""
1639
+ msgid "Generate"
1640
+ msgstr "Generar"
1641
+
1642
+ #: video-embed-thumbnail-generator.php:4760
1643
+ msgctxt "Button text. Implied \"Randomize thumbnail generation\""
1644
+ msgid "Randomize"
1645
+ msgstr "Aleatorio"
1646
 
1647
+ #: video-embed-thumbnail-generator.php:4761
1648
  msgid "Force 1st frame thumbnail"
1649
  msgstr "Forzar el 1er cuadro de la miniatura"
1650
 
1651
+ #: video-embed-thumbnail-generator.php:4763 video-embed-thumbnail-generator.php:5374
1652
  msgid "Thumbnail timecode:"
1653
  msgstr "Código de tiempo de la miniatura:"
1654
 
1655
+ #: video-embed-thumbnail-generator.php:4770
1656
+ msgctxt "Header for thumbnail section"
1657
  msgid "Thumbnails"
1658
  msgstr "Miniaturas"
1659
 
1660
+ #: video-embed-thumbnail-generator.php:4778 video-embed-thumbnail-generator.php:5375
1661
  msgid "Set thumbnail as featured image"
1662
  msgstr "Establecer miniatura como imagen destacada"
1663
 
1664
+ #: video-embed-thumbnail-generator.php:4780 video-embed-thumbnail-generator.php:5380
1665
  msgid "Thumbnail URL"
1666
  msgstr "URL de Miniatura"
1667
 
1668
+ #: video-embed-thumbnail-generator.php:4782 video-embed-thumbnail-generator.php:5382
 
1669
  #, php-format
1670
  msgid "Leave blank to use %sdefault thumbnail"
1671
  msgstr "Dejar en blanco para usar miniatura %s por defecto"
1672
 
1673
+ #: video-embed-thumbnail-generator.php:4784
1674
  msgid "Video Embed Dimensions"
1675
  msgstr "Dimensiones Incrustación de Video"
1676
 
1677
+ #: video-embed-thumbnail-generator.php:4789
1678
  msgid "Lock to aspect ratio"
1679
  msgstr "Bloquear a la relación de aspecto"
1680
 
1681
+ #: video-embed-thumbnail-generator.php:4790 video-embed-thumbnail-generator.php:5387
 
1682
  #, php-format
1683
  msgid "Leave blank to use %sdefault dimensions"
1684
  msgstr "Dejar en blanco para usar %s dimensiones por defecto"
1685
 
1686
+ #: video-embed-thumbnail-generator.php:4795 video-embed-thumbnail-generator.php:5391
1687
  msgid "Additional Formats"
1688
  msgstr "Formatos adicionales"
1689
 
1690
+ #: video-embed-thumbnail-generator.php:4810
1691
+ msgctxt "captions track"
1692
  msgid "Track"
1693
  msgstr "Pista"
1694
 
1695
+ #: video-embed-thumbnail-generator.php:4814
1696
+ msgctxt "two-letter code indicating track's language"
1697
+ msgid "Language code:"
1698
+ msgstr "Código de idioma:"
1699
+
1700
+ #: video-embed-thumbnail-generator.php:4815 video-embed-thumbnail-generator.php:5397
1701
+ msgid "Label:"
1702
+ msgstr "Etiqueta:"
1703
+
1704
+ #: video-embed-thumbnail-generator.php:4820 video-embed-thumbnail-generator.php:5396
1705
  msgid "Subtitles & Captions"
1706
  msgstr "Subtítulos y capciones"
1707
 
1708
+ #: video-embed-thumbnail-generator.php:4822
1709
  msgid "Add track"
1710
  msgstr "Añadir pista"
1711
 
1712
+ #: video-embed-thumbnail-generator.php:4825
1713
  msgid "Single Video"
1714
  msgstr "Vídeo Único"
1715
 
1716
+ #: video-embed-thumbnail-generator.php:4825
1717
  msgid "Video Gallery"
1718
  msgstr "Galería Vídeo"
1719
 
1720
+ #: video-embed-thumbnail-generator.php:4833
1721
  msgid "Video Embed Options"
1722
  msgstr "Opciones Incrustación Video"
1723
 
1724
+ #: video-embed-thumbnail-generator.php:4836
1725
  msgid "Insert title above video"
1726
  msgstr "Insertar título vídeo de arriba"
1727
 
1728
+ #: video-embed-thumbnail-generator.php:4838
1729
  msgid "Insert download link below video"
1730
  msgstr "Insertar enlace de descarga a continuación"
1731
 
1732
+ #: video-embed-thumbnail-generator.php:4838
1733
  msgid "Makes it easier for users to download file."
1734
  msgstr "Hace que sea más fácil para los usuarios descargar el archivo."
1735
 
1736
+ #: video-embed-thumbnail-generator.php:4839
1737
+ msgctxt "verb"
1738
  msgid "Insert"
1739
  msgstr "Insertar"
1740
 
1741
+ #: video-embed-thumbnail-generator.php:4863
1742
  msgid "Gallery Settings (all optional)"
1743
  msgstr "Configuración de la Galería (todos opcionales)"
1744
 
1745
+ #: video-embed-thumbnail-generator.php:4865
1746
  msgid "Thumbnail Width"
1747
  msgstr "Ancho Miniatura"
1748
 
1749
+ #: video-embed-thumbnail-generator.php:4866
1750
  msgid "Order By"
1751
  msgstr "Ordenar Por"
1752
 
1753
+ #: video-embed-thumbnail-generator.php:4867
1754
  msgid "Sort Order"
1755
  msgstr "Orden de Clasificación"
1756
 
1757
+ #: video-embed-thumbnail-generator.php:4868
1758
  msgid "Exclude"
1759
  msgstr "Excluir"
1760
 
1761
+ #: video-embed-thumbnail-generator.php:4869
1762
  msgid "Include"
1763
  msgstr "Incluir"
1764
 
1765
+ #: video-embed-thumbnail-generator.php:4870
1766
  msgid "Post ID"
1767
  msgstr "Identificación de la publicación"
1768
 
1769
+ #: video-embed-thumbnail-generator.php:5071
1770
+ msgctxt "text appended to newly created thumbnail titles"
1771
  msgid "thumbnail"
1772
  msgstr "miniatura"
1773
 
1774
+ #: video-embed-thumbnail-generator.php:5326
1775
+ msgctxt "Title in \"Add Media\" popup sidebar"
1776
  msgid "Embed Video from URL"
1777
+ msgstr "Incrustar Vídeo desde la URL"
1778
+
1779
+ #: video-embed-thumbnail-generator.php:5356
1780
+ msgid "Video Title"
1781
+ msgstr "Título del vídeo"
1782
+
1783
+ #: video-embed-thumbnail-generator.php:5358
1784
+ msgid "Add an optional header above the video."
1785
+ msgstr "Añade una cabecera opcional sobre el vídeo."
1786
 
1787
+ #: video-embed-thumbnail-generator.php:5363
1788
+ msgid "Specify the URL of the video file."
1789
+ msgstr "Especifique la URL del archivo de vídeo."
1790
+
1791
+ #: video-embed-thumbnail-generator.php:5367
1792
+ msgid "Thumbnails"
1793
+ msgstr "Miniaturas"
1794
+
1795
+ #: video-embed-thumbnail-generator.php:5369
1796
+ msgid "Number of Thumbnails"
1797
+ msgstr "Número de miniaturas"
1798
+
1799
+ #: video-embed-thumbnail-generator.php:5372
1800
+ msgid "Force 1st Frame Thumbnail"
1801
+ msgstr "Fuerza la primera imagen como miniatura"
1802
+
1803
+ #: video-embed-thumbnail-generator.php:5385
1804
+ msgid "Dimensions"
1805
+ msgstr "Dimensiones"
1806
+
1807
+ #: video-embed-thumbnail-generator.php:5386
1808
+ msgid "Lock to Aspect Ratio"
1809
+ msgstr "Bloque el ratio de aspecto"
1810
+
1811
+ #: video-embed-thumbnail-generator.php:5400
1812
+ msgid "Generate Download Link Below Video"
1813
+ msgstr "Genera enlace de descarga por debajo del vídeo"
1814
+
1815
+ #: video-embed-thumbnail-generator.php:5400
1816
+ msgid "Makes it easier for users to download video file"
1817
+ msgstr "Hace más fácil a los usuarios descargar el archivo de vídeo"
1818
+
1819
+ #: video-embed-thumbnail-generator.php:5405
1820
+ msgid "Insert into Post"
1821
+ msgstr "Insertar en el Post"
1822
+
1823
+ #: video-embed-thumbnail-generator.php:5459
1824
+ msgctxt "example video"
1825
  msgid "Sample Video"
1826
+ msgstr "Vídeo de ejemplo"
1827
 
1828
+ #: video-embed-thumbnail-generator.php:5460
1829
  msgid "Sample Embed Code"
1830
  msgstr "Muestra de Código Incrustado"
1831
 
1832
+ #: video-embed-thumbnail-generator.php:5461
1833
+ msgid "If text is entered in the attachment's caption field it is displayed here automatically."
 
 
1834
  msgstr ""
1835
+ "Si se introduce texto en el campo de título del adjunto, se muestra aquí de forma automática."
 
1836
 
1837
+ #: video-embed-thumbnail-generator.php:5809 video-embed-thumbnail-generator.php:5954
 
1838
  msgid "Can't open movie file."
1839
  msgstr "No se puede abrir el archivo de película."
1840
 
1841
+ #: video-embed-thumbnail-generator.php:5932
1842
  #, php-format
1843
  msgid "%1$s updated in existing queue entry in position %2$s."
1844
  msgstr "%1$s actualizad en la cola de entrada en la posición %2$s."
1845
 
1846
+ #: video-embed-thumbnail-generator.php:5933
1847
  #, php-format
1848
  msgid "Video is already queued in position %s."
1849
  msgstr "El vídeo ya está en la cola en la posición %s."
1850
 
1851
+ #: video-embed-thumbnail-generator.php:5940
1852
  msgid "Starting"
1853
  msgstr "Iniciando"
1854
 
1855
+ #: video-embed-thumbnail-generator.php:5941
1856
  #, php-format
1857
  msgid "%1$s added to queue in position %2$s."
1858
  msgstr "%1$s añadido a la cola en la posición %2$s."
1859
 
1860
+ #: video-embed-thumbnail-generator.php:5945
1861
  msgid "Nothing to encode."
1862
  msgstr "Nada para codificar"
1863
 
1864
+ #: video-embed-thumbnail-generator.php:6007
1865
  #, php-format
1866
  msgid ""
1867
+ "Error: %1$s not found. Verify that %1$s is installed at %2$s and check the %3$sapplication path "
1868
+ "plugin setting"
1869
  msgstr ""
1870
+ "Error: %1$s no encontrado. Verifiqueque %1$s está instalado en %2$s y compruebe la configuración "
1871
+ "de ruta del plugin a la aplicación %3$s."
1872
 
1873
+ #: video-embed-thumbnail-generator.php:6102
1874
  #, php-format
1875
  msgid "%s already encoded"
1876
  msgstr "%s ya se encuentra codificado"
1877
 
1878
+ #: video-embed-thumbnail-generator.php:6106
1879
  #, php-format
1880
  msgid "%s missing library libx264 required for H.264 encoding"
1881
  msgstr "%s falta biblioteca libx264 necesaria para la codificación H.264"
1882
 
1883
+ #: video-embed-thumbnail-generator.php:6111
1884
  msgid "or"
1885
  msgstr "o"
1886
 
1887
+ #: video-embed-thumbnail-generator.php:6112
1888
  #, php-format
1889
+ msgid "and missing an AAC encoding library. Please install and enable libx264 and %s"
1890
+ msgstr "y falta una biblioteca de codificación AAC.Por favor, instalar y habilitar libx264 y %s"
 
 
 
1891
 
1892
+ #: video-embed-thumbnail-generator.php:6116 video-embed-thumbnail-generator.php:6135
 
1893
  msgid "Missing libraries"
1894
  msgstr "Bibliotecas faltantes"
1895
 
1896
+ #: video-embed-thumbnail-generator.php:6126
1897
  #, php-format
1898
  msgid "Encoding %s"
1899
  msgstr "Codificando %s"
1900
 
1901
+ #: video-embed-thumbnail-generator.php:6132
1902
  #, php-format
1903
  msgid "%1$s missing library %2$s required for %3$s encoding."
1904
  msgstr "%1$s biblioteca faltante %2$s necesaria para la codificación %3$s."
1905
 
1906
+ #: video-embed-thumbnail-generator.php:6138
1907
  #, php-format
1908
  msgid "%s already encoded."
1909
  msgstr "%s ya se encuentra codificada"
1910
 
1911
+ #: video-embed-thumbnail-generator.php:6155
1912
  msgid "Error: Command 'escapeshellcmd' is disabled on your server."
1913
  msgstr "Error: Comando 'escapeshellcmd' está deshabilitado en el servidor"
1914
 
1915
+ #: video-embed-thumbnail-generator.php:6342 video-embed-thumbnail-generator.php:6352
 
1916
  msgid "Encoding"
1917
  msgstr "Codificando"
1918
 
1919
+ #: video-embed-thumbnail-generator.php:6345
1920
  msgid "Cancel"
1921
  msgstr "Cancelar"
1922
 
1923
+ #: video-embed-thumbnail-generator.php:6348
1924
  msgid "Elapsed:"
1925
  msgstr "Transcurrido:"
1926
 
1927
+ #: video-embed-thumbnail-generator.php:6348
1928
  msgid "Remaining:"
1929
  msgstr "Quedan:"
1930
 
1931
+ #: video-embed-thumbnail-generator.php:6348
1932
+ msgctxt "Frames per second"
1933
  msgid "FPS:"
1934
  msgstr "FPS:"
1935
 
1936
+ #: video-embed-thumbnail-generator.php:6428 video-embed-thumbnail-generator.php:6440
 
1937
  msgid "Encoding Complete"
1938
  msgstr "Codificación completa"
1939
 
1940
+ #: video-embed-thumbnail-generator.php:6451
1941
  msgid "Encoding was canceled."
1942
  msgstr "Codificación se canceló."
1943
 
1944
+ #: video-embed-thumbnail-generator.php:6461
1945
  msgid "No log file"
1946
  msgstr "ningún archivo de registro"
1947
 
1948
+ #: video-embed-thumbnail-generator.php:6468
1949
  msgid "Error:"
1950
  msgstr "Error:"
1951
 
1952
+ #: video-embed-thumbnail-generator.php:6480
1953
  msgid "Waiting..."
1954
  msgstr "Esperando ..."
1955
 
1956
+ #: video-embed-thumbnail-generator.php:6707
1957
  msgid "Fixing moov atom for streaming"
1958
  msgstr "Corregir átomo moov para el streaming"
1959
 
1960
+ #: video-embed-thumbnail-generator.php:7159
1961
  msgid "Video Embed & Thumbnail Generator Shortcode Reference"
1962
  msgstr "Referencia Código corto Video Embed & Thumbnail Generator"
1963
 
1964
+ #: video-embed-thumbnail-generator.php:7160
1965
  msgid "Use these optional attributes in the [KGVID] shortcode:"
1966
  msgstr "Usar estos atributos opcionales en el código corto [KGVID]:"
1967
 
1968
+ #: video-embed-thumbnail-generator.php:7161
1969
  msgid "video attachment ID (instead of using a URL)."
1970
  msgstr "ID video adjunto (en lugar de mediante una dirección URL)."
1971
 
1972
+ #: video-embed-thumbnail-generator.php:7162
1973
  msgid "number of attached videos to display if no URL or ID is given."
1974
  msgstr "número de videos adjuntos a mostrar si hay URL o ID es dado."
1975
 
1976
+ #: video-embed-thumbnail-generator.php:7163
1977
  msgid "criteria for sorting attached videos if no URL or ID is given."
1978
  msgstr "criterios para clasificar los vídeos adjuntos si no se da el URL o ID."
1979
 
1980
+ #: video-embed-thumbnail-generator.php:7164
1981
  msgid "sort order."
1982
  msgstr "orden de clasificación."
1983
 
1984
+ #: video-embed-thumbnail-generator.php:7165
1985
  msgid "sets the thumbnail."
1986
  msgstr "establece la miniatura."
1987
 
1988
+ #: video-embed-thumbnail-generator.php:7166
1989
  msgid "sets the image shown when the video ends."
1990
  msgstr "establece la imagen que aparece cuando termina el video."
1991
 
1992
+ #: video-embed-thumbnail-generator.php:7169
1993
  msgid "set video to always expand to fill its container."
1994
  msgstr "establece que el vídeo siempre se expande para rellenar su contenedor."
1995
 
1996
+ #: video-embed-thumbnail-generator.php:7171
1997
  msgid "allow other content on the same line as the video"
1998
  msgstr "permitir otras contenidos en la misma línea que el vídeo"
1999
 
2000
+ #: video-embed-thumbnail-generator.php:7172
2001
  msgid "pre-sets the volume for unusually loud videos. Value between 0 and 1."
2002
+ msgstr "pre-configura el volumen para videos inusualmente fuertes. Valor entre 0 y 1."
 
2003
 
2004
+ #: video-embed-thumbnail-generator.php:7173
2005
  msgid "sets the mute button on or off."
2006
  msgstr "selecciona el botón de silencio encendido o apagado."
2007
 
2008
+ #: video-embed-thumbnail-generator.php:7174
2009
+ msgid "sets the controlbar position. \"Floating\" option only works with Strobe Media Playback."
 
 
2010
  msgstr ""
2011
+ "Establece la posición de barra de control. La opción \"Flotante \" sólo funciona con Strobe "
2012
+ "Media Playback."
2013
 
2014
+ #: video-embed-thumbnail-generator.php:7177 video-embed-thumbnail-generator.php:7180
 
2015
  #, php-format
2016
  msgid "or %s to disable."
2017
+ msgstr "o %s para desactivar."
2018
 
2019
+ #: video-embed-thumbnail-generator.php:7179
2020
+ #, php-format
2021
+ msgid "or %s to disable. If this is set, it will override the watermark_link_to setting."
2022
+ msgstr ""
2023
+ "o %s para deshabilitar. Si se configura ésta, desactiva la configuración de enlace a en marca de "
2024
+ "agua."
2025
+
2026
+ #: video-embed-thumbnail-generator.php:7181
2027
  #, php-format
2028
  msgid ""
2029
+ "changes text displayed in the embed code overlay in order to provide a custom method for "
2030
+ "embedding a video or %s to disable."
2031
  msgstr ""
2032
+ "Cambia el texto que aparece en la superposición de código de inserción con el fin de "
2033
+ "proporcionar un método personalizado para incrustar un vídeo ó %s para desactivarlo."
 
2034
 
2035
+ #: video-embed-thumbnail-generator.php:7182
2036
  msgid "turns the view count on or off."
2037
  msgstr "Enciende o apaga el conteo de vistas."
2038
 
2039
+ #: video-embed-thumbnail-generator.php:7183
2040
+ msgid "text that is displayed below the video (not subtitles or closed captioning)"
 
2041
  msgstr "texto que se muestra debajo del video (no subtítulos o capciones)"
2042
 
2043
+ #: video-embed-thumbnail-generator.php:7184
2044
  msgid "Used for metadata only."
2045
  msgstr "Se utiliza sólo para metadatos."
2046
 
2047
+ #: video-embed-thumbnail-generator.php:7185
2048
  msgid ""
2049
+ "generates a link below the video to make it easier for users to save the video file to their "
2050
+ "computers."
2051
  msgstr ""
2052
+ "genera un enlace debajo del video para que sea más fácil para los usuarios guardar el archivo de "
2053
+ "vídeo en sus ordenadores."
2054
 
2055
+ #: video-embed-thumbnail-generator.php:7186
2056
  msgid "allow or disable right-clicking on the video player."
2057
+ msgstr "permitir o deshabilitar el botón derecho sobre el reproductor de vídeo."
 
2058
 
2059
+ #: video-embed-thumbnail-generator.php:7187
2060
  msgid "allow or disable responsive resizing."
2061
  msgstr "permitir o deshabilitar el cambio de tamaño responsivo."
2062
 
2063
+ #: video-embed-thumbnail-generator.php:7188
2064
+ msgid "specify the video resolution when the page loads."
2065
+ msgstr "especifique la resolución del vídeo cuando la página carga."
 
 
2066
 
2067
+ #: video-embed-thumbnail-generator.php:7190
2068
  msgid "These options will add a subtitle/caption track."
2069
  msgstr "Estas opciones añaden una pista para subtítulo/capción."
2070
 
2071
+ #: video-embed-thumbnail-generator.php:7191
2072
  msgid "URL of the WebVTT file."
2073
  msgstr "URL del archivo WebVTT."
2074
 
2075
+ #: video-embed-thumbnail-generator.php:7193
2076
  msgid "the track's two-character language code (en, fr, es, etc)"
2077
  msgstr "Idioma del Código de dos caracteres de la pista (in, fr, es, etc.)"
2078
 
2079
+ #: video-embed-thumbnail-generator.php:7194
2080
  msgid "text that will be shown to the user when selecting the track."
2081
  msgstr "el texto que se mostrará al usuario cuando seleccione la pista."
2082
 
2083
+ #: video-embed-thumbnail-generator.php:7195
2084
+ msgid "track is enabled by default."
2085
+ msgstr "la pista está habilitada por defecto."
2086
+
2087
+ #: video-embed-thumbnail-generator.php:7197
2088
  msgid "These options will only affect Video.js playback"
2089
  msgstr "Estas opciones sólo afectan la reproducción de Video.js"
2090
 
2091
+ #: video-embed-thumbnail-generator.php:7198 video-embed-thumbnail-generator.php:7207
 
2092
  #, php-format
2093
  msgid "Completely change the look of the video player. %sInstructions here."
2094
+ msgstr "Cambiar completamente el aspecto del reproductor de vídeo. %sInstrucciones aquí."
 
 
2095
 
2096
+ #: video-embed-thumbnail-generator.php:7200
2097
  msgid ""
2098
+ "These options will only affect Flash playback in Strobe Media Playback video elements. They will "
2099
+ "have no effect on other players."
2100
  msgstr ""
2101
+ "Estas opciones sólo afectan la reproducción de Flash en elementos de vídeo Strobe Media "
2102
+ "Playback. Ellas no tendrán ningún efecto sobre otros reproductores."
 
2103
 
2104
+ #: video-embed-thumbnail-generator.php:7201
2105
  msgid "specify whether to autohide the control bar after a few seconds."
2106
+ msgstr "Especificar si se oculta automáticamente la barra de control al cabo de unos segundos."
 
 
2107
 
2108
+ #: video-embed-thumbnail-generator.php:7202
2109
  msgid "turns the big play button overlay in the middle of the video on or off."
2110
  msgstr "Enciende o apaga el overlay del botón jugar en el medio del video."
2111
 
2112
+ #: video-embed-thumbnail-generator.php:7203
2113
  msgid "I honestly don't know what this is for."
2114
  msgstr "Sinceramente, no sé para qué es esto."
2115
 
2116
+ #: video-embed-thumbnail-generator.php:7204
2117
  msgid ""
2118
+ "If the video display size isn't the same as the video file, this determines how the video will "
2119
+ "be scaled."
2120
  msgstr ""
2121
+ "Si el tamaño de la pantalla de vídeo no es el mismo que el archivo de vídeo, esto determina cómo "
2122
+ "se escalará el video."
2123
 
2124
+ #: video-embed-thumbnail-generator.php:7205
2125
  msgid "#rrggbb"
2126
  msgstr "# rrggbb"
2127
 
2128
+ #: video-embed-thumbnail-generator.php:7205
2129
  msgid "set the background color to whatever hex code you want."
2130
  msgstr "establezca el color de fondo alo código hex que desee."
2131
 
2132
+ #: video-embed-thumbnail-generator.php:7206
2133
  msgid "Lets you specify all these flashvars in an XML file."
2134
  msgstr "Permite especificar todos estos flashvars en un archivo XML."
2135
 
2136
+ #: video-embed-thumbnail-generator.php:7209
2137
  msgid ""
2138
+ "These options are available for video galleries (options work the same as standard WordPress "
2139
+ "image galleries)"
2140
  msgstr ""
2141
+ "Estas opciones están disponibles para las galerías de vídeo (las opciones funcionan igual que "
2142
+ "las galerías de imágenes de WordPress estándar)"
2143
 
2144
+ #: video-embed-thumbnail-generator.php:7210
2145
  msgid "turns on the gallery"
2146
  msgstr "Enciende la galería"
2147
 
2148
+ #: video-embed-thumbnail-generator.php:7211
2149
  msgid "width in pixels to display gallery thumbnails"
2150
  msgstr "anchoen píxeles para mostrar imágenes en miniatura de la galería"
2151
 
2152
+ #: video-embed-thumbnail-generator.php:7212
2153
+ msgid "comma separated video attachment IDs. Excludes the videos from the gallery."
2154
+ msgstr "IDs de adjuntos de vídeo separados por comas. Excluye los vídeos de la galería."
 
 
 
2155
 
2156
+ #: video-embed-thumbnail-generator.php:7213
2157
  msgid ""
2158
+ "comma separated video attachment IDs. Includes only these videos in the gallery. Please note "
2159
+ "that include and exclude cannot be used together."
2160
  msgstr ""
2161
+ "IDs de adjuntos de vídeo separados por comas. Incluye sólo estos videos en la galería. Tenga en "
2162
+ "cuenta que incluir y excluir no se pueden utilizar juntos."
 
2163
 
2164
+ #: video-embed-thumbnail-generator.php:7214
2165
  msgid "criteria for sorting the gallery"
2166
  msgstr "Criterios para clasificar la galería"
2167
 
2168
+ #: video-embed-thumbnail-generator.php:7215
2169
  msgid "sort order"
2170
  msgstr "Orden de la clasificación"
2171
 
2172
+ #: video-embed-thumbnail-generator.php:7216
2173
+ msgid "post ID to display a gallery made up of videos associated with a different post."
 
 
2174
  msgstr ""
2175
+ "ID del mensaje para mostrar una galería compuesta por vídeos asociados a una publicación "
2176
+ "diferente."
2177
 
2178
+ #: video-embed-thumbnail-generator.php:7217
2179
  msgid ""
2180
+ "either close the pop-up or start playing the next video when the current video finishes playing."
2181
+ msgstr ""
2182
+ "Ya sea cerrar el pop-up o empezar a reproducir el siguiente video cuando el vídeo actual termine "
2183
+ "de reproducirse."
2184
+
2185
+ #: video-embed-thumbnail-generator.php:7218
2186
+ #, php-format
2187
+ msgid "or %s to disable pagination. Number of video thumbnails to show on each gallery page."
2188
  msgstr ""
2189
+ "o %s para deshabilitar la paginación. Número de miniaturas de vídeo a mostrar en cada página de "
2190
+ "la galería."
2191
+
2192
+ #: video-embed-thumbnail-generator.php:7219
2193
+ msgid "display the title overlay on gallery thumbnails."
2194
+ msgstr "muestra el título sobrepuesto en las miniaturas de las galerías."
2195
+
2196
+ #~ msgid "Videos per gallery page:"
2197
+ #~ msgstr "Vídeos por página de la galería:"
2198
+
2199
+ #~ msgid "-1 disables video gallery pagination and shows all gallery thumbnails on one page"
2200
+ #~ msgstr ""
2201
+ #~ "-1 deshabilita la paginación en la galería de video y muestra todas las miniaturas de la "
2202
+ #~ "galería en una página"
2203
+
2204
+ #~ msgid "Wait"
2205
+ #~ msgstr "Espere"
2206
+
2207
+ #~ msgid "Embed:"
2208
+ #~ msgstr "Incrustar:"
2209
+
2210
+ #~ msgid "Play Start"
2211
+ #~ msgstr "Iniciar reproducción"
2212
+
2213
+ #~ msgid "Complete View"
2214
+ #~ msgstr "Vista completa"
2215
+
2216
+ #~ msgid "%1$s not found at %2$s"
2217
+ #~ msgstr "%1$s no encontrado en %2$s"
2218
+
2219
+ #~ msgid "Update"
2220
+ #~ msgstr "Actualizar"
2221
+
2222
+ #~ msgid "Encode selected"
2223
+ #~ msgstr "Codificar los seleccionados"
2224
+
2225
+ #~ msgid "Order"
2226
+ #~ msgstr "Orden"
2227
+
2228
+ #~ msgid "User"
2229
+ #~ msgstr "Usuario"
2230
+
2231
+ #~ msgid "Thumbnail"
2232
+ #~ msgstr "Miniatura"
2233
+
2234
+ #~ msgid "File"
2235
+ #~ msgstr "Archivo"
2236
+
2237
+ #~ msgid "Formats"
2238
+ #~ msgstr "Formatos"
2239
+
2240
+ #~ msgid "Actions"
2241
+ #~ msgstr "Acciones"
2242
+
2243
+ #~ msgid "Site"
2244
+ #~ msgstr "Sitio"
2245
+
2246
+ #~ msgid "Video Encode Queue"
2247
+ #~ msgstr "Cola para codificación de video"
2248
+
2249
+ #~ msgid "Network Video Encode Queue"
2250
+ #~ msgstr "Cola para codificación de video en red"
2251
+
2252
+ #~ msgid "Video Embed & Thumbnail Generator"
2253
+ #~ msgstr "Video Embed & Thumbnail Generator "
2254
+
2255
+ #~ msgid "%s settings tab."
2256
+ #~ msgstr "%s pestaña de configuración."
2257
+
2258
+ #~ msgid "%s Settings"
2259
+ #~ msgstr "Configuración %s"
2260
+
2261
+ #~ msgid "Automatically resize videos:"
2262
+ #~ msgstr "Cambio de tamaño automático vídeos:"
2263
+
2264
+ #~ msgid "Max gallery video dimensions:"
2265
+ #~ msgstr "Dimensiones máximas de galería de vídeo:"
2266
+
2267
+ #~ msgid "Gallery thumbnail width:"
2268
+ #~ msgstr "Ancho Galería de miniaturas:"
2269
+
2270
+ #~ msgid "Gallery playback end action:"
2271
+ #~ msgstr "Acción final de la reproducción de la Galería:"
2272
+
2273
+ #~ msgid "Loop:"
2274
+ #~ msgstr "Repetir:"
2275
+
2276
+ #~ msgid "Skin class:"
2277
+ #~ msgstr "Clase de la máscara:"
2278
+
2279
+ #~ msgid "Choose video resolution automatically based on player size."
2280
+ #~ msgstr "Selecciona automáticamente la resolución del vídeo basado en el tamaño del reproductor."
2281
+
2282
+ #~ msgid "%d%%"
2283
+ #~ msgstr "%d%%"
2284
+
2285
+ #~ msgid ""
2286
+ #~ "Controls how much of a video to load before the user starts playback. Mobile browsers never "
2287
+ #~ "preload any video information. Selecting \"metadata\" will load the height and width and "
2288
+ #~ "format information along with a few seconds of the video in some desktop browsers. \"Auto\" "
2289
+ #~ "will preload nearly a minute of video in most desktop browsers. \"None\" will prevent all "
2290
+ #~ "data from preloading."
2291
+ #~ msgstr ""
2292
+ #~ "Controla la cantidad de un vídeo a cargar antes de que el usuario inicie la reproducción. Los "
2293
+ #~ "navegadores móviles nunca precargan información de vídeo. Seleccionar \"metadata\" cargará la "
2294
+ #~ "altura y la anchura y la información de formato, junto con unos pocos segundos de vídeo en "
2295
+ #~ "algunos navegadores de escritorio. \"Auto\" precarga casi un minuto de vídeo en la mayoría de "
2296
+ #~ "los navegadores de escritorio. \"No\" evitará que todos los datos se precarguen."
2297
+
2298
+ #~ msgid "Enable Open Graph video tags"
2299
+ #~ msgstr "Habilitar etiquetas de video Open Graph"
2300
+
2301
+ #~ msgid "Set all as featured"
2302
+ #~ msgstr "Establece todas como destacadas"
2303
+
2304
+ #~ msgid ""
2305
+ #~ "If you have FFMPEG/LIBAV and the proper libraries installed, you can choose to replace your "
2306
+ #~ "uploaded video with your preferred format, and also transcode into as many as six additional "
2307
+ #~ "formats depending on the resolution of your original source. Different browsers have "
2308
+ #~ "different playback capabilities. Most desktop browsers can play H.264, and all modern mobile "
2309
+ #~ "devices can play at least 360p H.264. If you create multiple H.264 resolutions, the highest "
2310
+ #~ "resolution supported by the device will be served up automatically. The plugin will not "
2311
+ #~ "upconvert your video, so if you upload a 720p video, it will not waste your time creating a "
2312
+ #~ "1080p version. There was a time when it seemed like a good idea to provide OGV or WEBM for "
2313
+ #~ "some desktop browsers, but even Firefox allows H.264 playback on Windows now. I no longer "
2314
+ #~ "recommend encoding OGV or WEBM unless you expect a large number of no-Flash sticklers "
2315
+ #~ "visiting your site."
2316
+ #~ msgstr ""
2317
+ #~ "Si tiene FFMPEG/LIBAV y las bibliotecas adecuadas instaladas, puede optar por reemplazar su "
2318
+ #~ "vídeo subido con un video de H.264, y también transcodificar en un máximo de cinco formatos "
2319
+ #~ "adicionales dependiendo de la resolución de su fuente original. Diferentes navegadores tienen "
2320
+ #~ "diferentes capacidades de reproducción. La mayoría de los navegadores de escritorio puede "
2321
+ #~ "reproducir H.264, y todos los dispositivos móviles modernos pueden reproducir al menos 480p "
2322
+ #~ "H.264. Si crea varias resoluciones H.264, la resolución más alta admitida por el dispositivo "
2323
+ #~ "se servirá de forma automática. El plugin no convierte el vídeo, por lo que si sube un video "
2324
+ #~ "de 720p, no va a perder el tiempo creando una versión 1080p. Hubo un momento en que parecía "
2325
+ #~ "como una buena idea proporcionar OGV o WEBM para algunos navegadores de escritorio, pero "
2326
+ #~ "incluso Firefox permite la reproducción de H.264 en Windows ahora. Ya no recomiendo codificar "
2327
+ #~ "OGV o WEBM a menos que usted espera un gran número de rigoristas no-Flash visitando su sitio."
2328
+
2329
+ #~ msgid ""
2330
+ #~ "(iPhone 4s+, iPad 2+, modern Android, Windows Phone 8, Chrome, Safari, IE 9+, Firefox Windows)"
2331
+ #~ msgstr ""
2332
+ #~ "(IPhone 4s +, iPad 2 +, Android moderno, Windows Phone 8, Chrome, Safari, IE 9 +, Firefox "
2333
+ #~ "Windows)"
2334
+
2335
+ #~ msgid "(iPhone 4+, iPad, most Android, Chrome, Safari, IE 9+, Firefox Windows)"
2336
+ #~ msgstr "( iPhone 4 +, iPad, casi todos los Android, Chrome, Safari, IE 9 +, Firefox Windows)"
2337
+
2338
+ #~ msgid "profile"
2339
+ #~ msgstr "perfil"
2340
+
2341
+ #~ msgid "level"
2342
+ #~ msgstr "nivel"
2343
+
2344
+ #~ msgid "Enable legacy FFMPEG parameters."
2345
+ #~ msgstr "Habilitar parámetros FFMPEG heredados."
2346
+
2347
+ #~ msgid "threads"
2348
+ #~ msgstr "hilos"
2349
+
2350
+ #~ msgid "Run"
2351
+ #~ msgstr "Ejecutar"
2352
+
2353
+ #~ msgid "You must enter a value for the maximum gallery video height."
2354
+ #~ msgstr "Debe ingresar un valor para la altura máxima de la galería de vídeo."
2355
+
2356
+ #~ msgid "%1$s Starts, %2$s Complete Views"
2357
+ #~ msgstr "%1$s Comenzadas, %2$s Reproducciones completas"
2358
+
2359
+ #~ msgid "Track"
2360
+ #~ msgstr "Pista"
2361
+
2362
+ #~ msgid "Insert"
2363
+ #~ msgstr "Insertar"
2364
+
2365
+ #~ msgid "thumbnail"
2366
+ #~ msgstr "miniatura"
2367
+
2368
+ #~ msgid "Embed Video from URL"
2369
+ #~ msgstr "Incrustar el vídeo desde la URL"
2370
+
2371
+ #~ msgid "Sample Video"
2372
+ #~ msgstr "Muestra de video"
2373
+
2374
+ #~ msgid "FPS:"
2375
+ #~ msgstr "FPS:"
2376
+
2377
+ #~ msgid "let the plugin select the best resolution for the size of the player."
2378
+ #~ msgstr "dejar que el plugin seleccione la mejor resolución según el tamaño del reproductor."
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Video Embed & Thumbnail Generator ===
2
  Contributors: kylegilman
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=kylegilman@gmail.com&item_name=Video%20Embed%20And%20Thumbnail%20Generator%20Plugin%20Donation
4
- Tags: video, video player, video gallery, html5, shortcode, thumbnail, preview, poster, ffmpeg, libav, embed, mobile, webm, ogg, h.264, h264, responsive, mp4, jwplayer, resolution
5
  Requires at least: 3.5
6
- Tested up to: 4.2
7
- Stable tag: 4.4.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -25,33 +25,33 @@ You have the option to use a few different video players:
25
 
26
  <em>The Strobe Media Playback option hasn't been updated since 2011 and is not recommended, but I'm keeping it around for longtime users of this plugin who don't want to change. Most features of the plugin will work when using Strobe Media Playback, but new features will not be tested with it. Selecting Strobe Media Playback will default to a Flash video player if you're using a Flash-compatible file (flv, f4v, mp4, mov, or m4v). Otherwise it will use the Video.js player as a fallback.</em>
27
 
28
- No matter which player you use, the video will resize on the fly to fit the container it's in. There is no need to use FitVids.js and in fact FitVids.js will break playback for some players. If you provide multiple H.264 resolutions, the Video.js player can automatically select the one closest to the size of the player and provide a button for users to select the resolution manually. Because the player uses native controls on mobile devices, the manual resolution button is only available on desktop browsers.
29
 
30
- You can also use the plugin to create a popup video gallery. The shortcode uses options similar to the WordPress image gallery shortcode. In its simplest form use the code `[KGVID gallery="true"]` to create a gallery of all videos attached to the post. Thumbnail size and video popup size can be set on the plugin settings page or in the shortcode.
31
 
32
- If your video can be <a href="http://en.wikipedia.org/wiki/HTML5_video#Browser_support">played natively in your browser</a>, or if you have FFMPEG or LIBAV installed on your server, you can generate thumbnails from your video. Using either the "Generate" or "Randomize" buttons will create an array to choose from. The "Generate" button will always generate thumbnails from the same frames of your video, evenly spaced. If you don't like them, you can randomize the results with the "Randomize" button. If you want to see the first frame of the video, check the "Force 1st Frame Thumbnail" button. After creating an array of thumbnails you can save them all using the "Save all thumbnails" button.
33
 
34
- If you know which frame you want to use for your thumbnail, click "Choose from video..." to select it from the video. This will only work for <a href="http://en.wikipedia.org/wiki/HTML5_video#Browser_support">videos that can be played natively in your browser</a>. If you want really fine control you can enter timecode in the "Thumbnail timecode" field. Use `mm:ss` format. Use decimals to approximate frames. For example, `23.5` will generate a thumbnail halfway between the 23rd and 24th seconds in the video. `02:23.25` would be one quarter of the way between the 143rd and 144th seconds. You can generate as many or as few as you need (up to 99 at a time).
35
 
36
  After you select a thumbnail it will be registered in the Wordpress Media Library and added to the video's attachments. Unused thumbnails will be deleted.
37
 
38
  In the plugin settings you can set the default maximum video width and height based on the dimensions of your particular template and those values will be filled in when you open the window. If you generate thumbnails, the video display dimensions will be adjusted automatically to match the size and aspect ratio of the video file. You can make further adjustments if you want. There are options to always fill the width of the template or to always set videos to the maximum width setting regardless of their resolution.
39
 
40
- You can add subtitle and caption tracks by choosing properly formatted WebVTT files from the media library or entering a URL directly. Enter the two-letter language code and the label text that will be shown to users. Currently the Video.js and WordPress default players do not work with the "default" attribute but I will add the option to turn a text track on by default if that changes in the future. The WordPress default player does not differentiate between captions and subtitles, but Video.js will show a different icon depending on the selection.
41
 
42
  I highly recommend using <a href="http://handbrake.fr/">Handbrake</a> to make a file with H.264 video and AAC audio in an MP4 container before uploading. If you're encoding with Handbrake make sure that "Web Optimized" is checked. Using Apple's Compressor, the "Streaming" setting should be "Fast Start" (not Fast Start - Compressed Header).
43
 
44
- The plugin can use FFMPEG or LIBAV to encode videos and make thumbnails if you have one of them installed on your server. You can choose to generate thumbnails and alternate video formats automatically whenever a new video is uploaded to the media library, and there are buttons to generate thumbnails and alternate video formats for every video already in the media library.
45
 
46
- By default the plugin looks for FFMPEG in `/usr/local/bin` but if the application is installed in a different place on your server, you can point it to the correct place in the plugin settings. Users running WordPress on Windows servers should try using Linux-style paths (with forward slashes instead of backslashes and a forward slash `/` instead of `C:\`).
47
 
48
- If you have the proper libraries installed on your server, you can choose to replace your uploaded video with your preferred format, and generate as many as six additional formats depending on your original source. 1080p, 720p, and 360p H.264, same resolution WEBM and OGV, and a custom format. Different browsers have different playback capabilities. Most desktop browsers can play H.264, and all modern mobile devices can play at least 360p H.264. If you create multiple H.264 resolutions, the highest resolution supported by the device will be served up automatically. The plugin will not upconvert your video, so if you upload a 720p video, it will not waste your time creating a 1080p version. There was a time when it seemed like a good idea to provide OGV or WEBM for some desktop browsers, but Firefox supports H.264 playback in Windows & Linux now and will support it in Mac OS starting in November 2014. I no longer recommend encoding OGV or WEBM unless you expect a large number of no-Flash sticklers visiting your site, or if you're making an open source principled stand against H.264. However, your needs may vary.
49
 
50
- The files will encode in the background and will take some time to complete, depending on your server setup and the length and size of your video. The plugin adds a Video Encode Queue menu to the Tools menu. You will see encoding progress, the option to cancel an encoding job, and you should get an error message if something goes wrong. Users on Windows servers may get inconsistent results with the encoding queue.
51
 
52
  Encoded H.264 files can be fixed for streaming using "movflags faststart" introduced in recent versions of FFMPEG/LIBAV, or qt-faststart or MP4Box if you have one of them installed on your server and select it in the plugin settings. Without one of these options enabled, FFMPEG/LIBAV will place moov atoms at the end of H.264 encoded files, which in some cases forces the entire file to download before playback can start.
53
 
54
- If you want to make OGV, WEBM, or H.264 files available and can't use the FFMPEG encode button, you can upload your own files to the same directory as the original and the plugin will automatically find them. For example, if your main file is awesomevid.mp4, the plugin will look for awesomevid-1080.mp4, awesomevid-720.mp4, awesomevid-360.mp4, awesomevid.webm and awesomevid.ogv as well. If your videos don't conform to that naming structure, you can manually assign them from the media library. No matter what format your original video is, you can use it in the shortcode and the plugin will attempt to find all compatible formats related to it. For example, you might have an AVI called awesomevid.avi which is not compatible with any browser, but if you have other formats encoded already, `[KGVID]http://yoursite.com/awesomevid.avi[/KGVID]` will ignore the incompatible AVI file, but find those other formats and embed them.
55
 
56
  If you want to make it easier for users to save your videos to their computers, you can choose to include a link by checking the "Generate Download Link Below Video" button.
57
 
@@ -61,12 +61,13 @@ To embed videos on other sites you can use code like this.
61
 
62
  `<iframe src='http://www.kylegilman.net/?attachment_id=2897&kgvid_video_embed[enable]=true' frameborder='0' scrolling='no' width='640' height='360'></iframe>`
63
 
 
 
64
  = Once you've filled in all your options, click "Insert into Post" and you'll get a shortcode in the visual editor like this =
65
 
66
- `[KGVID poster="http://www.kylegilman.net/wp-content/uploads/2011/10/Reel-11-10-10-web_thumb2.jpg"
67
- width="720" height="404"]http://www.kylegilman.net/wp-content/uploads/2006/09/Reel-2012-05-15-720.mp4[/KGVID]`
68
 
69
- = Translations included:=
70
 
71
  * Español por Andrew Kurtis de <a href="http://www.webhostinghub.com/">WebHostingHub</a>.
72
  * Français par F.R. 'Friss' Ferry, friss.designs@gmail.com
@@ -93,6 +94,8 @@ I'm not really a software developer. I'm just a film editor with some time on hi
93
  * `loop="true/false"`
94
  * `autoplay="true/false"`
95
  * `watermark="http://www.example.com/image.png"` or `"false"` to disable.
 
 
96
  * `title="Video Title"` or `"false"` to disable.
97
  * `embedcode="html code"` changes text displayed in the embed code overlay in order to provide a custom method for embedding a video or `"false"` to disable.
98
  * `view_count="true/false"` turns the view count on or off.
@@ -101,7 +104,7 @@ I'm not really a software developer. I'm just a film editor with some time on hi
101
  * `downloadlink="true/false"` generates a link below the video to make it easier for users to save the video file to their computers.
102
  * `right_click="true/false"` allow or disable right-clicking on the video player.
103
  * `resize="true/false"` allow or disable responsive resizing.
104
- * `auto_res="true/false"` let the plugin select the best resolution for the size of the player.
105
 
106
  = These options will add a subtitle/caption track =
107
 
@@ -109,6 +112,7 @@ I'm not really a software developer. I'm just a film editor with some time on hi
109
  * `track_kind=subtitles/captions/chapters`
110
  * `track_srclang=xx` the track's two-character language code (en, fr, es, etc)
111
  * `track_label="Track Label"` text that will be shown to the user when selecting the track.
 
112
 
113
  = These options will only affect Video.js playback =
114
 
@@ -128,12 +132,14 @@ I'm not really a software developer. I'm just a film editor with some time on hi
128
 
129
  * `gallery="true"` turns on the gallery
130
  * `gallery_thumb="xxx"` width in pixels to display gallery thumbnails
131
- * `gallery_exclude="15"` comma separated video attachment IDs. Excludes the videos from the gallery.
132
- * `gallery_include="65"` comma separated video attachment IDs. Includes only these videos in the gallery. Please note that include and exclude cannot be used together.
133
  * `gallery_orderby="menu_order/title/post_date/rand/ID"` criteria for sorting the gallery.
134
  * `gallery_order="ASC/DESC"` sort order.
135
  * `gallery_id="241"` post ID to display a gallery made up of videos associated with a different post.
136
  * `gallery_end="close/next"` either close the pop-up or start playing the next video when the current video finishes playing.
 
 
137
 
138
  == Installation ==
139
 
@@ -150,7 +156,7 @@ Optional: `AddType video/mp4 .mov` will help with IE playback of .mov files but
150
 
151
  = Why doesn't my video play? =
152
 
153
- Most of the time your video doesn't play because it's not encoded in the right format. Videos have containers like mp4, mov, ogv, mkv, flv, etc and within those containers there are video and audio codecs like H.264, MPEG-4, VP8, etc. The best option for this plugin is an mp4 container with H.264 video and AAC audio. mp4s with MPEG-4 video will not play in the Flash player, and if you don't use AAC audio you won't get any audio.
154
 
155
  Use <a href="http://mediaarea.net/en/MediaInfo">MediaInfo</a> to get really detailed information about your media files.
156
 
@@ -208,7 +214,7 @@ First off, don't panic.
208
 
209
  This plugin can use FFMPEG or LIBAV to make thumbnails and create alternate video formats. Unfortunately most servers don't have FFMPEG installed and most shared hosting plans don't allow you to install FFMPEG because of the system resources it requires. You're getting this error message because you don't have FFMPEG installed in the most common directory. If you know you have FFMPEG installed on your server, you'll need to find the actual path to the program and enter it in the plugin settings field `Path to applications on server`
210
 
211
- Most of the features of the plugin will work without FFMPEG. You can generate embed shortcodes for your videos and make thumbnails on any host because that part of the plugin is JavaScript running in your browser. But without FFMPEG you won't be able to automatically generate thumbnails or encode alternate formats on the server. If you don't have your own VPS or dedicated server, Dreamhost is one of the few shared hosts I know of that has FFMPEG installed and available for users.
212
 
213
  = How can I encode videos in directories protected by .htaccess passwords? =
214
 
@@ -223,6 +229,43 @@ Enter the username & password in the plugin settings "FFMPEG Settings" tab, or u
223
 
224
  == Changelog ==
225
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  = 4.4.2 - November 3, 2014 =
227
  * Added Google Universal Analytics event tracking.
228
  * Updated Spanish, French and Belgian translations.
@@ -662,6 +705,9 @@ Enter the username & password in the plugin settings "FFMPEG Settings" tab, or u
662
 
663
  == Upgrade Notice ==
664
 
 
 
 
665
  = 3.0 =
666
  Fixes thumbnails & encodes in WP 3.5. Not compatible with earlier WP versions.
667
 
1
  === Video Embed & Thumbnail Generator ===
2
  Contributors: kylegilman
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=kylegilman@gmail.com&item_name=Video%20Embed%20And%20Thumbnail%20Generator%20Plugin%20Donation
4
+ Tags: video, video player, video gallery, html5, shortcode, thumbnail, video thumbnail, preview, poster, ffmpeg, libav, embed, oembed, mobile, webm, ogg, h.264, h264, vp9, responsive, mp4, jwplayer, resolution
5
  Requires at least: 3.5
6
+ Tested up to: 4.3
7
+ Stable tag: 4.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
25
 
26
  <em>The Strobe Media Playback option hasn't been updated since 2011 and is not recommended, but I'm keeping it around for longtime users of this plugin who don't want to change. Most features of the plugin will work when using Strobe Media Playback, but new features will not be tested with it. Selecting Strobe Media Playback will default to a Flash video player if you're using a Flash-compatible file (flv, f4v, mp4, mov, or m4v). Otherwise it will use the Video.js player as a fallback.</em>
27
 
28
+ No matter which player you use, the video will responsively resize to fit the container it's in. There is no need to use FitVids.js and in fact FitVids.js will break playback for some players. If you provide multiple H.264 resolutions, the Video.js player can automatically select the one closest to the size of the player and provide a button for users to select the resolution manually. Because the player uses native controls on mobile devices, the manual resolution button is only available on desktop browsers.
29
 
30
+ You can also use the plugin to create a popup video gallery. The shortcode uses options similar to the WordPress image gallery shortcode. In its simplest form use the code `[KGVID gallery="true"]` to create a gallery of all videos attached to the post. Thumbnail size and video popup size can be set on the plugin settings page or in the shortcode. To make a custom gallery that includes videos that aren't attached to the current post you'll need to determine the video's ID, which is shown under the Video Stats section when viewing the attachment. Switch the "insert" option from "Single Video" to "Video Gallery" and you'll get a number of additional options (all of which are optional). Add a comma-separated list of video IDs in the "Include" field to create a gallery manually. Note: the "Create Gallery" section of the Add Media window is a built-in WordPress function and is only for making image galleries.
31
 
32
+ If your video can be <a href="http://en.wikipedia.org/wiki/HTML5_video#Browser_support">played natively in your browser</a>, or if you have FFMPEG or LIBAV installed on your server, you can generate thumbnails from your video. Using either the "Generate" or "Randomize" buttons will create an array to choose from. The "Generate" button will always generate thumbnails from the same frames of your video, evenly spaced. If you don't like them, you can randomize the results with the "Randomize" button. If you want to see the first frame of the video, check the "Force 1st Frame Thumbnail" button. You can generate as many or as few as you need (up to 99 at a time). After creating an array of thumbnails you can save them all using the "Save all thumbnails" button.
33
 
34
+ If you know which frame you want to use for your thumbnail, click "Choose from video..." to select it from the video. This will only work for <a href="http://en.wikipedia.org/wiki/HTML5_video#Browser_support">videos that can be played natively in your browser</a>. If you want really fine control you can enter timecode in the "Thumbnail timecode" field. Use `mm:ss` format. Use decimals to approximate frames. For example, `23.5` will generate a thumbnail halfway between the 23rd and 24th seconds in the video. `02:23.25` would be one quarter of the way between the 143rd and 144th seconds.
35
 
36
  After you select a thumbnail it will be registered in the Wordpress Media Library and added to the video's attachments. Unused thumbnails will be deleted.
37
 
38
  In the plugin settings you can set the default maximum video width and height based on the dimensions of your particular template and those values will be filled in when you open the window. If you generate thumbnails, the video display dimensions will be adjusted automatically to match the size and aspect ratio of the video file. You can make further adjustments if you want. There are options to always fill the width of the template or to always set videos to the maximum width setting regardless of their resolution.
39
 
40
+ You can add subtitle and caption tracks by choosing properly formatted WebVTT files from the media library or entering a URL directly. Enter the two-letter language code and the label text that will be shown to users. Enabling the "default" option will turn the text track on when the page loads. The WordPress default player does not differentiate between captions and subtitles, but Video.js will show a different icon depending on the selection.
41
 
42
  I highly recommend using <a href="http://handbrake.fr/">Handbrake</a> to make a file with H.264 video and AAC audio in an MP4 container before uploading. If you're encoding with Handbrake make sure that "Web Optimized" is checked. Using Apple's Compressor, the "Streaming" setting should be "Fast Start" (not Fast Start - Compressed Header).
43
 
44
+ The plugin can use FFMPEG or LIBAV to encode videos and make thumbnails if you have one of them installed on your server. You can choose to generate thumbnails and additional video formats automatically whenever a new video is uploaded to the media library, and there are buttons to generate thumbnails and additional video formats for every video already in the media library.
45
 
46
+ By default the plugin looks for FFMPEG in `/usr/local/bin` but if the application is installed in a different place on your server, you can point it to the correct place in the plugin settings. Users running WordPress on Windows servers should try using Linux-style paths (with forward slashes instead of backslashes and a forward slash `/` instead of `C:\`). Multisite Super Admins must set the FFMPEG path in the Network settings page which will enable FFMPEG throughout the network.
47
 
48
+ If you have the proper libraries installed on your server, you can choose to replace your uploaded video with your preferred format, and generate as many as seven additional formats depending on your original source. 1080p, 720p, and 360p H.264, same resolution WEBM (VP9 or VP8) and OGV, and a custom format. Different browsers have different playback capabilities. Most desktop browsers can play H.264, and all modern mobile devices can play at least 360p H.264. If you create multiple H.264 resolutions, the highest resolution supported by the device will be served up automatically. The plugin will not upconvert your video, so if you upload a 720p video, it will not waste your time creating a 1080p version. There was a time when it seemed like a good idea to provide OGV or WEBM for some desktop browsers, but Firefox supports native H.264 playback in most operating systems now. I no longer recommend encoding OGV or WEBM unless you're making an open source principled stand against H.264. However, your needs may vary. VP9 WEBM is a next-generation codec not supported by many browsers, but it can make videos much smaller while still retaining quality.
49
 
50
+ The files will encode in the background and will take some time to complete, depending on your server setup and the length and size of your video. VP9 encoding will take much longer than any other format. The plugin adds a Video Encode Queue menu to the Tools menu. You will see encoding progress, the option to cancel an encoding job, and you should get an error message if something goes wrong. Users on Windows servers may get inconsistent results with the encoding queue.
51
 
52
  Encoded H.264 files can be fixed for streaming using "movflags faststart" introduced in recent versions of FFMPEG/LIBAV, or qt-faststart or MP4Box if you have one of them installed on your server and select it in the plugin settings. Without one of these options enabled, FFMPEG/LIBAV will place moov atoms at the end of H.264 encoded files, which in some cases forces the entire file to download before playback can start.
53
 
54
+ If you want to make OGV, WEBM, or H.264 files available and can't use the FFMPEG encode button, you can upload your own files to the same directory as the original and the plugin will automatically find them. For example, if your main file is awesomevid.mp4, the plugin will look for awesomevid-1080.mp4, awesomevid-720.mp4, awesomevid-360.mp4, awesomevid.webm, awesomevid-vp9.webm, awesomevid.ogv, and awesomevid-custom.mp4 as well. If your videos don't conform to that naming structure, you can manually assign them from the media library. No matter what format your original video is, you can use it in the shortcode and the plugin will attempt to find all compatible formats related to it. For example, you might have an AVI called awesomevid.avi which is not compatible with any browser, but if you have other formats encoded already, `[KGVID]http://yoursite.com/awesomevid.avi[/KGVID]` will ignore the incompatible AVI file, but find those other formats and embed them.
55
 
56
  If you want to make it easier for users to save your videos to their computers, you can choose to include a link by checking the "Generate Download Link Below Video" button.
57
 
61
 
62
  `<iframe src='http://www.kylegilman.net/?attachment_id=2897&kgvid_video_embed[enable]=true' frameborder='0' scrolling='no' width='640' height='360'></iframe>`
63
 
64
+ If you enable oEmbed provider data in the plugin settings, the URL of a post with a video shortcode in it or the URL of the video's attachment page will be converted to an embedded video on sites that allow oEmbed discovery. For example, http://www.kylegilman.net/2011/01/18/video-embed-thumbnail-generator-wordpress-plugin/ is the URL for this plugin on my website, but it has the oEmbed header for the video embedded in it so the URL will be converted to an embedded video on sites with oEmbed discovery enabled. WordPress limits oEmbed providers to an internal whitelist for security reasons. This plugin has an option to enable oEmbed discovery for users with the unfiltered_html capability.
65
+
66
  = Once you've filled in all your options, click "Insert into Post" and you'll get a shortcode in the visual editor like this =
67
 
68
+ `[KGVID]http://www.kylegilman.net/wp-content/uploads/2006/09/Reel-2012-05-15-720.mp4[/KGVID]`
 
69
 
70
+ = Translations included: =
71
 
72
  * Español por Andrew Kurtis de <a href="http://www.webhostinghub.com/">WebHostingHub</a>.
73
  * Français par F.R. 'Friss' Ferry, friss.designs@gmail.com
94
  * `loop="true/false"`
95
  * `autoplay="true/false"`
96
  * `watermark="http://www.example.com/image.png"` or `"false"` to disable.
97
+ * `watermark_link_to=home/parent/attachment/download/false"`
98
+ * `watermark_url="http://www.example.com/"` or `"false"` to disable. If this is set, it will override the `watermark_link_to` setting.
99
  * `title="Video Title"` or `"false"` to disable.
100
  * `embedcode="html code"` changes text displayed in the embed code overlay in order to provide a custom method for embedding a video or `"false"` to disable.
101
  * `view_count="true/false"` turns the view count on or off.
104
  * `downloadlink="true/false"` generates a link below the video to make it easier for users to save the video file to their computers.
105
  * `right_click="true/false"` allow or disable right-clicking on the video player.
106
  * `resize="true/false"` allow or disable responsive resizing.
107
+ * `auto_res="automatic/highest/lowest"` specify the video resolution when the page loads.
108
 
109
  = These options will add a subtitle/caption track =
110
 
112
  * `track_kind=subtitles/captions/chapters`
113
  * `track_srclang=xx` the track's two-character language code (en, fr, es, etc)
114
  * `track_label="Track Label"` text that will be shown to the user when selecting the track.
115
+ * `track_default="true/false"` track is enabled by default.
116
 
117
  = These options will only affect Video.js playback =
118
 
132
 
133
  * `gallery="true"` turns on the gallery
134
  * `gallery_thumb="xxx"` width in pixels to display gallery thumbnails
135
+ * `gallery_exclude="15,4322"` comma separated video attachment IDs. Excludes the videos from the gallery.
136
+ * `gallery_include="65,32,1533"` comma separated video attachment IDs. Includes only these videos in the gallery. Please note that include and exclude cannot be used together.
137
  * `gallery_orderby="menu_order/title/post_date/rand/ID"` criteria for sorting the gallery.
138
  * `gallery_order="ASC/DESC"` sort order.
139
  * `gallery_id="241"` post ID to display a gallery made up of videos associated with a different post.
140
  * `gallery_end="close/next"` either close the pop-up or start playing the next video when the current video finishes playing.
141
+ * `gallery_per_page="xx"` or `"false"` to disable pagination. Number of video thumbnails to show on each gallery page.
142
+ * `gallery_title="true/false"` display the title overlay on gallery thumbnails.
143
 
144
  == Installation ==
145
 
156
 
157
  = Why doesn't my video play? =
158
 
159
+ Most of the time your video doesn't play because it's not encoded in the right format. Videos have containers like mp4, mov, ogv, mkv, flv, etc and within those containers there are video and audio codecs like H.264, MPEG-4, VP8, etc. The best option for this plugin is an mp4 container with H.264 video and AAC audio. It's confusing, but there is a codec usually identified simply as "MPEG-4" of "MPEG-4 Visual" which is not the same thing as H.264 even if it's in an mp4 container. mp4s with MPEG-4 video will not play in most browsers, and if you don't use AAC audio you won't get any audio. I highly recommend using <a href="http://handbrake.fr/">Handbrake</a> to make a file with H.264 video and AAC audio in an MP4 container.
160
 
161
  Use <a href="http://mediaarea.net/en/MediaInfo">MediaInfo</a> to get really detailed information about your media files.
162
 
214
 
215
  This plugin can use FFMPEG or LIBAV to make thumbnails and create alternate video formats. Unfortunately most servers don't have FFMPEG installed and most shared hosting plans don't allow you to install FFMPEG because of the system resources it requires. You're getting this error message because you don't have FFMPEG installed in the most common directory. If you know you have FFMPEG installed on your server, you'll need to find the actual path to the program and enter it in the plugin settings field `Path to applications on server`
216
 
217
+ Most of the features of the plugin will work without FFMPEG. You can generate embed shortcodes for your videos and make thumbnails on any host because that part of the plugin is JavaScript running in your browser. But without FFMPEG you won't be able to automatically generate thumbnails or encode alternate formats on the server. If you don't have your own VPS or dedicated server, Dreamhost and Arvixe are two of the few shared hosts I know of that has FFMPEG installed and available for users.
218
 
219
  = How can I encode videos in directories protected by .htaccess passwords? =
220
 
229
 
230
  == Changelog ==
231
 
232
+ = 4.5 - July 7, 2015 =
233
+ * This is probably the last completely free major release. Some advanced features will be converted to premium add-ons in the future. More info in the <a href="https://wordpress.org/support/plugin/video-embed-thumbnail-generator">support forum</a>.
234
+ * Consolidated most video metadata database entries into a single array. This might slow things down the first time you load the Media Library.
235
+ * Added pagination option for video galleries.
236
+ * Added oEmbed provider data and option to allow oEmbed discovery from other sites.
237
+ * Added experimental WEBM VP9 encoding format.
238
+ * Added option to make the watermark overlay image a link.
239
+ * Added video stats column to Media Library list view.
240
+ * Added options for vertical video rotation and metadata removal using FFMPEG, now that some browsers recognize rotation metadata.
241
+ * Added "default" attribute for subtitle/caption text tracks to turn tracks on when the video loads.
242
+ * Added attachment edit hook that updates video thumbnail's parent post when the video's parent post changes.
243
+ * Added error handling and reporting for in-browser thumbnails.
244
+ * Added Video.js localization. Automatically changes Video.js language to the current WordPress language.
245
+ * Updated Video.js to version 4.12.7
246
+ * Updated Spanish translation.
247
+ * Updated Facebook Open Graph video embedding tags.
248
+ * Re-enabled native video player controls on mobile devices when using Video.js player for better responsive resizing and to allow Airplay & Chromecast controls.
249
+ * Removed superfluous gallery height option.
250
+ * Stopped inserting unnecessary width and height shortcode attributes when videos are set to the default width and height.
251
+ * Stopped inserting unnecessary poster URL shortcode attribute when poster is set in the media library.
252
+ * Fixed several bugs related to hosting media library files on external servers like Amazon S3.
253
+ * Fixed bug that deleted replacement videos before encoding was finished when simultaneous encodes are enabled.
254
+ * Fixed bug that dropped videos from the video encode queue when multiple videos were added to the database simultaneously, specifically when using Add From Server.
255
+ * Fixed bug that created squashed encoded videos when they were shot vertically on a mobile device.
256
+ * Fixed bug that added bad content to Open Graph video tag when other shortcodes were found before KGVID in the post.
257
+ * Fixed bug that wrote multiple unnecessary meta entries to the database when image attachments were updated.
258
+ * Fixed bug that disabled "Choose from Library" buttons in Firefox.
259
+ * Fixed bug that incorrectly indicated thumbnail selection video files did not load in Firefox.
260
+ * Fixed bug that allowed video thumbnails to overflow their container in the Media Library modal window in Firefox.
261
+ * Fixed bug that allowed crossdomain in-browser thumbnails to load, but then fail when trying to save them in Safari.
262
+ * Fixed bug that kept end of video overlay images on screen when user hit play again.
263
+ * Fixed bug that incorrectly resized videos embedded through iframe.
264
+ * Fixed bug that did not assign a default value to the qt-faststart/MP4Box application path for new installations.
265
+ * Fixed bug that allowed selection of multiple thumbnails in Embed Video from URL window
266
+ * Fixed number formatting of video play counter.
267
+ * Fixed encode queue text indent bug.
268
+
269
  = 4.4.2 - November 3, 2014 =
270
  * Added Google Universal Analytics event tracking.
271
  * Updated Spanish, French and Belgian translations.
705
 
706
  == Upgrade Notice ==
707
 
708
+ = 4.5 =
709
+ This is probably the last completely free major release. Some advanced features will be converted to premium add-ons in the future. More info in the support forum.
710
+
711
  = 3.0 =
712
  Fixes thumbnails & encodes in WP 3.5. Not compatible with earlier WP versions.
713
 
video-embed-thumbnail-generator.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Video Embed & Thumbnail Generator
4
  Plugin URI: http://www.kylegilman.net/2011/01/18/video-embed-thumbnail-generator-wordpress-plugin/
5
  Description: Generates thumbnails, HTML5-compliant videos, and embed codes for locally hosted videos. Requires FFMPEG or LIBAV for encoding.
6
- Version: 4.4.2
7
  Author: Kyle Gilman
8
  Author URI: http://www.kylegilman.net/
9
  Text Domain: video-embed-thumbnail-generator
@@ -49,7 +49,7 @@ Bulgarian: Emil Georgiev, svinqvmraka@gmail.com
49
 
50
  */
51
 
52
- if ( ! defined( 'ABSPATH' ) )
53
  die( "Can't load this file directly" );
54
 
55
  function kgvid_default_options_fn() {
@@ -58,7 +58,7 @@ function kgvid_default_options_fn() {
58
  $edit_others_capable = kgvid_check_if_capable('edit_others_posts');
59
 
60
  $options = array(
61
- "version" => 4.42,
62
  "embed_method" => "Video.js",
63
  "jw_player_id" => "",
64
  "template" => false,
@@ -69,6 +69,7 @@ function kgvid_default_options_fn() {
69
  "encode_720" => "on",
70
  "encode_mobile" => "on",
71
  "encode_webm" => false,
 
72
  "encode_ogg" => false,
73
  "encode_custom" => false,
74
  "custom_format" => array(
@@ -81,6 +82,7 @@ function kgvid_default_options_fn() {
81
  "ffmpeg_exists" =>"notchecked",
82
  "video_bitrate_flag" => false,
83
  "ffmpeg_vpre" => false,
 
84
  "nostdin" => false,
85
  "moov" => "none",
86
  "generate_thumbs" => 4,
@@ -90,9 +92,12 @@ function kgvid_default_options_fn() {
90
  "titlecode" => "<strong>",
91
  "poster" => "",
92
  "watermark" => "",
 
 
93
  "overlay_title" => "on",
94
  "overlay_embedcode" => false,
95
  "downloadlink" => false,
 
96
  "view_count" => false,
97
  "embeddable" => "on",
98
  "inline" => false,
@@ -102,9 +107,11 @@ function kgvid_default_options_fn() {
102
  "minimum_width" => false,
103
  "fullwidth" => false,
104
  "gallery_width" => "960",
105
- "gallery_height" => "540",
106
  "gallery_thumb" => "250",
107
  "gallery_end" => "",
 
 
 
108
  "controlbar_style" => "docked",
109
  "autoplay" => false,
110
  "loop" => false,
@@ -139,13 +146,15 @@ function kgvid_default_options_fn() {
139
  "auto_thumb_position" => 50,
140
  "right_click" => "on",
141
  "resize" => "on",
142
- "auto_res" => "on",
143
  "capabilities" => array(
144
  "make_video_thumbnails" => $upload_capable,
145
  "encode_videos" => $upload_capable,
146
  "edit_others_video_encodes" => $edit_others_capable
147
  ),
148
  "open_graph" => "on",
 
 
149
  "htaccess_login" => "",
150
  "htaccess_password" => "",
151
  "sample_format" => "mobile",
@@ -199,6 +208,99 @@ function kgvid_get_options() {
199
 
200
  }
201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  function kgvid_get_encode_queue() {
203
 
204
  if ( defined( 'DOING_CRON' ) ) { //unlike AJAX, cron doesn't load plugin.php
@@ -284,7 +386,18 @@ function kgvid_video_formats( $return_replace = false, $return_customs = true )
284
  "extension" => "webm",
285
  "mime" => "video/webm",
286
  "suffix" => ".webm",
287
- "vcodec" => "libvpx",
 
 
 
 
 
 
 
 
 
 
 
288
  ),
289
  "ogg" => array(
290
  "name" => "OGV",
@@ -488,14 +601,29 @@ function kgvid_plugin_meta_links( $links, $file ) {
488
  }
489
  add_filter( 'plugin_row_meta', 'kgvid_plugin_meta_links', 10, 2 );
490
 
 
 
 
 
 
 
 
 
 
 
491
  function kgvid_check_if_capable($capability) {
492
  global $wp_roles;
493
  $capable = array();
494
- foreach ( $wp_roles->roles as $role => $role_info ) {
495
- if ( is_array($role_info['capabilities']) && array_key_exists($capability, $role_info['capabilities']) && $role_info['capabilities'][$capability] == 1 ) {
496
- $capable[$role] = "on";
 
 
 
 
 
497
  }
498
- else { $capable[$role] = false; }
499
  }
500
  return $capable;
501
  }
@@ -504,23 +632,28 @@ function kgvid_set_capabilities($capabilities) {
504
 
505
  global $wp_roles;
506
 
507
- $default_options = kgvid_default_options_fn();
508
- foreach ( $default_options['capabilities'] as $default_capability => $default_enabled ) {
509
- if ( is_array($capabilities) && !array_key_exists($default_capability, $capabilities) ) {
510
- $capabilities[$default_capability] = array();
511
- }
512
- }
513
 
514
- foreach ( $capabilities as $capability => $enabled_roles ) {
515
- foreach ( $wp_roles->roles as $role => $role_info ) { //check all roles
516
- if ( is_array($role_info['capabilities']) && !array_key_exists($capability, $role_info['capabilities']) && array_key_exists($role, $enabled_roles) && $enabled_roles[$role] == "on" ) {
517
- $wp_roles->add_cap( $role, $capability );
 
518
  }
519
- if ( is_array($role_info['capabilities']) && array_key_exists($capability, $role_info['capabilities']) && !array_key_exists($role, $enabled_roles) ) {
520
- $wp_roles->remove_cap( $role, $capability );
 
 
 
 
 
 
 
 
521
  }
522
  }
523
- }
 
524
 
525
  }
526
 
@@ -550,12 +683,8 @@ function kgvid_url_to_id($url) {
550
  $url = str_replace(' ', '', $url); //in case a url with spaces got through
551
  // Get the path or the original size image by slicing the widthxheight off the end and adding the extension back
552
  $search_url = preg_replace( '/-\d+x\d+(\.(?:png|jpg|gif))$/i', '.' . pathinfo($url, PATHINFO_EXTENSION), $url );
553
- // Get the path to search postmeta for
554
- $search_url = explode( $uploads['baseurl'] . '/', $search_url );
555
 
556
- if ( is_array($search_url) && array_key_exists(1, $search_url) ) {
557
- $post_id = (int)$wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_value LIKE '%%%s'", $search_url[1] ) );
558
- }
559
 
560
  if ( $post_id ) { return $post_id; }
561
  else { return false; }
@@ -659,11 +788,11 @@ function kgvid_backwards_compatible($post_id) {
659
 
660
  if ( $wp_version < 3.5 ) {
661
  $field_id['poster'] = 'attachments['. $post_id .'][kgflashmediaplayer-poster]';
662
- $field_id['thumbtime'] = 'attachments['. $post_id .'][thumbtime]';
663
  }
664
  else {
665
  $field_id['poster'] = 'attachments-'. $post_id .'-kgflashmediaplayer-poster';
666
- $field_id['thumbtime'] = 'attachments-'. $post_id .'-thumbtime';
667
  }
668
  return $field_id;
669
 
@@ -671,6 +800,7 @@ function kgvid_backwards_compatible($post_id) {
671
 
672
  function kgvid_sanitize_url($movieurl) {
673
  $movieurl = rawurldecode($movieurl);
 
674
  $movie_extension = pathinfo(parse_url($movieurl, PHP_URL_PATH), PATHINFO_EXTENSION);
675
  $sanitized_url['noextension'] = preg_replace("/\\.[^.\\s]{3,4}$/", "", $movieurl);
676
  $sanitized_url['basename'] = sanitize_file_name(basename($movieurl,'.'.$movie_extension));;
@@ -765,31 +895,28 @@ function kgvid_set_video_dimensions($id, $gallery = false) {
765
  $options = kgvid_get_options();
766
  $moviefile = get_attached_file( $id );
767
  $video_meta = wp_get_attachment_metadata( $id );
 
768
 
769
- if ( is_array($video_meta) && array_key_exists('width', $video_meta) ) { $widthactual = $video_meta['width']; }
770
- else { $widthactual = get_post_meta($id, "_kgflashmediaplayer-actualwidth", true); }
771
- $widthset = get_post_meta($id, "_kgflashmediaplayer-width", true);
772
- if ( !$widthset ) { $widthset = $widthactual; }
773
 
774
- if ( is_array($video_meta) && array_key_exists('height', $video_meta) ) { $heightactual = $video_meta['height']; }
775
- else { $heightactual = get_post_meta($id, "_kgflashmediaplayer-actualheight", true); }
776
- $heightset = get_post_meta($id, "_kgflashmediaplayer-height", true);
777
- if ( !$heightset ) { $heightset = $heightactual; }
778
 
779
- if ( !empty($widthset) && !empty($heightset) ) { $aspect_ratio = $heightset/$widthset; }
780
  else { $aspect_ratio = $options['height']/$options['width']; }
781
 
782
  if ( $gallery ) {
783
- if ( $widthactual ) { $widthset = $widthactual; }
784
- if ( intval($widthset) > $options['gallery_width'] ) { $widthset = $options['gallery_width']; }
785
  }
786
  else {
787
- if ( $widthset > $options['width'] || $options['minimum_width'] == "on" ) { $widthset = $options['width']; }
788
  }
789
 
790
- $heightset = round(intval($widthset)*$aspect_ratio);
791
 
792
- $dimensions = array( 'width' => strval($widthset), 'height' => strval($heightset), 'actualwidth' => strval($widthactual), 'actualheight' => strval($heightactual) );
793
  return $dimensions;
794
 
795
  }
@@ -877,16 +1004,15 @@ function kgvid_encodevideo_info($movieurl, $postID) {
877
 
878
  //start with the new database info before checking other locations
879
 
880
- if ($children) {
881
  foreach ( $children as $child ) {
882
  $mime_type = get_post_mime_type($child->ID);
883
- $wp_attached_file = get_post_meta($child->ID, '_wp_attached_file', true);
884
- $wp_file_info = pathinfo($wp_attached_file);
885
  $video_meta = wp_get_attachment_metadata( $child->ID );
886
  $meta_format = get_post_meta($child->ID, '_kgflashmediaplayer-format', true);
887
  if ( $meta_format == $format || ( substr($wp_attached_file, -strlen($format_stats['suffix'])) == $format_stats['suffix'] && $meta_format == false ) ) {
888
- $encodevideo_info[$format]['url'] = $uploads['baseurl'].'/'.$wp_attached_file;
889
- $encodevideo_info[$format]['filepath'] = $uploads['basedir'].'/'.$wp_attached_file;
890
  $encodevideo_info[$format]['id'] = $child->ID;
891
  $encodevideo_info[$format]['exists'] = true;
892
  $encodevideo_info[$format]['writable'] = true;
@@ -1015,13 +1141,14 @@ function kgvid_get_video_dimensions($video = false) {
1015
  $movie_info['duration'] = ($movie_duration_hours * 60 * 60) + ($movie_duration_minutes * 60) + $movie_duration_seconds;
1016
 
1017
  preg_match('/rotate : (.*?)\n/', $output, $matches);
1018
- if ( is_array($matches) && array_key_exists(1, $matches) == true ) { $rotate = $matches[1]; }
1019
- else $rotate = "0";
1020
 
1021
  switch ($rotate) {
1022
  case "90": $movie_info['rotate'] = ' -vf "transpose=1"'; break;
1023
  case "180": $movie_info['rotate'] = ' -vf "hflip,vflip"'; break;
1024
  case "270": $movie_info['rotate'] = ' -vf "transpose=2"'; break;
 
1025
  default: $movie_info['rotate'] = ""; break;
1026
  }
1027
 
@@ -1030,7 +1157,7 @@ function kgvid_get_video_dimensions($video = false) {
1030
  exec ( $command, $output );
1031
  $output = implode("\n", $output);
1032
  $configuration = array();
1033
- $video_lib_array = array('libtheora', 'libvorbis', 'libvpx', 'libx264');
1034
  $aac_array = kgvid_aac_encoders();
1035
  $lib_list = array_merge($video_lib_array, $aac_array);
1036
  foreach ($lib_list as $lib) {
@@ -1172,6 +1299,24 @@ function kgvid_generate_encode_string($input, $output, $movie_info, $format, $wi
1172
  $watermark_filter = "";
1173
  }
1174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1175
  if ( $video_formats[$format]['type'] == 'h264' ) {
1176
 
1177
  $aac_array = kgvid_aac_encoders();
@@ -1296,8 +1441,8 @@ function kgvid_video_embed_enqueue_scripts() {
1296
 
1297
  //Video.js styles
1298
  if ( $options['embed_method'] == "Video.js" || $options['embed_method'] == "Strobe Media Playback" ) {
1299
- wp_enqueue_style( 'video-js', plugins_url("", __FILE__).'/video-js/video-js.css', '', '4.10.2' );
1300
- wp_enqueue_style( 'video-js-kg-skin', plugins_url("", __FILE__).'/video-js/kg-video-js-skin.css', '', $options['version'] );
1301
  }
1302
 
1303
  //plugin-related frontend styles
@@ -1306,8 +1451,6 @@ function kgvid_video_embed_enqueue_scripts() {
1306
  }
1307
  add_action('wp_enqueue_scripts', 'kgvid_video_embed_enqueue_scripts', 12);
1308
 
1309
- //add_action( 'all', create_function( '', 'error_log(print_r( current_filter(),true ));' ) );
1310
-
1311
  function enqueue_kgvid_script() { //loads plugin-related scripts in the admin area
1312
 
1313
  $options = kgvid_get_options();
@@ -1341,6 +1484,7 @@ function enqueue_kgvid_script() { //loads plugin-related scripts in the admin ar
1341
  'processing' => __('Processing...', 'video-embed-thumbnail-generator'),
1342
  'parentwarning_posts' => __("You are about to set all existing video thumbnails previously generated by this plugin as attachments of their posts rather than their associated videos. Proceed at your own risk.", 'video-embed-thumbnail-generator'),
1343
  'parentwarning_videos' => __("You are about to set all existing video thumbnails previously generated by this plugin as attachments of their videos rather than their associated posts. Proceed at your own risk.", 'video-embed-thumbnail-generator'),
 
1344
  'complete' => __('Complete', 'video-embed-thumbnail-generator'),
1345
  'tracktype' => __('Track type:', 'video-embed-thumbnail-generator'),
1346
  'subtitles' => __('subtitles', 'video-embed-thumbnail-generator'),
@@ -1351,6 +1495,7 @@ function enqueue_kgvid_script() { //loads plugin-related scripts in the admin ar
1351
  'choosefromlibrary' => __('Choose from Library', 'video-embed-thumbnail-generator'),
1352
  'languagecode' => __('Language code:', 'video-embed-thumbnail-generator'),
1353
  'label' => _x('Label:', 'noun', 'video-embed-thumbnail-generator'),
 
1354
  'custom' => _x('Custom', 'Custom format', 'video-embed-thumbnail-generator')
1355
  ) );
1356
 
@@ -1371,16 +1516,77 @@ function kgvid_video_embed_print_scripts() {
1371
  if ( !empty($posts) && is_array($posts) ) {
1372
  foreach ( $posts as $post ) {
1373
  if ( $options['open_graph'] == "on"
1374
- && preg_match_all( '/'. $pattern .'/s', $post->post_content, $matches )
 
1375
  && is_array($matches)
1376
  && array_key_exists( 2, $matches ) && array_key_exists( 5, $matches )
1377
- && !empty($matches[5][0])
1378
- && ( in_array( 'KGVID', $matches[2] ) || in_array( 'FMP', $matches[2] ) ) ) { //if KGVID or FMP shortcode is in posts on this page.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1379
 
1380
- echo '<meta property="og:video" content="'.$matches[5][0].'" />'."\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1381
 
1382
- if ( array_key_exists( 3, $matches ) ) {
1383
- $attributes = shortcode_parse_atts($matches[3][0]);
1384
  if ( is_array($attributes) && array_key_exists( 'width', $attributes ) ) {
1385
  echo '<meta property="og:video:width" content="'.$attributes['width'].'" />'."\n";
1386
  if ( array_key_exists( 'height', $attributes ) ) {
@@ -1388,8 +1594,25 @@ function kgvid_video_embed_print_scripts() {
1388
  }
1389
  }
1390
  }
1391
- break;
1392
- }//end if shortcode is in post
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1393
  }//end post loop
1394
  }//end if posts
1395
 
@@ -1402,7 +1625,7 @@ function kgvid_enqueue_shortcode_scripts() {
1402
 
1403
  if ( $options['embed_method'] == "Video.js" || $options['embed_method'] == "Strobe Media Playback" ) {
1404
  wp_enqueue_script( 'video-quality-selector', plugins_url("", __FILE__).'/video-js/video-quality-selector.js', array('video-js'), $options['version'], true );
1405
- wp_enqueue_script( 'video-js', plugins_url("", __FILE__).'/video-js/video.js', '', '4.10.2', true );
1406
  add_action('wp_footer', 'kgvid_print_videojs_footer', 99);
1407
  }
1408
 
@@ -1412,14 +1635,172 @@ function kgvid_enqueue_shortcode_scripts() {
1412
 
1413
  wp_enqueue_script( 'kgvid_video_embed', plugins_url("/js/kgvid_video_embed.js", __FILE__), array('jquery'), $options['version'], true );
1414
 
 
 
 
 
 
 
 
 
 
1415
  }
1416
 
1417
  function kgvid_print_videojs_footer() { //called by the shortcode if Video.js is used
1418
 
1419
- echo '<script type="text/javascript">if(typeof videojs !== "undefined") { videojs.options.flash.swf = "'.plugins_url("", __FILE__).'/video-js/video-js.swf?4.5.1"; }</script>'."\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1420
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1421
  }
1422
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1423
  function kgvid_shortcode_atts($atts) {
1424
 
1425
  $options = kgvid_get_options();
@@ -1429,7 +1810,7 @@ function kgvid_shortcode_atts($atts) {
1429
 
1430
  $default_atts = array(
1431
  'id' => '',
1432
- 'orderby' => 'menu_order',
1433
  'order' => 'ASC',
1434
  'videos' => -1,
1435
  'width' => $options['width'],
@@ -1440,6 +1821,8 @@ function kgvid_shortcode_atts($atts) {
1440
  'autohide' => $options['autohide'],
1441
  'poster' => $options['poster'],
1442
  'watermark' => $options['watermark'],
 
 
1443
  'endofvideooverlay' => $options['endofvideooverlay'],
1444
  'endofvideooverlaysame' => $options['endofvideooverlaysame'],
1445
  'playbutton' => $options['playbutton'],
@@ -1451,13 +1834,15 @@ function kgvid_shortcode_atts($atts) {
1451
  'configuration' => $options['configuration'],
1452
  'skin' => $options['skin'],
1453
  'gallery' => 'false',
 
1454
  'gallery_thumb' => $options['gallery_thumb'],
1455
- 'gallery_orderby' => 'menu_order',
1456
  'gallery_order' => 'ASC',
1457
  'gallery_exclude' => '',
1458
  'gallery_include' => '',
1459
  'gallery_id' => $post_ID,
1460
  'gallery_end' => $options['gallery_end'],
 
1461
  'volume' => $options['volume'],
1462
  'mute' => $options['mute'],
1463
  'title' => $options['overlay_title'],
@@ -1473,7 +1858,8 @@ function kgvid_shortcode_atts($atts) {
1473
  'track_kind' => 'subtitles',
1474
  'track_srclang' => substr(get_bloginfo('language'), 0, 2),
1475
  'track_src' => '',
1476
- 'track_label' => get_bloginfo('language')
 
1477
  );
1478
 
1479
  $custom_atts_return = array();
@@ -1502,20 +1888,20 @@ function kgvid_shortcode_atts($atts) {
1502
  "view_count",
1503
  "inline",
1504
  "resize",
1505
- "auto_res",
1506
  "downloadlink",
1507
  "mute",
1508
- "fullwidth"
 
1509
  );
1510
  foreach ( $checkbox_convert as $query ) {
1511
  if ( $query_atts[$query] == "on" ) { $query_atts[$query] = "true"; }
1512
  if ( $query_atts[$query] == false ) { $query_atts[$query] = "false"; }
1513
  }
1514
 
1515
- if ( $options['js_skin'] == "" ) { $options['js_skin'] = "vjs-default-skin"; }
1516
- if ( is_array($atts) && array_key_exists('skin', $atts) ) {
1517
- $options['js_skin'] = $atts['skin']; //allows user to set skin for individual videos using the skin="" attribute
1518
- }
1519
 
1520
  return $query_atts;
1521
 
@@ -1524,7 +1910,7 @@ function kgvid_shortcode_atts($atts) {
1524
  function KGVID_shortcode($atts, $content = ''){
1525
 
1526
  global $content_width;
1527
- static $kgvid_video_id;
1528
  if ( !$kgvid_video_id ) { $kgvid_video_id = 0; }
1529
 
1530
  $content_width_save = $content_width;
@@ -1533,7 +1919,7 @@ function KGVID_shortcode($atts, $content = ''){
1533
  if ( !is_feed() ) {
1534
 
1535
  $options = kgvid_get_options();
1536
-
1537
  kgvid_enqueue_shortcode_scripts();
1538
 
1539
  if ( in_the_loop() ) { $post_ID = get_the_ID(); }
@@ -1593,13 +1979,12 @@ function KGVID_shortcode($atts, $content = ''){
1593
 
1594
  if ( !empty($id) ) { //if the video is an attachment in the WordPress db
1595
 
1596
- if ( empty($content) ) {
1597
- $content = wp_get_attachment_url($id);
1598
- if ( $content == false ) { echo "Invalid video ID"; continue; }
1599
- }
1600
 
1601
  $encodevideo_info = kgvid_encodevideo_info($content, $id);
1602
  $attachment_info = get_post( $id );
 
1603
 
1604
  $dimensions = kgvid_set_video_dimensions($id);
1605
 
@@ -1611,8 +1996,8 @@ function KGVID_shortcode($atts, $content = ''){
1611
  $poster_id = get_post_meta($id, '_kgflashmediaplayer-poster-id', true);
1612
  if ( !empty($poster_id) ) {
1613
  $poster_image_src = wp_get_attachment_image_src($poster_id, 'full');
1614
- if ( empty($query_atts['poster']) ) { $query_atts['poster'] = $poster_image_src[0]; } //if there's no poster URL set, use the database to set it automatically
1615
- if ( $poster_image_src[0] == $query_atts['poster'] && intval($query_atts['width']) <= get_option('medium_size_h') ) {
1616
  $query_atts['poster'] = kgvid_get_attachment_medium_url($poster_id);
1617
  }
1618
  }
@@ -1688,8 +2073,43 @@ function KGVID_shortcode($atts, $content = ''){
1688
  if ( $query_atts['align'] == "right" ) { $aligncode = ' kgvid_wrapper_auto_left'; }
1689
  }
1690
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1691
  $code .= '<div id="kgvid_'.$div_suffix.'_wrapper" class="kgvid_wrapper'.$aligncode.'">'."\n\t\t\t";
1692
- $code .= '<div id="video_'.$div_suffix.'_div" class="fitvidsignore kgvid_videodiv" data-id="'.$div_suffix.'" itemprop="video" itemscope itemtype="https://schema.org/VideoObject">';
1693
  if ( $query_atts["poster"] != '' ) { $code .= '<meta itemprop="thumbnailUrl" content="'.esc_attr($query_atts["poster"]).'" />'; }
1694
  if ( !empty($id) ) { $schema_embedURL = site_url('/')."?attachment_id=".$id."&amp;kgvid_video_embed[enable]=true"; }
1695
  else { $schema_embedURL = $content; }
@@ -1702,24 +2122,23 @@ function KGVID_shortcode($atts, $content = ''){
1702
  else { $description = ""; }
1703
  if ( !empty($description) ) { $code .= '<meta itemprop="description" content="'.esc_attr($description).'" />'; }
1704
 
1705
- $track_keys = array('kind', 'srclang', 'src', 'label');
1706
- $track_option = get_post_meta($id, "_kgflashmediaplayer-track", true);
1707
- if ( !is_array($track_option) ) {
1708
- $track_option = array();
1709
- $track_option[0] = array ( 'kind' => '', 'srclang' => '', 'src' => '', 'label' => '' );
1710
  }
1711
  foreach ( $track_keys as $key ) {
1712
- if ( empty($track_option[0][$key]) ) { $track_option[0][$key] = $query_atts['track_'.$key]; }
1713
  }
1714
 
1715
  $track_code = "";
1716
- if ( !empty($track_option[0]['src']) ) {
1717
- foreach ( $track_option as $track => $track_attribute ) {
1718
  foreach ( $track_attribute as $attribute => $value ) {
1719
  if ( empty($value) ) { $track_attribute[$attribute] = $query_atts['track_'.$attribute]; }
1720
  }
1721
  if ( $options['embed_method'] == "WordPress Default" && $track_attribute['kind'] == 'captions' ) { $track_attribute['kind'] = 'subtitles'; }
1722
- $track_code .= "\t\t\t\t\t<track kind='".esc_attr($track_attribute['kind'])."' src='".esc_attr($track_attribute['src'])."' srclang='".esc_attr($track_attribute['srclang'])."' label='".esc_attr($track_attribute['label'])."' />\n";
1723
  }
1724
  }
1725
 
@@ -1784,12 +2203,14 @@ function KGVID_shortcode($atts, $content = ''){
1784
  krsort($sources);
1785
 
1786
  $jw_tracks = array();
1787
- if ( !empty($track_option[0]['src']) ) {
1788
- foreach ( $track_option as $track => $track_attribute ) {
1789
  foreach ( $track_attribute as $attribute => $value ) {
1790
  if ( empty($value) ) { $track_attribute[$attribute] = $query_atts['track_'.$attribute]; }
1791
  }
1792
- $jw_tracks[] = '{ file:\''.esc_attr($track_attribute['src']).'\', kind:\''.esc_attr($track_attribute['kind']).'\', label:\''.esc_attr($track_attribute['label']).'\'}';
 
 
1793
  }
1794
  }
1795
 
@@ -1831,6 +2252,8 @@ function KGVID_shortcode($atts, $content = ''){
1831
 
1832
  $enable_resolutions_plugin = false;
1833
  $x = 20;
 
 
1834
  foreach ($video_formats as $format => $format_stats) {
1835
  if ( $format != "original" && $encodevideo_info[$format]["url"] == $content ) { unset($sources['original']); }
1836
  if ( $encodevideo_info[$format]["exists"] ) {
@@ -1842,12 +2265,14 @@ function KGVID_shortcode($atts, $content = ''){
1842
  else { $source_key = $x; }
1843
 
1844
  $sources[$source_key] = "\t\t\t\t\t".'<source src="'.esc_attr($encodevideo_info[$format]["url"]).'?id='.$kgvid_video_id.'" type="'.$format_stats["mime"].'"';
 
1845
  if ( $format_stats['type'] == 'h264' ) {
1846
  $sources[$source_key] .= ' data-res="'.$format_stats['label'].'"';
1847
  if ( $mp4already ) { //there is more than one resolution available
1848
  $enable_resolutions_plugin = true;
1849
  }
1850
  $mp4already = true;
 
1851
  }
1852
  else { $sources[$source_key] .= ' data-res="'.$format_stats['name'].'"'; }
1853
  $sources[$source_key] .= '>'."\n";
@@ -1855,6 +2280,7 @@ function KGVID_shortcode($atts, $content = ''){
1855
  $x--;
1856
  }
1857
  krsort($sources);
 
1858
 
1859
  $code .= '<video id="video_'.$div_suffix.'" ';
1860
  if ( $query_atts["loop"] == 'true') { $code .= 'loop '; }
@@ -1863,9 +2289,18 @@ function KGVID_shortcode($atts, $content = ''){
1863
  $code .= 'preload="'.$options['preload'].'" ';
1864
  if ( $query_atts["poster"] != '' ) { $code .= 'poster="'.esc_attr($query_atts["poster"]).'" '; }
1865
  $code .= 'width="'.$query_atts["width"].'" height="'.esc_attr($query_atts["height"]).'"';
1866
- $code .= ' class="fitvidsignore '.esc_attr('video-js '.$options['js_skin']).'" data-setup=\'{';
1867
- if ( $enable_resolutions_plugin ) { $code .= ' "plugins" : { "resolutionSelector" : { "force_types" : ["video/mp4"] } } '; }
1868
- $code .= '}\'';
 
 
 
 
 
 
 
 
 
1869
  $code .= ">\n";
1870
 
1871
  $code .= implode("", $sources); //add the <source> tags created earlier
@@ -1876,8 +2311,8 @@ function KGVID_shortcode($atts, $content = ''){
1876
  $code .= "\t\t\t</div>\n";
1877
  $show_views = false;
1878
  if ( !empty($id) || !empty($query_atts['caption']) || $query_atts['downloadlink'] == "true" || $content == plugins_url('/images/sample-video-h264.mp4', __FILE__) ) { //generate content below the video
1879
- $view_count = number_format(intval(get_post_meta($id, "_kgflashmediaplayer-starts", true)));
1880
- if ( empty($view_count) ) { $view_count = "0"; }
1881
  if ( $content == plugins_url('/images/sample-video-h264.mp4', __FILE__) ) { $view_count = "XX"; }
1882
  if ( $query_atts['view_count'] == "true" ) { $show_views = true; }
1883
  if ( !empty($query_atts['caption']) || $show_views || $query_atts['downloadlink'] == "true" ) {
@@ -1888,7 +2323,7 @@ function KGVID_shortcode($atts, $content = ''){
1888
  if ( $query_atts['downloadlink'] == "true" ) {
1889
  if ( !empty($query_atts['caption']) ) { $code .= '<br>'; }
1890
  $forceable = false;
1891
- if ( !empty($id) ) {
1892
  $filepath = get_attached_file($id);
1893
  if ( file_exists($filepath) ) {
1894
  $forceable = true;
@@ -1903,9 +2338,7 @@ function KGVID_shortcode($atts, $content = ''){
1903
  }
1904
  }
1905
 
1906
- if ( ( $query_atts['title'] != "false" && $options['embed_method'] != "JW Player" )
1907
- || $query_atts['embedcode'] != "false" ) { //generate content overlaid on video
1908
- $kgvid_meta = true;
1909
  $code .= "\t\t\t<div style=\"display:none;\" id=\"video_".$div_suffix."_meta\" class=\"kgvid_video_meta kgvid_video_meta_hover\">\n";
1910
  if ( $query_atts['embedcode'] != "false" ) {
1911
  if ( $query_atts['embedcode'] == "true" ) { $iframeurl = site_url('/')."?attachment_id=".$id."&amp;kgvid_video_embed[enable]=true"; }
@@ -1918,51 +2351,54 @@ function KGVID_shortcode($atts, $content = ''){
1918
  }
1919
  $code .= "\t\t\t</div>\n";
1920
  }
1921
- else { $kgvid_meta = false; }
1922
- if ( !empty($query_atts["watermark"]) && $query_atts["watermark"] != "false" ) { $code .= "<div style=\"display:none;\" id='video_".$div_suffix."_watermark' class='kgvid_watermark'><img src='".esc_attr($query_atts["watermark"])."' alt='watermark'></div>"; } //generate watermark
1923
- $code .= "\t\t</div>"; //end kgvid_XXXX_wrapper div
1924
-
1925
- $video_variables = array(
1926
- 'id' => $div_suffix,
1927
- 'attachment_id' => $id,
1928
- 'player_type' => $options['embed_method'],
1929
- 'width' => $query_atts['width'],
1930
- 'height' => $query_atts['height'],
1931
- 'fullwidth' => $query_atts['fullwidth'],
1932
- 'countable' => $countable,
1933
- 'autoplay' => $query_atts['autoplay'],
1934
- 'set_volume' => $query_atts['volume'],
1935
- 'mute' => $query_atts['mute'],
1936
- 'meta' => $kgvid_meta,
1937
- 'endofvideooverlay' => $query_atts['endofvideooverlay'],
1938
- 'resize' => $query_atts['resize'],
1939
- 'auto_res' => $query_atts['auto_res'],
1940
- 'right_click' => $query_atts['right_click']
1941
- );
1942
 
1943
- if ( $options['embed_method'] == "Video.js" ) {
1944
- $video_variables['resolutions_plugin'] = $enable_resolutions_plugin;
1945
- }
 
 
 
 
 
 
 
 
 
1946
 
1947
- if ( $options['embed_method'] == "Strobe Media Playback" && $flash_settings['flash_source_found'] ) {
 
 
 
 
 
1948
 
1949
- $video_variables['swfurl'] = plugins_url('', __FILE__)."/flash/StrobeMediaPlayback.swf";
1950
- $video_variables['expressinstallswfurl'] = plugins_url("", __FILE__)."/flash/expressInstall.swf";
1951
- $video_variables['flashvars'] = $flash_settings['flashvars'];
1952
- $video_variables['params'] = $flash_settings['params'];
 
 
1953
 
1954
- } //if Strobe Media
 
 
 
 
 
1955
 
1956
- wp_localize_script( 'kgvid_video_embed', 'kgvidL10n_frontend', array(
1957
- 'ajaxurl' => admin_url( 'admin-ajax.php', is_ssl() ? 'admin' : 'http' ),
1958
- 'ajax_nonce' => wp_create_nonce('kgvid_frontend_nonce'),
1959
- 'playstart' => _x("Play Start", 'noun for Google Analytics event', 'video-embed-thumbnail-generator'),
1960
- 'completeview' => _x("Complete View", 'noun for Google Analytics event', 'video-embed-thumbnail-generator'),
1961
- 'next' => _x("Next", 'button text to play next video', 'video-embed-thumbnail-generator'),
1962
- 'previous' => _x("Previous", 'button text to play previous video', 'video-embed-thumbnail-generator')
1963
- ) );
1964
 
1965
- wp_localize_script( 'kgvid_video_embed', 'kgvid_video_vars_'.$div_suffix, $video_variables ); //add video variables in footer
 
 
 
 
 
 
 
 
1966
 
1967
  $kgvid_video_id++;
1968
 
@@ -1972,90 +2408,43 @@ function KGVID_shortcode($atts, $content = ''){
1972
 
1973
  else { //if gallery
1974
 
1975
- wp_enqueue_script( 'simplemodal', plugins_url("/js/jquery.simplemodal.1.4.5.min.js", __FILE__), '', '1.4.5', true );
1976
-
1977
  static $kgvid_gallery_id = 0;
1978
-
1979
- $args = array(
1980
- 'post_type' => 'attachment',
1981
- 'orderby' => $query_atts['gallery_orderby'],
1982
- 'order' => $query_atts['gallery_order'],
1983
- 'post_mime_type' => 'video',
1984
- 'numberposts' => -1,
1985
- 'post_status' => null,
1986
- 'post_parent' => $query_atts['gallery_id'],
1987
- 'exclude' => $query_atts['gallery_exclude']
 
1988
  );
1989
- if ( !empty($query_atts['gallery_include']) ) {
1990
- $args['include'] = $query_atts['gallery_include'];
1991
- unset($args['post_parent']);
1992
- }
1993
- $attachments = get_posts($args);
1994
- if ($attachments) {
1995
- if ( $query_atts['align'] == "left" ) { $aligncode = ' kgvid_textalign_left'; }
1996
- if ( $query_atts['align'] == "center" ) { $aligncode = ' kgvid_textalign_center'; }
1997
- if ( $query_atts['align'] == "right" ) { $aligncode = ' kgvid_textalign_right'; }
1998
- if ( $query_atts['inline'] == "true" ) { $aligncode .= ' kgvid_wrapper_inline'; }
1999
- $div_suffix = substr(uniqid(rand(), true),0,4);
2000
- $code .= '<div class="kgvid_gallerywrapper'.$aligncode.'" id="kgvid_gallery_'.$kgvid_gallery_id.'">';
2001
- foreach ( $attachments as $attachment ) {
2002
- $thumbnail_url = get_post_meta($attachment->ID, "_kgflashmediaplayer-poster", true);
2003
- $poster_id = get_post_meta($attachment->ID, '_kgflashmediaplayer-poster-id', true);
2004
- if ( !empty($poster_id) && intval($query_atts['gallery_thumb']) <= get_option('medium_size_h') ) {
2005
- $poster_post = get_post($poster_id);
2006
- if ( $poster_post->guid == $thumbnail_url ) {
2007
- $thumbnail_url = kgvid_get_attachment_medium_url($poster_id);
2008
- } //use the "medium" size image if available
2009
- }
2010
- if (!$thumbnail_url) { $thumbnail_url = $options['poster']; } //use the default poster if no thumbnail set
2011
- if (!$thumbnail_url) { $thumbnail_url = plugins_url('/images/nothumbnail.jpg', __FILE__);} //use the blank image if no other option
2012
-
2013
- $downloadlink = get_post_meta($attachment->ID, "_kgflashmediaplayer-downloadlink", true);
2014
- if ( empty($query_atts['caption']) ) { $query_atts['caption'] = $attachment->post_excerpt; }
2015
- $below_video = 0;
2016
- if ( !empty($query_atts['caption']) ) { $below_video = 1; }
2017
- if ( $downloadlink == "checked" ) { ++$below_video; }
2018
-
2019
- if ( $options['embed_method'] == "WordPress Default" ) {
2020
-
2021
- $library = apply_filters( 'wp_video_shortcode_library', 'mediaelement' );
2022
- if ( 'mediaelement' === $library && did_action( 'init' ) ) {
2023
- wp_enqueue_style( 'wp-mediaelement' );
2024
- wp_enqueue_script( 'wp-mediaelement' );
2025
- }
2026
-
2027
- $play_button_class = "mejs-overlay-button";
2028
- $play_scale = strval( round(intval($query_atts["gallery_thumb"])/400,2) );
2029
- $play_translate = 5;
2030
- }
2031
- else {
2032
- $play_button_class = "vjs-big-play-button";
2033
- $play_scale = strval( round(intval($query_atts["gallery_thumb"])/600,2) );
2034
- $play_translate = 30;
2035
- }
2036
-
2037
- $dimensions = kgvid_set_video_dimensions($attachment->ID, true);
2038
-
2039
- $code .= '<div class="kgvid_video_gallery_thumb" id="kgvid_video_gallery_thumb_kgvid_'.strval($kgvid_video_id).'" data-id="kgvid_'.strval($kgvid_video_id).'" data-width="'.esc_attr($dimensions['width']).'" data-height="'.esc_attr($dimensions['height']).'" data-meta="'.esc_attr($below_video).'" data-gallery_end="'.esc_attr($query_atts['gallery_end']).'" style="max-width:'.$query_atts["gallery_thumb"].'px"><img src="'.esc_attr($thumbnail_url).'" alt="'.esc_attr($attachment->post_title).'"><div class="'.esc_attr($options['js_skin']).'" ><div class="'.$play_button_class.'" style="-webkit-transform: scale('.$play_scale.') translateY(-'.$play_translate.'px); -o-transform: scale('.$play_scale.') translateY(-'.$play_translate.'px); -ms-transform: scale('.$play_scale.') translateY(-'.$play_translate.'px); transform: scale('.$play_scale.') translateY(-'.$play_translate.'px);"><span></span></div></div><div class="titlebackground"><div class="videotitle">'.$attachment->post_title.'</div></div></div>'."\n\t\t\t";
2040
-
2041
- $shortcode = '[KGVID autoplay="true" id="'.$attachment->ID.'" width="'.$dimensions['width'].'" height="'.$dimensions['height'].'"';
2042
- if ($downloadlink == "checked") { $shortcode .= ' downloadlink="true"'; }
2043
- $shortcode .= '][/KGVID]';
2044
 
2045
- $popup_code = do_shortcode($shortcode);
2046
 
2047
- wp_localize_script( 'kgvid_video_embed', 'kgvid_video_popup_code_kgvid_'.strval($kgvid_video_id-1), $popup_code ); //add popup video code in footer
 
 
 
2048
 
2049
- } //end attachment loop
 
 
2050
 
2051
- $code .= '</div>'; //end wrapper div
2052
 
2053
- $kgvid_gallery_id++;
2054
 
2055
- } //if there are attachments
2056
  } //if gallery
 
2057
  } //if not feed
 
2058
  return $code;
 
2059
  }
2060
  add_shortcode('FMP', 'KGVID_shortcode');
2061
  add_shortcode('KGVID', 'KGVID_shortcode');
@@ -2111,6 +2500,139 @@ function kgvid_clear_child_format() {
2111
  }
2112
  add_action('wp_ajax_kgvid_clear_child_format', 'kgvid_clear_child_format');
2113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2114
  function kgvid_ajax_generate_encode_checkboxes() {
2115
 
2116
  check_ajax_referer( 'video-embed-thumbnail-generator-nonce', 'security' );
@@ -2123,10 +2645,12 @@ function kgvid_ajax_generate_encode_checkboxes() {
2123
 
2124
  if (isset($_POST['encodeformats'])) {
2125
  $encode_checked = $_POST['encodeformats'];
 
2126
  foreach ( $encode_checked as $format => $checked ) {
2127
- if ( $checked == "true" ) { update_post_meta($post_id, '_kgflashmediaplayer-encode'.$format, 'on'); }
2128
- else { update_post_meta($post_id, '_kgflashmediaplayer-encode'.$format, 'notchecked'); }
2129
  }
 
2130
  }
2131
 
2132
  $checkboxes = kgvid_generate_encode_checkboxes($movieurl, $post_id, $page, $blog_id);
@@ -2149,7 +2673,6 @@ function kgvid_generate_encode_checkboxes($movieurl, $post_id, $page, $blog_id =
2149
  $post_mime_type = "";
2150
  $actualwidth = "1921";
2151
  $actualheight = "1081";
2152
- $rotated = false;
2153
  $encodevideo_info = array();
2154
  $is_attachment = false;
2155
 
@@ -2166,8 +2689,6 @@ function kgvid_generate_encode_checkboxes($movieurl, $post_id, $page, $blog_id =
2166
  $dimensions = kgvid_set_video_dimensions($post_id);
2167
  $actualwidth = $dimensions['actualwidth'];
2168
  $actualheight = $dimensions['actualheight'];
2169
- $rotated = get_post_meta($post_id, "_kgflashmediaplayer-rotate", true);
2170
-
2171
  }
2172
  else { //video's not in the database
2173
  $is_attachment = false;
@@ -2181,18 +2702,13 @@ function kgvid_generate_encode_checkboxes($movieurl, $post_id, $page, $blog_id =
2181
  if ( is_array($video_entry) && array_key_exists('movie_info', $video_entry) ) {
2182
  $actualwidth = $video_entry['movie_info']['width'];
2183
  $actualheight = $video_entry['movie_info']['height'];
2184
- $rotated = $video_entry['movie_info']['rotate'];
2185
  }
2186
  break;
2187
  }
2188
  }
2189
- }
2190
  reset($video_encode_queue);
2191
-
2192
- if ( $page == "queue" ) {
2193
- //$info = pathinfo($movieurl);
2194
- //$post_id = 'singleurl_'.sanitize_title_with_dashes(urldecode(basename($movieurl,'.'.$info['extension'])));
2195
  }
 
2196
  }
2197
  if ( $post_mime_type == "video/m4v" || $post_mime_type == "video/quicktime" ) { $post_mime_type = "video/mp4"; }
2198
 
@@ -2231,6 +2747,9 @@ function kgvid_generate_encode_checkboxes($movieurl, $post_id, $page, $blog_id =
2231
  elseif ( array_key_exists($format, $video_formats) ) { //don't recreate any formats that were previously unset
2232
  $video_formats[$format]['status'] = $value['status'];
2233
  }
 
 
 
2234
  }
2235
  $video_queued = true;
2236
  break;
@@ -2244,101 +2763,31 @@ function kgvid_generate_encode_checkboxes($movieurl, $post_id, $page, $blog_id =
2244
 
2245
  if ( strpos($post_mime_type, $format) !== false ) { continue; } //skip webm or ogv checkbox if the video is webm or ogv
2246
 
2247
- $encodeset[$format] = "";
2248
- $checked[$format] = "";
2249
- $meta[$format] = "";
2250
- $disabled[$format] = "";
2251
- $child_id[$format] = "";
2252
-
2253
  if ( empty($movieurl) ) { $disabled[$format] = ' disabled title="Please enter a valid video URL"'; }
2254
 
2255
  if ( !array_key_exists('status', $format_stats) ) { $format_stats['status'] = "notchecked"; } //if this video isn't in the queue
2256
 
2257
- if ( $is_attachment ) { $encodeset[$format] = get_post_meta($post_id, "_kgflashmediaplayer-encode".$format, true); }
2258
- if ( $encodeset[$format] == "" && strpos($format, 'custom_') === false ) { $encodeset[$format] = $options['encode_'.$format]; }
2259
-
2260
  if ( $format_stats['status'] == "lowres" ||
2261
  (
2262
  $actualheight != "" && ($format == "1080" || $format == "720") &&
2263
  (
2264
  ( strpos($post_mime_type, "mp4") !== false && $actualheight <= $format_stats['height'] ) ||
2265
- ( strpos($post_mime_type, "mp4") === false && $actualheight < $format_stats['height'] ) ||
2266
- ( $actualheight == $format_stats['height'] && $encodeset['fullres'] == "on" )
2267
  )
2268
  )
2269
  ) { continue; } //if the format is bigger than the original video, skip the checkbox
2270
 
2271
- if ( $encodeset[$format] == "on" || $format_stats['status'] == "queued" ) { $checked[$format] = 'checked'; }
2272
-
2273
- if ( $format_stats['status'] != "notchecked" ) { //File is in queue
2274
- $meta[$format] = ' <strong>'.ucfirst($format_stats['status']).'</strong>';
2275
- if ( $format_stats['status'] == "error" ) {
2276
- $meta[$format] .= ': <span class="kgvid_warning">'.stripslashes($video_encode_queue[$video_key]['encode_formats'][$format]['lastline'])."</span>";
2277
- }
2278
- }
2279
-
2280
- if ( !empty($encodevideo_info) ) {
2281
- if ( $encodevideo_info[$format]['exists'] ) { //if the video file exists
2282
-
2283
- if ( array_key_exists('id', $encodevideo_info[$format]) ) {
2284
- $child_id[$format] = $encodevideo_info[$format]['id'];
2285
- $was_picked = get_post_meta( $child_id[$format], '_kgflashmediaplayer-pickedformat', true );
2286
- }
2287
- else { $was_picked = false; }
2288
-
2289
- if ( $format_stats['status'] != "encoding" ) { // not currently encoding
2290
- if ( $format_stats['status'] == "notchecked" ) {
2291
- if ( $was_picked != false ) { $meta[$format] = ' <strong>Set: '.basename($encodevideo_info[$format]['filepath']).'</strong>'; }
2292
- else { $meta[$format] = ' <strong>Encoded</strong>'; }
2293
- }
2294
- if ( $format_stats['status'] != "canceling" ) {
2295
-
2296
- if ( $encodevideo_info[$format]['writable']
2297
- && current_user_can('encode_videos')
2298
- && $format != "fullres" ) {
2299
- if ( $was_picked != false ) {
2300
- $meta[$format] .= '<a id="unpick-'.$post_id.'-'.$format.'" class="kgvid_delete-format" onclick="kgvid_clear_video(\''.$movieurl.'\', \''.$post_id.'\', \''.$child_id[$format].'\', \''.$blog_id.'\');" href="javascript:void(0)">'.__('Clear Format', 'video-embed-thumbnail-generator').'</a>';
2301
- }
2302
- else {
2303
- $meta[$format] .= '<a id="delete-'.$post_id.'-'.$format.'" class="kgvid_delete-format" onclick="kgvid_delete_video(\''.$movieurl.'\', \''.$post_id.'\', \''.$format.'\', \''.$child_id[$format].'\', \''.$blog_id.'\');" href="javascript:void(0)">'.__('Delete Permanently', 'video-embed-thumbnail-generator').'</a>';
2304
- }
2305
- }
2306
- }
2307
- $disabled[$format] = ' disabled title="Format already exists"';
2308
- $checked[$format] = '';
2309
- }
2310
- }
2311
- else {
2312
 
2313
- $something_to_encode = true;
2314
- if ( strpos($format, 'custom_') === 0 ) { continue; } //skip custom formats that don't exist
2315
 
2316
- } //if the video file doesn't exist, there's something to encode
2317
- }
2318
 
2319
- if ( $format_stats['status'] == "encoding" ) {
2320
- $encoding_now = true;
2321
- $disabled[$format] = ' disabled title="'.__('Currently encoding', 'video-embed-thumbnail-generator').'"';
2322
- $checked[$format] = 'checked';
2323
- $progress = kgvid_encode_progress($video_key, $format, $page);
2324
- $meta[$format] = $progress['embed_display'];
2325
- }
2326
 
2327
- if ( $format_stats['status'] == "Encoding Complete" ) {
2328
- $disabled[$format] = ' disabled title="'.__('Format already exists', 'video-embed-thumbnail-generator').'"';
2329
- $checked[$format] = '';
2330
- }
2331
-
2332
- if ( $checked[$format] == '' ) { $something_to_encode = true; }
2333
-
2334
- if ( !current_user_can('encode_videos') ) {
2335
- $disabled[$format] = ' disabled title="'.__('You don\'t have permission to encode videos', 'video-embed-thumbnail-generator').'"';
2336
- $something_to_encode = false;
2337
- }
2338
-
2339
- $checkboxes .= "\n\t\t\t".'<li><input class="kgvid_encode_checkbox" type="checkbox" id="attachments-'.$post_id.'-kgflashmediaplayer-encode'.$format.'" name="attachments['.$post_id.'][kgflashmediaplayer-encode'.$format.']" '.$checked[$format].' '.$ffmpeg_disabled_text.$disabled[$format].'> <label for="attachments-'.$post_id.'-kgflashmediaplayer-encode'.$format.'">'.$format_stats['name'].'</label> <span id="attachments-'.$post_id.'-kgflashmediaplayer-meta'.$format.'" class="kgvid_format_meta">'.$meta[$format].'</span>';
2340
-
2341
- if ( $is_attachment && empty($disabled[$format]) && $format != 'fullres' && $blog_id == false ) { $checkboxes .= "<span id='pick-'".$format."' class='button-secondary kgvid_encode_checkbox_button' data-choose='".sprintf( __('Choose %s', 'video-embed-thumbnail-generator'), $format_stats['name'] )."' data-update='".sprintf( __('Set as %s', 'video-embed-thumbnail-generator'), $format_stats['name'] )."' onclick='kgvid_pick_format(this, \"".$post_id."\", \"".esc_attr($format_stats['mime'])."\", \"".$format."\", \"".esc_attr($movieurl)."\");'>".__('Choose from Library', 'video-embed-thumbnail-generator')."</span>";
2342
  }
2343
  $checkboxes .= '</li>';
2344
 
@@ -2372,6 +2821,10 @@ function kgvid_generate_encode_checkboxes($movieurl, $post_id, $page, $blog_id =
2372
  if ( !$encoding_now && ($last_format['status'] == "queued" || $last_format['status'] == "canceling") ) {
2373
  $checkboxes .= '<script type="text/javascript">percent_timeout = setTimeout(function(){ kgvid_redraw_encode_checkboxes("'.$video_entry['movieurl'].'", "'.$video_entry['attachmentID'].'", "'.$page.'") }, 5000); jQuery(\'#wpwrap\').data("KGVIDCheckboxTimeout", percent_timeout);</script>';
2374
  }
 
 
 
 
2375
  }
2376
  $checkboxes .= '</div>'; //close encodeboxes div
2377
 
@@ -2412,6 +2865,28 @@ function kgvid_generate_queue_table( $scope = 'site' ) {
2412
  $current_user = wp_get_current_user();
2413
  $video_encode_queue = kgvid_get_encode_queue();
2414
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2415
  if ( is_network_admin() || 'network' == $scope ) { $total_columns = 8; }
2416
  else { $total_columns = 7; }
2417
 
@@ -2424,25 +2899,33 @@ function kgvid_generate_queue_table( $scope = 'site' ) {
2424
  $html .= "<input type='hidden' name='attachments[kgflashmediaplayer-security]' value='".$nonce."' />";
2425
 
2426
  foreach ( $video_encode_queue as $order => $video_entry ) {
 
2427
  $html .= "\t<tr id='tr_".$video_entry['attachmentID']."'";
2428
- foreach ( $video_formats as $format => $format_stats ) {
2429
 
2430
- if ( array_key_exists($format, $video_entry['encode_formats']) && array_key_exists('status', $video_entry['encode_formats'][$format]) ) {
 
2431
 
2432
- if ( $video_entry['encode_formats'][$format]['status'] == "encoding" ) {
2433
- $currently_encoding[$order] = true;
2434
- break;
2435
- }
2436
- else if ( $video_entry['encode_formats'][$format]['status'] == "queued" ) {
2437
- $queued[$order] = true;
2438
- }
2439
- else {
2440
- if ( !array_key_exists($order, $currently_encoding) ) { $currently_encoding[$order] = false; }
2441
- if ( !array_key_exists($order, $queued) ) { $queued[$order] = false; }
2442
- }
 
 
2443
 
 
2444
  }
2445
  }
 
 
 
 
2446
 
2447
  if ( $currently_encoding[$order] ) { $html .= " class='currently_encoding' "; }
2448
  elseif ( $queued[$order] ) { $html .= " class='kgvid_queued' "; }
@@ -2461,13 +2944,15 @@ function kgvid_generate_queue_table( $scope = 'site' ) {
2461
  $post = get_post( $video_entry['attachmentID'] );
2462
 
2463
  if ( ( is_network_admin() || 'network' == $scope )
2464
- || $current_user->ID == $post->post_author
2465
  || ( current_user_can('edit_others_video_encodes') && ( $blog_id && get_current_blog_id() == $blog_id || !$blog_id ) )
2466
  ) {
2467
 
2468
-
2469
- $user = get_userdata( $post->post_author );
2470
- $html .= "<td>".$user->display_name."</td>\n";
 
 
2471
 
2472
  //Site
2473
  if ( (is_network_admin() || 'network' == $scope) && $blog_id ) {
@@ -2483,7 +2968,7 @@ function kgvid_generate_queue_table( $scope = 'site' ) {
2483
  }
2484
 
2485
  //File
2486
- if ( $post->post_type == "attachment" ) {
2487
  $moviefilepath = get_attached_file($video_entry['attachmentID']);
2488
  $attachmentlink = get_admin_url()."post.php?post=".$video_entry['attachmentID']."&action=edit";
2489
  }
@@ -2500,7 +2985,8 @@ function kgvid_generate_queue_table( $scope = 'site' ) {
2500
  $html .= "\t\t\t\t\t<td class='queue_encode_formats' id='formats_".$video_entry['attachmentID']."'>";
2501
  $html .= "<input type='hidden' id='attachments-".$video_entry['attachmentID']."-kgflashmediaplayer-security' name='attachments[".$video_entry['attachmentID']."][kgflashmediaplayer-security]' value='".$nonce."' />";
2502
 
2503
- $checkboxes = kgvid_generate_encode_checkboxes($video_entry['movieurl'], $video_entry['attachmentID'], 'queue', $blog_id);
 
2504
  $html .= $checkboxes['checkboxes'];
2505
  $html .= "</td>\n";
2506
 
@@ -2550,7 +3036,7 @@ function kgvid_FFMPEG_Queue_Page() {
2550
  <form method="post" action="tools.php?page=kgvid_video_encoding_queue">
2551
  <?php wp_nonce_field('video-embed-thumbnail-generator-nonce','video-embed-thumbnail-generator-nonce'); ?>
2552
 
2553
- <table class="widefat">
2554
  <thead>
2555
  <?php echo kgvid_generate_queue_table_header(); ?>
2556
  </thead>
@@ -2562,11 +3048,14 @@ function kgvid_FFMPEG_Queue_Page() {
2562
  </tbody>
2563
  </table>
2564
  <p>
2565
- <?php if ( current_user_can('edit_others_video_encodes') ) { echo "<input id='clear_completed' type='button' class='button-secondary' value='". __('Clear All Completed', 'video-embed-thumbnail-generator') ."' onclick='kgvid_encode_queue(\"clear_completed\", 0, 0);'>"; } ?>
2566
  </p>
2567
  </form>
2568
  </div>
2569
  <?php
 
 
 
2570
  }
2571
 
2572
  function kgvid_add_network_settings_page() {
@@ -2814,12 +3303,9 @@ function kgvid_video_embed_options_init() {
2814
  add_settings_field('endofvideooverlay', __('End of video image:', 'video-embed-thumbnail-generator'), 'kgvid_endofvideooverlay_callback', __FILE__, 'kgvid_video_embed_playback_settings' );
2815
  add_settings_field('watermark', __('Watermark overlay:', 'video-embed-thumbnail-generator'), 'kgvid_watermark_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'watermark' ) );
2816
  add_settings_field('align', __('Video alignment:', 'video-embed-thumbnail-generator'), 'kgvid_align_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'align' ) );
2817
- add_settings_field('resize', __('Automatically resize videos:', 'video-embed-thumbnail-generator'), 'kgvid_resize_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'inline' ) );
2818
- add_settings_field('inline', __('Inline videos:', 'video-embed-thumbnail-generator'), 'kgvid_inline_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'inline' ) );
2819
  add_settings_field('dimensions', __('Max embedded video dimensions:', 'video-embed-thumbnail-generator'), 'kgvid_dimensions_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'width' ) );
2820
- add_settings_field('gallery_dimensions', __('Max gallery video dimensions:', 'video-embed-thumbnail-generator'), 'kgvid_gallery_dimensions_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'gallery_width' ) );
2821
- add_settings_field('gallery_thumb', __('Gallery thumbnail width:', 'video-embed-thumbnail-generator'), 'kgvid_gallery_thumb_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'gallery_thumb' ) );
2822
- add_settings_field('gallery_end', __('Gallery playback end action:', 'video-embed-thumbnail-generator'), 'kgvid_gallery_end_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'gallery_end' ) );
2823
  add_settings_field('controlbar_style', __('Video controls:', 'video-embed-thumbnail-generator'), 'kgvid_controlbar_style_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'controlbar_style' ) );
2824
  add_settings_field('autoplay', __('Autoplay:', 'video-embed-thumbnail-generator'), 'kgvid_autoplay_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'autoplay' ) );
2825
  add_settings_field('loop', _x('Loop:', 'verb', 'video-embed-thumbnail-generator'), 'kgvid_loop_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'loop' ) );
@@ -2950,7 +3436,29 @@ add_action('admin_init', 'kgvid_video_embed_options_init' );
2950
 
2951
  function kgvid_watermark_callback() {
2952
  $options = kgvid_get_options();
2953
- echo "<input class='regular-text affects_player' id='watermark' name='kgvid_video_embed_options[watermark]' type='text' value='".$options['watermark']."' /> <span id='pick-watermark' class='button-secondary' data-choose='".__('Choose a Watermark', 'video-embed-thumbnail-generator')."' data-update='".__('Set as watermark', 'video-embed-thumbnail-generator')."' data-change='watermark' onclick='kgvid_pick_image(this);'>".__('Choose from Library', 'video-embed-thumbnail-generator')."</span>\n\t";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2954
  }
2955
 
2956
  function kgvid_align_callback() {
@@ -2967,33 +3475,29 @@ add_action('admin_init', 'kgvid_video_embed_options_init' );
2967
  function kgvid_resize_callback() {
2968
  $options = kgvid_get_options();
2969
  echo "<input ".checked( $options['resize'], "on", false )." id='resize' name='kgvid_video_embed_options[resize]' type='checkbox' /> <label for='resize'>".__('Make video player responsive.', 'video-embed-thumbnail-generator')."</label><br />";
2970
- echo "<input ".checked( $options['auto_res'], "on", false )." id='auto_res' name='kgvid_video_embed_options[auto_res]' type='checkbox' /> <label for='auto_res'>".__('Choose video resolution automatically based on player size.', 'video-embed-thumbnail-generator')."</label>\n\t";
2971
- }
 
 
 
 
 
2972
 
2973
- function kgvid_inline_callback() {
2974
- $options = kgvid_get_options();
2975
- echo "<input ".checked( $options['inline'], "on", false )." id='inline' name='kgvid_video_embed_options[inline]' type='checkbox' /> <label for='inline'>".__('Allow other content on the same line as the video.', 'video-embed-thumbnail-generator')."</label>\n\t";
2976
  }
2977
 
2978
  function kgvid_dimensions_callback() {
2979
  $options = kgvid_get_options();
2980
  echo __('Width:', 'video-embed-thumbnail-generator')." <input class='small-text affects_player' id='width' name='kgvid_video_embed_options[width]' type='text' value='".$options['width']."' /> ".__('Height:', 'video-embed-thumbnail-generator')." <input class='small-text affects_player' id='height' name='kgvid_video_embed_options[height]' type='text' value='".$options['height']."' /><br />";
2981
  echo "<input ".checked( $options['minimum_width'], "on", false )." id='minimum_width' name='kgvid_video_embed_options[minimum_width]' type='checkbox' /> <label for='minimum_width'>".__('Enlarge lower resolution videos to max width.', 'video-embed-thumbnail-generator')."</label> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('Usually if a video\'s resolution is less than the max width, the video player is set to the actual width of the video. Enabling this will always set the same width regardless of the quality of the video. When necessary you can override by setting the dimensions manually.', 'video-embed-thumbnail-generator')."</span></a><br />";
2982
- echo "<input ".checked( $options['fullwidth'], "on", false )." id='fullwidth' name='kgvid_video_embed_options[fullwidth]' type='checkbox' /> <label for='fullwidth'>".__('Set all videos to expand to fill their containers.', 'video-embed-thumbnail-generator')."</label> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('Enabling this will ignore any other width settings and set the width of the video to the width of the container it\'s in.', 'video-embed-thumbnail-generator')."</span></a>\n\t";
2983
- }
2984
-
2985
- function kgvid_gallery_dimensions_callback() {
2986
- $options = kgvid_get_options();
2987
- echo __('Width:', 'video-embed-thumbnail-generator')." <input class='small-text' id='gallery_width' name='kgvid_video_embed_options[gallery_width]' type='text' value='".$options['gallery_width']."' /> ".__('Height:', 'video-embed-thumbnail-generator')." <input class='small-text' id='gallery_height' name='kgvid_video_embed_options[gallery_height]' type='text' value='".$options['gallery_height']."' />\n\t";
2988
  }
2989
 
2990
- function kgvid_gallery_thumb_callback() {
2991
  $options = kgvid_get_options();
2992
- echo "<input class='small-text' id='gallery_thumb' name='kgvid_video_embed_options[gallery_thumb]' type='text' value='".$options['gallery_thumb']."' />\n\t";
2993
- }
2994
 
2995
- function kgvid_gallery_end_callback() {
2996
- $options = kgvid_get_options();
2997
  $items = array();
2998
  $items = array(
2999
  __('Stop, but leave popup window open', 'video-embed-thumbnail-generator') => "",
@@ -3004,7 +3508,13 @@ add_action('admin_init', 'kgvid_video_embed_options_init' );
3004
  $selected = ($options['gallery_end']==$value) ? 'selected="selected"' : '';
3005
  echo "<option value='$value' $selected>$name</option>";
3006
  }
3007
- echo "</select> when current gallery video finishes.\n\t";
 
 
 
 
 
 
3008
  }
3009
 
3010
  function kgvid_controlbar_style_callback() {
@@ -3139,28 +3649,34 @@ add_action('admin_init', 'kgvid_video_embed_options_init' );
3139
  $capabilities = array( 'make_video_thumbnails'=>__('Can make thumbnails', 'video-embed-thumbnail-generator'), 'encode_videos'=>__('Can encode videos', 'video-embed-thumbnail-generator'), 'edit_others_video_encodes' => __('Can view & modify other users encode queue', 'video-embed-thumbnail-generator') );
3140
  foreach ( $capabilities as $capability => $capability_name ) {
3141
  $capabilities_checkboxes[] = "<div class='kgvid_user_roles'><strong>".$capability_name.":</strong><br>";
3142
- foreach ( $wp_roles->roles as $role => $role_info ) {
3143
 
3144
- $capability_enabled = false;
3145
- if ( $page_scope == 'network' ) {
3146
- $option_name = 'default_capabilities';
3147
- if ( array_key_exists('default_capabilities', $options)
3148
- && array_key_exists($capability, $options['default_capabilities'])
3149
- && array_key_exists($role, $options['default_capabilities'][$capability])
3150
- && $options['default_capabilities'][$capability][$role] == "on" ) {
3151
- $capability_enabled = true;
 
 
 
 
 
3152
  }
3153
- }
3154
- else {
3155
- $option_name = 'capabilities';
3156
- if ( is_array($wp_roles->roles[$role]['capabilities']) && array_key_exists($capability, $wp_roles->roles[$role]['capabilities'])
3157
- && $wp_roles->roles[$role]['capabilities'][$capability] == 1 ) {
3158
- $capability_enabled = true;
3159
  }
3160
- }
3161
- $capabilities_checkboxes[] = "<input type='checkbox' ".checked( $capability_enabled, true, false )." id='capability-".$capability."-".$role."' name='kgvid_video_embed_options[".$option_name."][".$capability."][".$role."]'> <label for='capability-".$capability."-".$role."'>".translate_user_role($role_info['name'])."</label><br>";
 
 
 
3162
 
3163
- } //role loop
3164
  $capabilities_checkboxes[] = "</div>";
3165
  }// capability loop
3166
  echo implode("", $capabilities_checkboxes)."\n\t";
@@ -3171,8 +3687,11 @@ add_action('admin_init', 'kgvid_video_embed_options_init' );
3171
  if ( $options['embeddable'] != "on" ) { $embed_disabled = " disabled='disabled'"; }
3172
  else { $embed_disabled = ""; }
3173
  echo "<input class='affects_player' ".checked( $options['embeddable'], "on", false )." id='embeddable' name='kgvid_video_embed_options[embeddable]' type='checkbox' onclick='kgvid_embeddable_switch(this.checked);' /> <label for='embeddable'>".__('Allow users to embed your videos on other sites.', 'video-embed-thumbnail-generator')."</label><br />";
3174
- echo "<input ".checked( $options['open_graph'], "on", false )." id='open_graph' name='kgvid_video_embed_options[open_graph]' type='checkbox'".$embed_disabled." /> <label for='open_graph'>"._x('Enable Open Graph video tags', '"Open Graph" is a proper noun and might not need translation', 'video-embed-thumbnail-generator')."</label><a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('Facebook and some other social media sites will use these tags to embed the first video in your post. For the majority of Facebook users who have enabled secure browsing, your video must be served via https in order to be embedded directly on the page.', 'video-embed-thumbnail-generator')."</span></a><br />";
3175
- echo "<input class='affects_player' ".checked( $options['right_click'], "on", false )." id='right_click' name='kgvid_video_embed_options[right_click]' type='checkbox' /> <label for='right_click'>".__('Allow right-clicking on videos.', 'video-embed-thumbnail-generator')."</label> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('We can\'t prevent a user from simply saving the downloaded video file from the browser\'s cache, but disabling right-clicking will make it more difficult for casual users to save your videos.', 'video-embed-thumbnail-generator')."</span></a>\n\t";
 
 
 
3176
  }
3177
 
3178
  function kgvid_featured_callback() {
@@ -3274,11 +3793,12 @@ add_action('admin_init', 'kgvid_video_embed_options_init' );
3274
  echo "</select> ";
3275
 
3276
 
3277
- echo "</label> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('If you have FFMPEG/LIBAV and the proper libraries installed, you can choose to replace your uploaded video with your preferred format, and also transcode into as many as six additional formats depending on the resolution of your original source. Different browsers have different playback capabilities. Most desktop browsers can play H.264, and all modern mobile devices can play at least 360p H.264. If you create multiple H.264 resolutions, the highest resolution supported by the device will be served up automatically. The plugin will not upconvert your video, so if you upload a 720p video, it will not waste your time creating a 1080p version. There was a time when it seemed like a good idea to provide OGV or WEBM for some desktop browsers, but even Firefox allows H.264 playback on Windows now. I no longer recommend encoding OGV or WEBM unless you expect a large number of no-Flash sticklers visiting your site.', 'video-embed-thumbnail-generator')."</span></a><br />";
3278
- echo "<input ".checked( $options['encode_1080'], "on", false )." id='encode_1080' name='kgvid_video_embed_options[encode_1080]' type='checkbox' /> <label for='encode_1080'>1080p H.264 <small><em>".__('(iPhone 4s+, iPad 2+, modern Android, Windows Phone 8, Chrome, Safari, IE 9+, Firefox Windows)', 'video-embed-thumbnail-generator')."</em></small></label><br />";
3279
- echo "<input ".checked( $options['encode_720'], "on", false )." id='encode_720' name='kgvid_video_embed_options[encode_720]' type='checkbox' /> <label for='encode_720'>720p H.264 <small><em>".__('(iPhone 4+, iPad, most Android, Chrome, Safari, IE 9+, Firefox Windows)', 'video-embed-thumbnail-generator')."</em></small></label><br />";
3280
- echo "<input ".checked( $options['encode_mobile'], "on", false )." id='encode_mobile' name='kgvid_video_embed_options[encode_mobile]' type='checkbox' /> <label for='encode_mobile'>360p H.264 <small><em>(iOS, Android, Windows Phone 7, Chrome, Safari, IE 9+, Firefox Windows)</em></small></label><br />";
3281
  echo "<input ".checked( $options['encode_webm'], "on", false )." id='encode_webm' name='kgvid_video_embed_options[encode_webm]' type='checkbox' /> <label for='encode_webm'>WEBM <small><em>(Firefox, Chrome, Android 2.3+, Opera)</em></small></label><br />";
 
3282
  echo "<input ".checked( $options['encode_ogg'], "on", false )." id='encode_ogg' name='kgvid_video_embed_options[encode_ogg]' type='checkbox' /> <label for='encode_ogg'>OGV <small><em>(Firefox, Chrome, Android 2.3+, Opera)</em></small></label><br />";
3283
  echo "<input ".checked( $options['encode_custom'], "on", false )." id='encode_custom' name='kgvid_video_embed_options[encode_custom]' type='checkbox' /> <label for='encode_custom'>Custom";
3284
  $items = array( "H.264" => "h264" , "WEBM" => "webm", "OGV" => "ogg" );
@@ -3379,6 +3899,7 @@ add_action('admin_init', 'kgvid_video_embed_options_init' );
3379
 
3380
  function kgvid_moov_callback() {
3381
  $options = kgvid_get_options();
 
3382
  echo "<div class='kgvid_video_app_required'>";
3383
  $items = array(__("none", 'video-embed-thumbnail-generator')=>"none", "movflags faststart"=>"movflag", "qt-faststart"=>"qt-faststart", "MP4Box"=>"MP4Box");
3384
  echo "<select onchange='kgvid_hide_plugin_settings()' id='moov' name='kgvid_video_embed_options[moov]' class='affects_ffmpeg'>";
@@ -3387,7 +3908,7 @@ add_action('admin_init', 'kgvid_video_embed_options_init' );
3387
  echo "<option value='$value' $selected>$name</option>";
3388
  }
3389
  echo "</select> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".sprintf( __('By default %1$s places moov atoms at the end of H.264 encoded files, which forces the entire file to download before playback can start and can prevent Flash players from playing them at all. Since approximately October 2012 %1$s can fix the problem at the end of the encoding process by using the option `movflags faststart`. This is the easiest and fastest way to correct the problem, but older versions of %1$s will not work if you select the movflags option. If you can\'t update to a new version of %1$s, select qt-faststart or MP4Box which will run after encoding is finished if they are installed on your server.', 'video-embed-thumbnail-generator'), "<strong class='video_app_name'>".strtoupper($options['video_app'])."</strong>")."</span></a>";
3390
- echo "<p id='moov_path_p'>Path to <span class='kgvid_moov_option'>".$options['moov']."</span>: <input class='regular-text code affects_ffmpeg' id='moov_path' name='kgvid_video_embed_options[moov_path]' type='text' value='".$options['moov_path']."' /></p>";
3391
  echo "</div>\n\t";
3392
  }
3393
 
@@ -3482,7 +4003,8 @@ add_action('admin_init', 'kgvid_video_embed_options_init' );
3482
  $options = kgvid_get_options();
3483
  echo "<div class='kgvid_video_app_required'>";
3484
  echo "<input class='affects_ffmpeg' onchange='if(jQuery(\"#ffmpeg_vpre\").attr(\"checked\")==\"checked\"){jQuery(\"#video_bitrate_flag\").attr(\"checked\", \"checked\"); jQuery(\"#nostdin\").removeAttr(\"checked\");}' ".checked( $options['video_bitrate_flag'], "on", false )." id='video_bitrate_flag' name='kgvid_video_embed_options[video_bitrate_flag]' type='checkbox' /> <label for='video_bitrate_flag'>".__('Enable legacy FFMPEG "-b" and "-ba" bitrate flags.', 'video-embed-thumbnail-generator')."</label> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('Enable if your installed version of FFMPEG is old enough that you can\'t use the newer -b:v flags (Dreamhost users must turn this on). It may cause newer versions of FFMPEG to fail.', 'video-embed-thumbnail-generator')."</span></a><br />";
3485
- echo "<input class='affects_ffmpeg' onchange='if(jQuery(\"#ffmpeg_vpre\").attr(\"checked\")==\"checked\"){jQuery(\"#video_bitrate_flag\").attr(\"checked\", \"checked\"); jQuery(\"#nostdin\").removeAttr(\"checked\");}' ".checked( $options['ffmpeg_vpre'], "on", false )." id='ffmpeg_vpre' name='kgvid_video_embed_options[ffmpeg_vpre]' type='checkbox' /> <label for='ffmpeg_vpre'>".__('Enable legacy FFMPEG parameters.', 'video-embed-thumbnail-generator')."</label> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('Enable if your installed version of FFMPEG is old enough that libx264 requires additional configuration to operate (Dreamhost users must turn this on). This should help if you can encode WEBM or OGV files but H264/Mobile files fail. It could cause newer versions of FFMPEG to fail.', 'video-embed-thumbnail-generator')."</span></a><br />";
 
3486
  echo "<input class='affects_ffmpeg' ".checked( $options['nostdin'], "on", false )." id='nostdin' name='kgvid_video_embed_options[nostdin]' type='checkbox' /> <label for='nostdin'>".__('Disable stdin.', 'video-embed-thumbnail-generator')."</label> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('Turn off this checkbox if your installed version of FFMPEG is old enough that it does not recognize the nostdin flag (Dreamhost users must turn this off).', 'video-embed-thumbnail-generator')."</span></a>";
3487
  echo "</div>\n\t";
3488
  }
@@ -3520,7 +4042,7 @@ add_action('admin_init', 'kgvid_video_embed_options_init' );
3520
  $movie_info = kgvid_get_video_dimensions(plugin_dir_path(__FILE__)."images/sample-video-h264.mp4");
3521
  $uploads = wp_upload_dir();
3522
  $encode_dimensions = kgvid_set_encode_dimensions($movie_info, $video_formats[$options['sample_format']]);
3523
- $encode_string = kgvid_generate_encode_string(plugin_dir_path(__FILE__)."images/sample-video-h264.mp4", $uploads['path']."/sample-video-h264".$video_formats[$options['sample_format']]['suffix'], $movie_info, $options['sample_format'], $encode_dimensions['width'], $encode_dimensions['height'], '');
3524
  }
3525
 
3526
  if ( is_array($encode_string) ) { $encode_string_implode = implode('' , $encode_string); }
@@ -3589,7 +4111,7 @@ function kgvid_update_settings() {
3589
  delete_option($old_setting);
3590
  }
3591
  }
3592
- $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->options WHERE option_name LIKE 'wp_FMP%'") );
3593
 
3594
  foreach ( $default_options as $key => $value ) { //apply default values for any settings that didn't exist before
3595
  if ( !array_key_exists($key, $options) ) { $options[$key] = $value; }
@@ -3667,18 +4189,6 @@ function kgvid_update_settings() {
3667
  if ( array_key_exists('embeddable', $options) && $options['embeddable'] != "on" ) { $options['open_graph'] = false; }
3668
  else { $options['open_graph'] = "on"; }
3669
 
3670
- $args = array(
3671
- 'numberposts' => -1,
3672
- 'post_mime_type' => 'video',
3673
- 'post_status' => null,
3674
- 'post_type' => 'attachment',
3675
- );
3676
- $video_attachments = get_posts($args);
3677
- foreach ( $video_attachments as $post ) {
3678
- if ( $post->post_parent && strpos(get_post_mime_type( $post->ID ), 'video') !== false ) {
3679
-
3680
- }
3681
- }
3682
  }
3683
  if ( $options['version'] < 4.25 ) {
3684
  $options['version'] = 4.25;
@@ -3731,6 +4241,21 @@ function kgvid_update_settings() {
3731
  $options['fullwidth'] = false;
3732
  $options['auto_res'] = 'on';
3733
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3734
 
3735
  if ( $options['version'] != $default_options['version'] ) { $options['version'] = $default_options['version']; }
3736
  if ( $options !== $options_old ) { update_option('kgvid_video_embed_options', $options); }
@@ -3791,10 +4316,6 @@ function kgvid_video_embed_options_validate($input) { //validate & sanitize inpu
3791
  add_settings_error( __FILE__, "gallery-width-zero", __("You must enter a value for the maximum gallery video width.", 'video-embed-thumbnail-generator') );
3792
  $input['gallery_width'] = $options['gallery_width'];
3793
  }
3794
- if ( empty($input['gallery_height']) ) {
3795
- add_settings_error( __FILE__, "gallery-height-zero", __("You must enter a value for the maximum gallery video height.", 'video-embed-thumbnail-generator') );
3796
- $input['gallery_height'] = $options['gallery_height'];
3797
- }
3798
 
3799
  if ( $input['capabilities'] !== $options['capabilities'] ) { kgvid_set_capabilities($input['capabilities']); }
3800
 
@@ -3835,24 +4356,6 @@ function kgvid_video_embed_options_validate($input) { //validate & sanitize inpu
3835
  } // if the custom format has been set
3836
  else {
3837
 
3838
- /* $video_encode_queue = kgvid_get_encode_queue();
3839
-
3840
- if ( !empty($video_encode_queue) && is_array($video_encode_queue) ) {
3841
- foreach ( $video_encode_queue as $video_key => $video_entry ) {
3842
- if ( is_array($video_entry)
3843
- && array_key_exists('encode_formats', $video_entry)
3844
- && is_array($video_entry['encode_formats'])
3845
- && array_key_exists('custom', $video_entry['encode_formats'])
3846
- && is_array($video_entry['encode_formats']['custom'])
3847
- && array_key_exists('status', $video_entry['encode_formats']['custom'])
3848
- && $video_entry['encode_formats']['custom']['status'] != 'encoding'
3849
- ) {
3850
- unset($video_encode_queue[$video_key]['encode_formats']['custom']);
3851
- }
3852
- }
3853
- kgvid_save_encode_queue($video_encode_queue);
3854
- } */
3855
-
3856
  if ( $input['sample_format'] == 'custom' ) { $input['sample_format'] = 'mobile'; }
3857
 
3858
  }
@@ -3918,7 +4421,7 @@ function kgvid_ajax_save_settings() {
3918
  $uploads = wp_upload_dir();
3919
  $video_formats = kgvid_video_formats();
3920
  $encode_dimensions = kgvid_set_encode_dimensions($movie_info, $video_formats[$validated_options['sample_format']]);
3921
- $encode_string = kgvid_generate_encode_string(plugin_dir_path(__FILE__)."images/sample-video-h264.mp4", $uploads['path']."/sample-video-h264".$video_formats[$validated_options['sample_format']]['suffix'], $movie_info, $validated_options['sample_format'], $encode_dimensions['width'], $encode_dimensions['height'], '');
3922
  $auto_thumb_label = kgvid_generate_auto_thumb_label();
3923
  }
3924
  }
@@ -3939,15 +4442,23 @@ function kgvid_add_attachment_handler($post_id) {
3939
  $options = kgvid_get_options();
3940
 
3941
  if ( $options['auto_encode'] == "on" || $options['auto_thumb'] == "on" ) {
 
3942
  $post = get_post($post_id);
3943
 
3944
  if ( substr($post->post_mime_type, 0, 5) == 'video'
3945
- && (empty($post->post_parent) || (strpos(get_post_mime_type( $post->post_parent ), 'video') === false && get_post_meta($post->ID, '_kgflashmediaplayer-externalurl', true) == false)) ) {
3946
- $args = array($post_id);
3947
- wp_schedule_single_event(time(), 'kgvid_cron_new_attachment', $args);
3948
- spawn_cron();
 
 
 
 
 
3949
  }
 
3950
  }
 
3951
  }
3952
  add_action('add_attachment', 'kgvid_add_attachment_handler');
3953
 
@@ -4026,13 +4537,15 @@ function kgvid_cron_new_attachment_handler($post_id, $force = false) {
4026
  $thumb_id[$key] = kgvid_save_thumb($post_id, $post->post_title, $thumb_output[$key]['thumb_url'], $index);
4027
  }//end if there wasn't an error
4028
  else {
4029
- update_post_meta($post_id, '_kgflashmediaplayer-autothumb-error', $thumb_output[$thumb_key]['embed_display']);
4030
- break;
 
4031
  }
4032
 
4033
  }//end loop through generated thumbnails to save them in the database
4034
 
4035
  if ( !empty($thumb_id[$thumb_key]) ) {
 
4036
  update_post_meta($post_id, '_kgflashmediaplayer-poster', $thumb_output[$thumb_key]['thumb_url']);
4037
  update_post_meta($post_id, '_kgflashmediaplayer-poster-id', $thumb_id[$thumb_key]);
4038
  set_post_thumbnail($post_id, $thumb_id[$thumb_key]);
@@ -4042,26 +4555,108 @@ function kgvid_cron_new_attachment_handler($post_id, $force = false) {
4042
  }//end setting main thumbnail
4043
 
4044
 
4045
- }//end if auto_thumb is on
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4046
 
4047
- if ( $force == 'encode' || $options['auto_encode'] == "on" ) {
4048
- $video_formats = kgvid_video_formats();
4049
- $something_to_encode = false;
4050
- $encode_checked = array();
4051
- foreach ( $video_formats as $format => $format_stats ) {
4052
- if ( $options['encode_'.$format] == "on" ) {
4053
- $encode_checked[$format] = "true";
4054
- $something_to_encode = true;
4055
- }
4056
- else { $encode_checked[$format] = "notchecked"; }
4057
- }
4058
- if ( $something_to_encode ) {
4059
- $output = kgvid_enqueue_videos($post_id, $movieurl, $encode_checked, $post->post_parent);
4060
- $output = kgvid_encode_videos();
4061
- }
4062
  }
 
4063
  }
4064
- add_action('kgvid_cron_new_attachment', 'kgvid_cron_new_attachment_handler');
4065
 
4066
  /**
4067
  * Adding our custom fields to the $form_fields array
@@ -4074,8 +4669,10 @@ function kgvid_image_attachment_fields_to_edit($form_fields, $post) {
4074
 
4075
  $options = kgvid_get_options();
4076
 
4077
- if ( substr($post->post_mime_type, 0, 5) == 'video' && (empty($post->post_parent)
4078
- || (strpos(get_post_mime_type( $post->post_parent ), 'video') === false && get_post_meta($post->ID, '_kgflashmediaplayer-externalurl', true) == false))
 
 
4079
  ) { //if the attachment is a video with no parent or if it has a parent the parent is not a video and the video doesn't have the externalurl post meta
4080
 
4081
  wp_enqueue_media(); //allows using the media modal in the Media Library
@@ -4085,119 +4682,98 @@ function kgvid_image_attachment_fields_to_edit($form_fields, $post) {
4085
  $field_id = kgvid_backwards_compatible($post->ID);
4086
  $movieurl = wp_get_attachment_url($post->ID);
4087
  $moviefile = get_attached_file($post->ID);
4088
- $widthsaved = get_post_meta($post->ID, "_kgflashmediaplayer-width", true);
4089
- $heightsaved = get_post_meta($post->ID, "_kgflashmediaplayer-height", true);
4090
- $video_meta = array();
4091
- $video_aspect = NULL;
4092
- $video_meta = wp_get_attachment_metadata( $post->ID );
4093
- if ( is_array($video_meta) && array_key_exists('width', $video_meta) && array_key_exists('height', $video_meta) ) { $video_aspect = $video_meta['height']/$video_meta['width']; }
4094
- elseif ( $widthsaved && $heightsaved ) { $video_aspect = intval($heightsaved)/intval($widthsaved); }
4095
 
4096
  $form_fields["kgflashmediaplayer-url"]["input"] = "hidden";
4097
  $form_fields["kgflashmediaplayer-url"]["value"] = $movieurl;
4098
 
4099
-
4100
- $maxwidth = $options['width'];
4101
- if ( $widthsaved ) { $widthset = $widthsaved; }
4102
- elseif ( $options['minimum_width'] == "on" ) { $widthset = $maxwidth; }
4103
- else {
4104
- if ( is_array($video_meta) && array_key_exists('width', $video_meta) && intval($video_meta['width']) <= intval($maxwidth) ) { $widthset = $video_meta['width']; }
4105
- else { $widthset = $maxwidth; }
4106
  }
4107
- if ( !$widthsaved ) { update_post_meta($post->ID, '_kgflashmediaplayer-width', $widthset); }
4108
 
4109
- $form_fields["kgflashmediaplayer-maxwidth"]["input"] = "hidden";
4110
- $form_fields["kgflashmediaplayer-maxwidth"]["value"] = $maxwidth;
 
4111
 
 
4112
 
4113
- $maxheight = $options['height'];
 
 
 
 
 
 
 
4114
 
4115
- if ( $heightsaved ) {
4116
- $heightset = $heightsaved;
4117
- }
4118
- elseif ( $video_aspect ) { $heightset = round($widthset*$video_aspect); }
4119
- else {
4120
- if ( is_array($video_meta) && array_key_exists('height', $video_meta) && intval($video_meta['height']) <= intval($maxheight) ) { $heightset = $video_meta['height']; }
4121
- else { $heightset = $maxheight; }
4122
- }
4123
- if ( !$heightsaved ) { update_post_meta($post->ID, '_kgflashmediaplayer-height', $heightset); }
4124
 
4125
- $form_fields["kgflashmediaplayer-maxheight"]["input"] = "hidden";
4126
- $form_fields["kgflashmediaplayer-maxheight"]["value"] = $maxheight;
4127
 
4128
  $form_fields["kgflashmediaplayer-aspect"]["input"] = "hidden";
4129
- $form_fields["kgflashmediaplayer-aspect"]["value"] = $heightset/$widthset;
4130
 
4131
  $nonce = wp_create_nonce('video-embed-thumbnail-generator-nonce');
4132
 
4133
- $embedset = get_post_meta($post->ID, "_kgflashmediaplayer-embed", true);
4134
- if ($embedset == "") {
4135
- $embedset = "Single Video";
4136
- update_post_meta($post->ID, '_kgflashmediaplayer-embed', $embedset); //make sure at least this value is set before attachment is inserted into post
4137
- }
4138
-
4139
- $starts = intval(get_post_meta($post->ID, "_kgflashmediaplayer-starts", true));
4140
- $completeviews = intval(get_post_meta($post->ID, "_kgflashmediaplayer-completeviews", true));
4141
-
4142
- $form_fields["views"]["label"] = __("Video Stats", 'video-embed-thumbnail-generator');
4143
  $form_fields["views"]["input"] = "html";
4144
- $form_fields["views"]["html"] = sprintf( __('%1$s Starts, %2$s Complete Views', 'video-embed-thumbnail-generator'), $starts, $completeviews );
4145
 
4146
  // ** Thumbnail section **//
4147
 
4148
  $thumbnail_url = get_post_meta($post->ID, "_kgflashmediaplayer-poster", true);
4149
 
4150
  $thumbnail_html = "";
4151
- if ($thumbnail_url != "" ) {
 
 
 
4152
  $thumbnail_html = '<div class="kgvid_thumbnail_box kgvid_chosen_thumbnail_box"><img width="200" src="'.$thumbnail_url.'"></div>';
4153
  }
4154
 
4155
- $numberofthumbs_value = get_post_meta($post->ID, "_kgflashmediaplayer-numberofthumbs", true);
4156
- if (get_post_meta($post->ID, "_kgflashmediaplayer-thumbtime", true) != "") { $numberofthumbs_value = "1"; }
4157
- if ( empty($numberofthumbs_value) ) { $numberofthumbs_value = $options['generate_thumbs']; }
4158
-
4159
- $args = array(
4160
- 'mime_type' => 'image/jpeg',
4161
- 'methods' => array(
4162
- 'save'
4163
- )
4164
- );
4165
- $img_editor_works = wp_image_editor_supports($args);
4166
-
4167
- if ( !isset($options['ffmpeg_exists']) || $options['ffmpeg_exists'] == "notchecked" ) {
4168
- kgvid_check_ffmpeg_exists($options, true);
4169
- }
4170
- if ( $options['ffmpeg_exists'] == "notinstalled" ) { $ffmpeg_disabled_text = 'disabled="disabled" title="'.sprintf( __('%1$s not found at %2$s and unable to load video in browser for thumbnail generation.', 'video-embed-thumbnail-generator'), strtoupper($options['video_app']), $options['app_path'] ).'"'; }
4171
- else { $ffmpeg_disabled_text = ""; }
4172
 
4173
- $randomizechecked = get_post_meta($post->ID, "_kgflashmediaplayer-randomize", true);
4174
- $forcefirstchecked = get_post_meta($post->ID, "_kgflashmediaplayer-forcefirst", true);
4175
 
4176
- $featuredchecked = get_post_meta($post->ID, "_kgflashmediaplayer-featured", true);
4177
- if ( empty($featuredchecked) ) { $featuredchecked = $options['featured']; }
4178
- if ( $featuredchecked == "on" ) { $featuredchecked = "checked"; }
4179
- else { $featuredchecked = ""; }
 
 
 
4180
 
4181
- $update_script = "";
4182
- $created_time = time()-get_post_time('U', true, $post->ID);
4183
- if ( $created_time < 60 && ($options['auto_encode'] == "on" || $options['auto_thumb'] == "on") ) {
4184
- $update_script = '<script type="text/javascript">jQuery(document).ready(function() { ';
4185
- if ( $options['ffmpeg_exists'] == "on" && $options['auto_encode'] == "on" ) {
4186
- $update_script .= 'percent_timeout = setTimeout(function(){ kgvid_redraw_encode_checkboxes("'.$movieurl.'", "'.$post->ID.'", "attachment") }, 5000); jQuery(\'#wpwrap\').data("KGVIDCheckboxTimeout", percent_timeout);';
4187
  }
4188
- if ( $options['ffmpeg_exists'] == "on" && $options['auto_thumb'] == "on" && !$thumbnail_url ) {
4189
- $thumbnail_html = '<div class="kgvid_thumbnail_box kgvid_chosen_thumbnail_box" style="height:112px;"><span style="margin-top: 45px;
4190
- display: inline-block;">Loading thumbnail...</span></div>';
4191
- $update_script .= ' setTimeout(function(){ kgvid_redraw_thumbnail_box("'.$post->ID.'") }, 5000);';
 
 
 
 
 
 
 
 
 
 
 
 
4192
  }
4193
- $update_script .= '});</script>';
4194
- }
4195
 
4196
- $choose_from_video_content = "";
4197
- $generate_content = "";
4198
- $thumbnail_timecode = "";
4199
 
4200
- if ( current_user_can('make_video_thumbnails') ) {
4201
  $moviefiletype = pathinfo($movieurl, PATHINFO_EXTENSION);
4202
  $h264compatible = array("mp4", "mov", "m4v");
4203
  if ( $moviefiletype == "mov" || $moviefiletype == "m4v" ) { $moviefiletype = "mp4"; }
@@ -4222,7 +4798,7 @@ display: inline-block;">Loading thumbnail...</span></div>';
4222
  $choose_from_video_content = '<div style="display:none;" class="kgvid_thumbnail_box kgvid-tabs-content" id="thumb-video-'.$post->ID.'-container">
4223
  <div class="kgvid-reveal-thumb-video" onclick="kgvid_reveal_thumb_video('.$post->ID.')" id="show-thumb-video-'.$post->ID.'"><span class="kgvid-right-arrow"></span><span class="kgvid-show-video">'.__('Choose from video...', 'video-embed-thumbnail-generator').'</span></div>
4224
  <div style="display:none;" id="thumb-video-'.$post->ID.'-player">
4225
- <video crossorigin preload="metadata" class="kgvid-thumb-video" width="200" data-allowed="'.$options['browser_thumbnails'].'" onloadedmetadata="kgvid_thumb_video_loaded(\''.$post->ID.'\');" id="thumb-video-'.$post->ID.'" controls>'.
4226
  implode("\n", $sources).'
4227
  </video>
4228
  <div class="kgvid-video-controls">
@@ -4236,38 +4812,37 @@ display: inline-block;">Loading thumbnail...</span></div>';
4236
  </div>';
4237
  }
4238
  $generate_content = '<div id="generate-thumb-'.$post->ID.'-container" class="kgvid-tabs-content">
4239
- <input id="attachments-'. $post->ID .'-numberofthumbs" name="attachments['.$post->ID.'][kgflashmediaplayer-numberofthumbs]" type="text" value="'.$numberofthumbs_value.'" maxlength="2" style="width:35px;text-align:center;" onchange="kgvid_disable_thumb_buttons(\''.$post->ID.'\', \'onchange\');document.getElementById(\''.$field_id['thumbtime'].'\').value =\'\';" '.$ffmpeg_disabled_text.'/>
4240
  <input type="button" id="attachments-'. $post->ID .'-thumbgenerate" class="button-secondary" value="'._x('Generate', 'Button text. Implied "Generate thumbnails"', 'video-embed-thumbnail-generator').'" name="thumbgenerate" onclick="kgvid_generate_thumb('. $post->ID .', \'generate\');" '.$ffmpeg_disabled_text.'/>
4241
  <input type="button" id="attachments-'. $post->ID .'-thumbrandomize" class="button-secondary" value="'._x('Randomize', 'Button text. Implied "Randomize thumbnail generation"', 'video-embed-thumbnail-generator').'" name="thumbrandomize" onclick="kgvid_generate_thumb('. $post->ID .', \'random\');" '.$ffmpeg_disabled_text.'/>
4242
- <span style="white-space:nowrap;"><input type="checkbox" id="attachments-'. $post->ID .'-firstframe" name="attachments['.$post->ID.'][kgflashmediaplayer-forcefirst]" onchange="document.getElementById(\''.$field_id['thumbtime'].'\').value =\'\';" value="checked" '.$forcefirstchecked.' '.$ffmpeg_disabled_text.'/> <label for="attachments-'. $post->ID .'-firstframe">'.__('Force 1st frame thumbnail', 'video-embed-thumbnail-generator').'</label></span></div>';
4243
 
4244
- $thumbnail_timecode = __('Thumbnail timecode:', 'video-embed-thumbnail-generator').' <input name="attachments['. $post->ID .'][thumbtime]" id="attachments-'. $post->ID .'-thumbtime" type="text" value="'.get_post_meta($post->ID, "_kgflashmediaplayer-thumbtime", true).'" style="width:60px;"><br>';
4245
 
4246
  }
4247
 
 
 
 
4248
  $form_fields["generator"]["label"] = _x("Thumbnails", 'Header for thumbnail section', 'video-embed-thumbnail-generator');
4249
  $form_fields["generator"]["input"] = "html";
4250
  $form_fields["generator"]["html"] = '<input type="hidden" name="attachments['.$post->ID.'][kgflashmediaplayer-security]" id="attachments-'.$post->ID.'-kgflashmediaplayer-security" value="'.$nonce.'" />
4251
  '.$choose_from_video_content.'
4252
  '.$generate_content.'
4253
  '.$thumbnail_timecode.'
4254
- <div id="attachments-'.$post->ID.'-thumbnailplaceholder">'. $thumbnail_html .'</div>
4255
  <span id="pick-thumbnail" class="button-secondary" style="margin:10px 0;" data-choose="'.__('Choose a Thumbnail', 'video-embed-thumbnail-generator').'" data-update="'.__('Set as video thumbnail', 'video-embed-thumbnail-generator').'" data-change="attachments-'. $post->ID .'-kgflashmediaplayer-poster" onclick="kgvid_pick_image(this);">'.__('Choose from Library', 'video-embed-thumbnail-generator').'</span><br />
4256
- <input type="checkbox" id="attachments-'. $post->ID .'-featured" name="attachments['.$post->ID.'][kgflashmediaplayer-featured]" '.$featuredchecked.' '.$ffmpeg_disabled_text.'/> <label for="attachments-'. $post->ID .'-featured">'.__('Set thumbnail as featured image', 'video-embed-thumbnail-generator').'</label>'.$update_script;
4257
 
4258
  $form_fields["kgflashmediaplayer-poster"]["label"] = __("Thumbnail URL", 'video-embed-thumbnail-generator');
4259
  $form_fields["kgflashmediaplayer-poster"]["value"] = get_post_meta($post->ID, "_kgflashmediaplayer-poster", true);
4260
  $form_fields["kgflashmediaplayer-poster"]["helps"] = "<small>".sprintf( __('Leave blank to use %sdefault thumbnail', 'video-embed-thumbnail-generator'), "<a href='options-general.php?page=video-embed-thumbnail-generator/video-embed-thumbnail-generator.php' target='_blank'>" )."</a>.</small>";
4261
 
4262
- $lockaspectchecked = get_post_meta($post->ID, "_kgflashmediaplayer-lockaspect", true);
4263
- if ( $lockaspectchecked == "notchecked" ) { $lockaspectchecked = ""; }
4264
- else { $lockaspectchecked = "checked"; }
4265
-
4266
  $form_fields["kgflashmediaplayer-dimensions"]["label"] = __("Video Embed Dimensions", 'video-embed-thumbnail-generator');
4267
  $form_fields["kgflashmediaplayer-dimensions"]["input"] = "html";
4268
- $form_fields["kgflashmediaplayer-dimensions"]["html"] = __('Width:', 'video-embed-thumbnail-generator').' <input name="attachments['. $post->ID .'][kgflashmediaplayer-width]" id="attachments-'. $post->ID .'-kgflashmediaplayer-width" type="text" value="'.$widthset.'" style="width:50px;" data-minimum="'.$options['minimum_width'].'" onchange="kgvid_set_dimension('.$post->ID.', \'height\', this.value);" onkeyup="kgvid_set_dimension('.$post->ID.', \'height\', this.value);"> '.__('Height:', 'video-embed-thumbnail-generator').'
4269
- <input name="attachments['. $post->ID .'][kgflashmediaplayer-height]" id="attachments-'. $post->ID .'-kgflashmediaplayer-height" type="text" value="'.$heightset.'" style="width:50px;" onchange="kgvid_set_dimension('.$post->ID.', \'width\', this.value);" onkeyup="kgvid_set_dimension('.$post->ID.', \'width\', this.value);"> <br />
4270
- <input type="checkbox" name="attachments['. $post->ID .'][kgflashmediaplayer-lockaspect]" id="attachments-'. $post->ID .'-kgflashmediaplayer-lockaspect" onclick="kgvid_set_aspect('.$post->ID.', this.checked);" value="checked" '.$lockaspectchecked.'>
4271
  <label for="attachments-'. $post->ID .'-kgflashmediaplayer-lockaspect"><small>'.__('Lock to aspect ratio', 'video-embed-thumbnail-generator').'</small></label>';
4272
  $form_fields["kgflashmediaplayer-dimensions"]["helps"] = "<small>".sprintf( __('Leave blank to use %sdefault dimensions', 'video-embed-thumbnail-generator'), "<a href='options-general.php?page=video-embed-thumbnail-generator/video-embed-thumbnail-generator.php' target='_blank'>" )."</a>.</small>";
4273
 
@@ -4278,15 +4853,13 @@ display: inline-block;">Loading thumbnail...</span></div>';
4278
  $form_fields["kgflashmediaplayer-encode"]["input"] = "html";
4279
  $form_fields["kgflashmediaplayer-encode"]["html"] = $checkboxes['checkboxes'];
4280
 
4281
- $track_option = get_post_meta($post->ID, "_kgflashmediaplayer-track", true);
4282
-
4283
  $tracks_html = '';
4284
- if ( is_array($track_option) ) {
4285
- foreach ( $track_option as $track => $track_attribute ) {
4286
  $items = array(__("subtitles", 'video-embed-thumbnail-generator')=>"subtitles", __("captions", 'video-embed-thumbnail-generator')=>"captions", __("chapters", 'video-embed-thumbnail-generator')=>"chapters");
4287
  $track_type_select = '<select name="attachments['.$post->ID.'][kgflashmediaplayer-track]['.$track.'][kind]" id="attachments-'.$post->ID.'-kgflashmediaplayer-track_'.$track.'_kind]">';
4288
  foreach($items as $name=>$value) {
4289
- $selected = ($track_option[$track]['kind']==$value) ? 'selected="selected"' : '';
4290
  $track_type_select .= "<option value='$value'>$name</option>";
4291
  }
4292
  $track_type_select .= "</select>";
@@ -4294,9 +4867,10 @@ display: inline-block;">Loading thumbnail...</span></div>';
4294
  $tracks_html .= '<div id="kgflashmediaplayer-'.$post->ID.'-trackdiv-'.$track.'" class="kgvid_thumbnail_box kgvid_track_box"><strong>'._x('Track', 'captions track', 'video-embed-thumbnail-generator').' '.strval($track+1).'</strong><span class="kgvid_track_box_removeable" onclick="jQuery(this).parent().remove();jQuery(\'form.compat-item input\').first().change();">X</span><br />
4295
  '.__('Track type:', 'video-embed-thumbnail-generator').' '.$track_type_select.'<br />
4296
  <span id="pick-track'.$track.'" class="button-secondary" style="margin:10px 0;" data-choose="'.__('Choose a Text File', 'video-embed-thumbnail-generator').'" data-update="'.__('Set as track source', 'video-embed-thumbnail-generator').'" data-change="attachments-'. $post->ID .'-kgflashmediaplayer-track_'.$track.'_src" onclick="kgvid_pick_attachment(this);">'.__('Choose from Library', 'video-embed-thumbnail-generator').'</span><br />
4297
- URL: <input name="attachments['. $post->ID .'][kgflashmediaplayer-track]['.$track.'][src]" id="attachments-'. $post->ID .'-kgflashmediaplayer-track_'.$track.'_src" type="text" value="'.$track_option[$track]['src'].'" class="text"><br />
4298
- '._x('Language code:', 'two-letter code indicating track\'s language', 'video-embed-thumbnail-generator').' <input name="attachments['. $post->ID .'][kgflashmediaplayer-track]['.$track.'][srclang]" id="attachments-'. $post->ID .'-kgflashmediaplayer-track_'.$track.'_srclang" type="text" value="'.$track_option[$track]['srclang'].'" maxlength="2" style="width:40px;"><br />
4299
- '.__('Label:', 'video-embed-thumbnail-generator').' <input name="attachments['. $post->ID .'][kgflashmediaplayer-track]['.$track.'][label]" id="attachments-'. $post->ID .'-kgflashmediaplayer-track_'.$track.'_label" type="text" value="'.$track_option[$track]['label'].'" class="text"></div>';
 
4300
  }
4301
  }
4302
 
@@ -4305,49 +4879,32 @@ display: inline-block;">Loading thumbnail...</span></div>';
4305
  $form_fields["kgflashmediaplayer-track"]["html"] = '<div id="kgflashmediaplayer-'.$post->ID.'-trackdiv">'.$tracks_html.'</div><span class="button-secondary" id="kgflashmediaplayer-add_track" onclick="kgvid_add_subtitles('.$post->ID.')">'.__('Add track', 'video-embed-thumbnail-generator').'</span>';
4306
 
4307
 
4308
- $showtitlechecked = get_post_meta($post->ID, "_kgflashmediaplayer-showtitle", true);
4309
- if ( $showtitlechecked == "notchecked" ) { $showtitlechecked = ""; }
4310
- $downloadlinkchecked = get_post_meta($post->ID, "_kgflashmediaplayer-downloadlink", true);
4311
- if ( empty($downloadlinkchecked) ) { $downloadlinkchecked = $options['downloadlink']; }
4312
- if ( $downloadlinkchecked == "on" ) { $downloadlinkchecked = "checked"; }
4313
- if ( $downloadlinkchecked == "notchecked" ) { $downloadlinkchecked = ""; }
4314
- $embed_option = get_post_meta($post->ID, "_kgflashmediaplayer-embed", true);
4315
-
4316
  $items = array(__("Single Video", 'video-embed-thumbnail-generator')=>"Single Video", __("Video Gallery", 'video-embed-thumbnail-generator')=>"Video Gallery", __("WordPress Default", 'video-embed-thumbnail-generator')=>"WordPress Default");
4317
  $shortcode_select = '<select name="attachments['.$post->ID.'][kgflashmediaplayer-embed]" id="attachments['.$post->ID.'][kgflashmediaplayer-embed]">';
4318
  foreach($items as $name=>$value) {
4319
- $selected = ($embed_option==$value) ? 'selected="selected"' : '';
4320
  $shortcode_select .= "<option value='$value' $selected>$name</option>";
4321
  }
4322
  $shortcode_select .= "</select>";
4323
 
4324
  $form_fields["kgflashmediaplayer-options"]["label"] = __("Video Embed Options", 'video-embed-thumbnail-generator');
4325
  $form_fields["kgflashmediaplayer-options"]["input"] = "html";
4326
- $form_fields["kgflashmediaplayer-options"]["html"] = '<input type="checkbox" name="attachments['.$post->ID.'][kgflashmediaplayer-showtitle]" id="attachments-'.$post->ID.'-kgflashmediaplayer-showtitle" value="checked" '.$showtitlechecked.'>
4327
  <label for="attachments-'.$post->ID.'-kgflashmediaplayer-showtitle">'.__('Insert title above video', 'video-embed-thumbnail-generator').'</label><br />
4328
- <input type="checkbox" name="attachments['.$post->ID.'][kgflashmediaplayer-downloadlink]" id="attachments-'.$post->ID.'-kgflashmediaplayer-downloadlink" value="checked" '.$downloadlinkchecked.'>
4329
  <label for="attachments-'.$post->ID.'-kgflashmediaplayer-downloadlink">'.__('Insert download link below video', 'video-embed-thumbnail-generator').'<em><small><br />'.__('Makes it easier for users to download file.', 'video-embed-thumbnail-generator').'</em></small></label><br />
4330
  <label for="attachments-'.$post->ID.'-kgflashmediaplayer-embed">'._x('Insert', 'verb', 'video-embed-thumbnail-generator').'</label>
4331
  '.$shortcode_select.'
4332
  <script type="text/javascript">jQuery(document).ready(function(){kgvid_hide_standard_wordpress_display_settings('.$post->ID.');});</script>';
4333
 
4334
- if ( get_post_meta($post->ID, "_kgflashmediaplayer-embed", true) == "Video Gallery" ) {
4335
-
4336
- $gallery_thumb_width = get_post_meta($post->ID, "_kgflashmediaplayer-gallery_thumb_width", true);
4337
- if ( empty($gallery_thumb_width) ) { $gallery_thumb_width = $options['gallery_thumb']; }
4338
 
4339
- $gallery_exclude = get_post_meta($post->ID, "_kgflashmediaplayer-gallery_exclude", true);
4340
- $gallery_include = get_post_meta($post->ID, "_kgflashmediaplayer-gallery_include", true);
4341
- $gallery_orderby = get_post_meta($post->ID, "_kgflashmediaplayer-gallery_orderby", true);
4342
- $gallery_order = get_post_meta($post->ID, "_kgflashmediaplayer-gallery_order", true);
4343
-
4344
- $gallery_id = get_post_meta($post->ID, "_kgflashmediaplayer-gallery_id", true);
4345
- if ( empty($gallery_id) ) { $gallery_id = $post->post_parent; }
4346
 
4347
  $items = array("menu_order", "title", "post_date", "rand", "ID");
4348
  $gallery_orderby_select = '<select name="attachments['.$post->ID.'][kgflashmediaplayer-gallery_orderby]" id="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_orderby">';
4349
  foreach($items as $item) {
4350
- $selected = ($gallery_orderby==$item) ? 'selected="selected"' : '';
4351
  $gallery_orderby_select .= "<option value='$item' $selected>$item</option>";
4352
  }
4353
  $gallery_orderby_select .= "</select>";
@@ -4355,19 +4912,19 @@ display: inline-block;">Loading thumbnail...</span></div>';
4355
  $items = array("ASC", "DESC");
4356
  $gallery_order_select = '<select name="attachments['.$post->ID.'][kgflashmediaplayer-gallery_order]" id="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_order">';
4357
  foreach($items as $item) {
4358
- $selected = ($gallery_order==$item) ? 'selected="selected"' : '';
4359
  $gallery_order_select .= "<option value='$item' $selected>$item</option>";
4360
  }
4361
  $gallery_order_select .= "</select>";
4362
 
4363
  $form_fields["kgflashmediaplayer-gallery"]["label"] = __("Gallery Settings (all optional)", 'video-embed-thumbnail-generator');
4364
  $form_fields["kgflashmediaplayer-gallery"]["input"] = "html";
4365
- $form_fields["kgflashmediaplayer-gallery"]["html"] = '<input name="attachments['.$post->ID.'][kgflashmediaplayer-gallery_thumb_width]" id="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_thumb_width" type ="text" value="'.$gallery_thumb_width.'" class="kgvid_50_width"> <label for="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_thumb_width">'.__('Thumbnail Width', 'video-embed-thumbnail-generator').'</label><br />
4366
  '.$gallery_orderby_select.' '.__('Order By', 'video-embed-thumbnail-generator').'<br />
4367
  '.$gallery_order_select.' '.__('Sort Order', 'video-embed-thumbnail-generator').'<br />
4368
- <input name="attachments['.$post->ID.'][kgflashmediaplayer-gallery_exclude]" id="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_exclude" type ="text" value="'.$gallery_exclude.'" class="kgvid_50_width"> <label for="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_exclude">'.__('Exclude', 'video-embed-thumbnail-generator').'</label><br />
4369
- <input name="attachments['.$post->ID.'][kgflashmediaplayer-gallery_include]" id="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_include" type ="text" value="'.$gallery_include.'" class="kgvid_50_width"> <label for="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_include">'.__('Include', 'video-embed-thumbnail-generator').'</label><br />
4370
- <input name="attachments['.$post->ID.'][kgflashmediaplayer-gallery_id]" id="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_id" type ="text" value="'.$gallery_id.'" class="kgvid_50_width"> <label for="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_id">'.__('Post ID', 'video-embed-thumbnail-generator').'</label>
4371
  ';
4372
 
4373
  }//if video gallery
@@ -4377,6 +4934,30 @@ return $form_fields;
4377
  // attach our function to the correct hook
4378
  add_filter("attachment_fields_to_edit", "kgvid_image_attachment_fields_to_edit", null, 2);
4379
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4380
  function kgvid_hide_video_children($wp_query_obj) {
4381
 
4382
  if ( is_admin()
@@ -4403,16 +4984,18 @@ add_action('pre_get_posts','kgvid_hide_video_children');
4403
  function kgvid_change_video_icon($icon, $mime, $post_id) {
4404
 
4405
  $post = get_post($post_id);
 
4406
 
4407
  if ( substr($mime, 0, 5) == 'video' ) {
4408
 
4409
  if ( !empty($post->post_parent) && strpos(get_post_mime_type( $post->post_parent ), 'video') !== false
4410
- || get_post_meta($post->ID, '_kgflashmediaplayer-externalurl', true) != false ) {
4411
  $post_id = $post->post_parent; //use post parent if this is a child video or encoded from an external url
4412
  }
4413
  $poster_id = get_post_meta($post_id, '_kgflashmediaplayer-poster-id', true);
4414
- if ( $poster_id ) {
4415
  $poster_src = wp_get_attachment_image_src( $poster_id, 'thumbnail' );
 
4416
  global $_current_video_icon_dir;
4417
  $_current_video_icon_dir = dirname($poster_src[0]);
4418
  // - Return your icon path
@@ -4437,12 +5020,6 @@ function kgvid_video_icon_dir($dir) {
4437
  }
4438
  add_filter('icon_dir', 'kgvid_video_icon_dir');
4439
 
4440
- /* function kgvid_add_theme_support() {
4441
- add_post_type_support( 'attachment:video', 'thumbnail' );
4442
- add_theme_support( 'post-thumbnails', 'attachment:video' );
4443
- }
4444
- add_action( 'after_setup_theme', 'kgvid_add_theme_support' ); */
4445
-
4446
  function kgvid_ajax_save_html5_thumb() {
4447
 
4448
  if ( current_user_can('make_video_thumbnails') ) {
@@ -4468,8 +5045,10 @@ function kgvid_ajax_save_html5_thumb() {
4468
  $editor = wp_get_image_editor( $tmp_posterpath );
4469
  $thumb_dimensions = $editor->get_size();
4470
  if ( $thumb_dimensions ) {
4471
- update_post_meta($post_id, '_kgflashmediaplayer-actualwidth', $thumb_dimensions['width']);
4472
- update_post_meta($post_id, '_kgflashmediaplayer-actualheight', $thumb_dimensions['height']);
 
 
4473
  }
4474
  $editor->set_quality( 90 );
4475
  $new_image_info = $editor->save( $uploads['path'].'/thumb_tmp/'.$posterfile.'.jpg', 'image/jpeg' );
@@ -4636,15 +5215,16 @@ function kgvid_ajax_redraw_thumbnail_box() {
4636
  check_ajax_referer( 'video-embed-thumbnail-generator-nonce', 'security' );
4637
 
4638
  $post_id = $_POST['post_id'];
 
4639
  $poster_id = get_post_meta($post_id, "_kgflashmediaplayer-poster-id", true);
4640
  $thumbnail_size_url = "";
4641
- if ( $poster_id ) {
4642
  $thumbnail_src = wp_get_attachment_image_src($poster_id, 'thumbnail');
4643
  if ( is_array($thumbnail_src) && array_key_exists(0, $thumbnail_src) ) { $thumbnail_size_url = $thumbnail_src[0]; }
4644
  }
4645
  $response['thumb_url'] = get_post_meta($post_id, "_kgflashmediaplayer-poster", true);
4646
  $response['thumbnail_size_url'] = $thumbnail_size_url;
4647
- $response['thumb_error'] = get_post_meta($post_id, "_kgflashmediaplayer-autothumb-error", true);
4648
  echo json_encode($response);
4649
  die();
4650
 
@@ -4662,16 +5242,22 @@ function kgvid_video_attachment_fields_to_save($post, $attachment) {
4662
  // $post['post_type'] == 'attachment'
4663
  static $flag = 0;
4664
 
4665
- if( !empty($post['ID']) && $flag < 1 ) {
 
 
4666
 
4667
  $thumb_id = "";
4668
  if( isset($attachment['kgflashmediaplayer-poster']) ) {
4669
 
4670
  $thumb_url = $attachment['kgflashmediaplayer-poster'];
 
4671
 
4672
- if ( !empty($thumb_url) ) {
4673
  $thumb_id = kgvid_save_thumb($post['ID'], $post['post_title'], $thumb_url);
4674
- if ( $thumb_id ) { update_post_meta($post['ID'], '_kgflashmediaplayer-poster-id', $thumb_id); }
 
 
 
4675
  }
4676
  else {
4677
  delete_post_meta($post['ID'], '_kgflashmediaplayer-poster');
@@ -4680,11 +5266,8 @@ function kgvid_video_attachment_fields_to_save($post, $attachment) {
4680
  update_post_meta($post['ID'], '_kgflashmediaplayer-poster', $thumb_url);
4681
  }
4682
 
4683
- if( isset($attachment['kgflashmediaplayer-numberofthumbs']) ) { update_post_meta($post['ID'], '_kgflashmediaplayer-numberofthumbs', $attachment['kgflashmediaplayer-numberofthumbs']); }
4684
- if( isset($attachment['kgflashmediaplayer-forcefirst']) ) { update_post_meta($post['ID'], '_kgflashmediaplayer-forcefirst', $attachment['kgflashmediaplayer-forcefirst']); }
4685
- else { update_post_meta($post['ID'], '_kgflashmediaplayer-forcefirst', ""); }
4686
  if( isset($attachment['kgflashmediaplayer-featured']) ) {
4687
- update_post_meta($post['ID'], '_kgflashmediaplayer-featured', $attachment['kgflashmediaplayer-featured']);
4688
  if ( !empty($thumb_id) ) {
4689
 
4690
  if ( isset($_POST['action']) && $_POST['action'] == 'save-attachment-compat' && isset($_POST['post_id']) ) { //if this is in the media modal
@@ -4700,42 +5283,34 @@ function kgvid_video_attachment_fields_to_save($post, $attachment) {
4700
 
4701
  }
4702
  }
4703
- else { update_post_meta($post['ID'], '_kgflashmediaplayer-featured', "notchecked"); }
4704
 
4705
  if ( !empty($thumb_id) ) { //always set the video's featured image regardless of the plugin setting
4706
  set_post_thumbnail($post['ID'], $thumb_id);
4707
  }
4708
- else { delete_post_thumbnail($post['ID']); }
4709
 
4710
- if( isset($attachment['thumbtime']) ) {update_post_meta($post['ID'], '_kgflashmediaplayer-thumbtime', $attachment['thumbtime']); }
4711
- if( isset($attachment['kgflashmediaplayer-width']) ) { update_post_meta($post['ID'], '_kgflashmediaplayer-width', $attachment['kgflashmediaplayer-width']); }
4712
- if( isset($attachment['kgflashmediaplayer-height']) ) { update_post_meta($post['ID'], '_kgflashmediaplayer-height', $attachment['kgflashmediaplayer-height']); }
4713
- if( isset($attachment['kgflashmediaplayer-aspect']) ) { update_post_meta($post['ID'], '_kgflashmediaplayer-aspect', $attachment['kgflashmediaplayer-aspect']); }
4714
- if( isset($attachment['kgflashmediaplayer-lockaspect']) ) { update_post_meta($post['ID'], '_kgflashmediaplayer-lockaspect', $attachment['kgflashmediaplayer-lockaspect']); }
4715
- else { update_post_meta($post['ID'], '_kgflashmediaplayer-lockaspect', "notchecked"); }
4716
-
4717
- $video_formats = kgvid_video_formats();
4718
  foreach ( $video_formats as $format => $format_stats ) {
4719
- if( isset($attachment['kgflashmediaplayer-encode'.$format]) ) { update_post_meta($post['ID'], '_kgflashmediaplayer-encode'.$format, "on"); }
4720
- else { update_post_meta($post['ID'], '_kgflashmediaplayer-encode'.$format, "false"); }
 
 
4721
  }
4722
 
4723
- if( isset($attachment['kgflashmediaplayer-track']) ) { update_post_meta($post['ID'], '_kgflashmediaplayer-track', array_values($attachment['kgflashmediaplayer-track'])); }
4724
- else { delete_post_meta($post['ID'], '_kgflashmediaplayer-track'); }
 
 
4725
 
4726
- if( isset($attachment['kgflashmediaplayer-showtitle']) ) { update_post_meta($post['ID'], '_kgflashmediaplayer-showtitle', $attachment['kgflashmediaplayer-showtitle']); }
4727
- else { update_post_meta($post['ID'], '_kgflashmediaplayer-showtitle', "notchecked"); }
4728
 
4729
- if( isset($attachment['kgflashmediaplayer-downloadlink']) ) { update_post_meta($post['ID'], '_kgflashmediaplayer-downloadlink', $attachment['kgflashmediaplayer-downloadlink']); }
4730
- else { update_post_meta($post['ID'], '_kgflashmediaplayer-downloadlink', "notchecked"); }
 
 
 
 
4731
 
4732
- if( isset($attachment['kgflashmediaplayer-embed']) ) { update_post_meta($post['ID'], '_kgflashmediaplayer-embed', $attachment['kgflashmediaplayer-embed']); }
4733
- if( isset($attachment['kgflashmediaplayer-gallery_thumb_width']) ) { update_post_meta($post['ID'], '_kgflashmediaplayer-gallery_thumb_width', $attachment['kgflashmediaplayer-gallery_thumb_width']); }
4734
- if( isset($attachment['kgflashmediaplayer-gallery_exclude']) ) { update_post_meta($post['ID'], '_kgflashmediaplayer-gallery_exclude', $attachment['kgflashmediaplayer-gallery_exclude']); }
4735
- if( isset($attachment['kgflashmediaplayer-gallery_include']) ) { update_post_meta($post['ID'], '_kgflashmediaplayer-gallery_include', $attachment['kgflashmediaplayer-gallery_include']); }
4736
- if( isset($attachment['kgflashmediaplayer-gallery_orderby']) ) { update_post_meta($post['ID'], '_kgflashmediaplayer-gallery_orderby', $attachment['kgflashmediaplayer-gallery_orderby']); }
4737
- if( isset($attachment['kgflashmediaplayer-gallery_order']) ) { update_post_meta($post['ID'], '_kgflashmediaplayer-gallery_order', $attachment['kgflashmediaplayer-gallery_order']); }
4738
- if( isset($attachment['kgflashmediaplayer-gallery_id']) ) { update_post_meta($post['ID'], '_kgflashmediaplayer-gallery_id', $attachment['kgflashmediaplayer-gallery_id']); }
4739
 
4740
  }
4741
  $flag++;
@@ -4743,13 +5318,6 @@ function kgvid_video_attachment_fields_to_save($post, $attachment) {
4743
  }
4744
  add_filter("attachment_fields_to_save", "kgvid_video_attachment_fields_to_save", null, 2);
4745
 
4746
- /* function kgvid_sync_thumbnail_with_featured ( $meta_id, $post_id, $meta_key, $meta_value ) {
4747
-
4748
- if ( $meta_key == "_kgflashmediaplayer-poster-id" ) { set_post_thumbnail($post_id, $meta_value); }
4749
-
4750
- }
4751
- add_action( 'updated_post_meta', 'kgvid_sync_thumbnail_with_featured', 10, 4 ); */
4752
-
4753
  class kgInsertMedia {
4754
  //class constructor
4755
  function kgInsertMedia () {
@@ -4758,67 +5326,68 @@ class kgInsertMedia {
4758
  //function that does the modifying
4759
  function kgmodifyMediaInsert($html, $attachment_id, $attachment) {
4760
 
4761
- $options = kgvid_get_options();
4762
- $output = $html;
4763
- $attachment['embed'] = get_post_meta($attachment_id, "_kgflashmediaplayer-embed", true);
4764
-
4765
- if ( $attachment['embed'] == "Single Video" ) {
4766
- $output = "";
4767
- $attachment['url'] = wp_get_attachment_url($attachment_id);
4768
- $attachment['title'] = get_the_title($attachment_id);
4769
- $attachment['poster'] = get_post_meta($attachment_id, "_kgflashmediaplayer-poster", true);
4770
- $attachment['width'] = get_post_meta($attachment_id, "_kgflashmediaplayer-width", true);
4771
- $attachment['height'] = get_post_meta($attachment_id, "_kgflashmediaplayer-height", true);
4772
- $attachment['downloadlink'] = get_post_meta($attachment_id, "_kgflashmediaplayer-downloadlink", true);
4773
- $attachment['showtitle'] = get_post_meta($attachment_id, "_kgflashmediaplayer-showtitle", true);
4774
- if ($attachment['showtitle'] =="checked") {
4775
- $titlecode = html_entity_decode(stripslashes($options['titlecode']));
4776
- if ( substr($titlecode, 0, 1) != '<' ) { $titlecode = '<'.$titlecode; }
4777
- if ( substr($titlecode, -1, 1) != '>' ) { $titlecode .= '>'; }
4778
- $endtitlecode = str_replace("<", "</", $titlecode);
4779
- $endtitlecode_array = explode(' ', $endtitlecode);
4780
- if ( substr($endtitlecode_array[0], -1) != ">" ) { $endtitlecode = $endtitlecode_array[0].">"; }
4781
- $output .= $titlecode.'<span itemprop="name">'.$attachment["title"].'</span>'.$endtitlecode.'<br />';
4782
- }
4783
- $output .= '[KGVID';
4784
- if ($attachment['poster'] !="") { $output .= ' poster="'.$attachment["poster"].'"'; }
4785
- if ($attachment['width'] !="") { $output .= ' width="'.$attachment["width"].'"'; }
4786
- if ($attachment['height'] !="") { $output .= ' height="'.$attachment["height"].'"'; }
4787
- if ($attachment['downloadlink'] == "checked") { $output .= ' downloadlink="true"'; }
4788
- $output .= ']'.$attachment["url"].'[/KGVID]<br />';
4789
- } //if embed code is enabled
4790
-
4791
- if ($attachment['embed'] == "Video Gallery" ) {
4792
-
4793
- $attachment['gallery_thumb'] = get_post_meta($attachment_id, "_kgflashmediaplayer-gallery_thumb_width", true);
4794
- $attachment['gallery_exclude'] = get_post_meta($attachment_id, "_kgflashmediaplayer-gallery_exclude", true);
4795
- $attachment['gallery_include'] = get_post_meta($attachment_id, "_kgflashmediaplayer-gallery_include", true);
4796
- $attachment['gallery_orderby'] = get_post_meta($attachment_id, "_kgflashmediaplayer-gallery_orderby", true);
4797
- $attachment['gallery_order'] = get_post_meta($attachment_id, "_kgflashmediaplayer-gallery_order", true);
4798
- $attachment['gallery_id'] = get_post_meta($attachment_id, "_kgflashmediaplayer-gallery_id", true);
4799
- $post = get_post($attachment_id);
4800
- $parent_id = $post->post_parent;
4801
-
4802
- $output = "";
4803
- $output .= '[KGVID gallery="true"';
4804
- if ( !empty($attachment['gallery_thumb']) && $attachment['gallery_thumb'] != $options['gallery_thumb'] ) { $output .= ' gallery_thumb="'.$attachment["gallery_thumb"].'"'; }
4805
- if ( !empty($attachment['gallery_exclude']) ) { $output .= ' gallery_exclude="'.$attachment["gallery_exclude"].'"'; }
4806
- if ( !empty($attachment['gallery_include']) ) { $output .= ' gallery_include="'.$attachment["gallery_include"].'"'; }
4807
- if ( !empty($attachment['gallery_orderby']) && $attachment['gallery_orderby'] != "menu_order" ) { $output .= ' gallery_orderby="'.$attachment["gallery_orderby"].'"'; }
4808
- if ( !empty($attachment['gallery_order']) && $attachment['gallery_order'] != "ASC" ) { $output .= ' gallery_order="'.$attachment["gallery_order"].'"'; }
4809
- if ( !empty($attachment['gallery_id']) && $attachment['gallery_id'] != $parent_id ) { $output .= ' gallery_id="'.$attachment["gallery_id"].'"'; }
4810
- $output .= '][/KGVID]';
4811
  }
4812
 
4813
- return $output;
4814
- }
 
4815
  }
4816
  //instantiate the class
4817
  $kgIM = new kgInsertMedia();
4818
 
4819
  function kgvid_embedurl_menu($tabs) {
4820
  $newtab = array( 'embedurl' => _x('Embed Video from URL', 'Title in "Add Media" popup sidebar', 'video-embed-thumbnail-generator') );
4821
- return array_merge($tabs, $newtab);
 
4822
  }
4823
  add_filter('media_upload_tabs', 'kgvid_embedurl_menu');
4824
 
@@ -4857,14 +5426,14 @@ function kgvid_media_embedurl_process() {
4857
  </tr>
4858
  <?php if ( current_user_can('make_video_thumbnails') ) { ?>
4859
  <tr>
4860
- <th valign="top" scope="row" class="label"><span class="alignleft"><label for="numberofthumbs"><?php _e('Thumbnails', 'video-embed-thumbnail-generator') ?></label></span></th>
4861
  <td class="field">
4862
- <input id="attachments-singleurl-numberofthumbs" type="text" value="<?php echo $options['generate_thumbs']; ?>" maxlength="2" size="4" style="width:35px;text-align:center;" title="<?php _e('Number of Thumbnails', 'video-embed-thumbnail-generator') ?>" onchange="document.getElementById('attachments-singleurl-thumbtime').value='';" />
4863
  <input type="button" id="attachments-singleurl-thumbgenerate" class="button-secondary" value="<?php _e('Generate', 'video-embed-thumbnail-generator') ?>" name="thumbgenerate" onclick="kgvid_generate_thumb('singleurl', 'generate');" disabled title="<?php _e('Please enter a valid video URL', 'video-embed-thumbnail-generator') ?>" />
4864
  <input type="button" id="attachments-singleurl-thumbrandomize" class="button-secondary" value="<?php _e('Randomize', 'video-embed-thumbnail-generator') ?>" name="thumbrandomize" onclick="kgvid_generate_thumb('singleurl', 'random');" disabled title="<?php _e('Please enter a valid video URL', 'video-embed-thumbnail-generator') ?>" />
4865
- <input type="checkbox" id="attachments-singleurl-firstframe" onchange="document.getElementById('attachments-singleurl-thumbtime').value ='';" /><label for="attachments-singleurl-firstframe"><?php _e('Force 1st Frame Thumbnail', 'video-embed-thumbnail-generator') ?></label><br>
4866
  <div id="attachments-singleurl-thumbnailplaceholder"></div>
4867
- <span><?php _e('Thumbnail timecode:', 'video-embed-thumbnail-generator') ?></span> <input name="attachments[singleurl][thumbtime]" id="attachments-singleurl-thumbtime" type="text" value="" style="width:60px;"><br>
4868
  <input type="checkbox" <?php echo checked( $options["featured"], "on", false ); ?> id="attachments-singleurl-featured" name="attachments[singleurl][kgflashmediaplayer-featured]" /> <?php _e('Set thumbnail as featured image', 'video-embed-thumbnail-generator') ?>
4869
  </td>
4870
  </tr>
@@ -4887,7 +5456,7 @@ function kgvid_media_embedurl_process() {
4887
  <?php } ?>
4888
  <tr>
4889
  <th valign="top" scope="row" class="label"><span class="alignleft"><label><?php _e('Subtitles & Captions', 'video-embed-thumbnail-generator') ?></span></label></th>
4890
- <td><div id="kgflashmediaplayer-singleurl-trackdiv" class="kgvid_thumbnail_box kgvid_track_box"><?php _e('Track type:', 'video-embed-thumbnail-generator') ?><select name="attachments[singleurl][kgflashmediaplayer-track][kind]" id="attachments-singleurl-kgflashmediaplayer-track_kind"><option value="subtitles"><?php _e('subtitles', 'video-embed-thumbnail-generator') ?></option><option value="captions"><?php _e('captions', 'video-embed-thumbnail-generator') ?></option><option value="chapters"><?php _e('chapters', 'video-embed-thumbnail-generator') ?></option></select><br />URL: <input name="attachments[singleurl][kgflashmediaplayer-track][src]" id="attachments-singleurl-kgflashmediaplayer-track_src" type="text" value="" class="text"><br /><?php _e('Language code:', 'video-embed-thumbnail-generator') ?> <input name="attachments[singleurl][kgflashmediaplayer-track][srclang]" id="attachments-singleurl-kgflashmediaplayer-track_srclang" type="text" value="" maxlength="2" style="width:40px;"><br /><?php _e('Label:', 'video-embed-thumbnail-generator') ?> <input name="attachments[singleurl][kgflashmediaplayer-track][label]" id="attachments-singleurl-kgflashmediaplayer-track_label" type="text" value="" class="text"></div></td>
4891
  <tr>
4892
  <th valign="top" scope="row" class="label"><span class="alignleft"><label>Options</span></label></th>
4893
  <td><input type="checkbox" <?php echo checked( $options["downloadlink"], "on", false ); ?> name="downloadlink" id="downloadlink" value="true" class="field" /><label for="downloadlink"><?php _e('Generate Download Link Below Video', 'video-embed-thumbnail-generator') ?><br /><small></em><?php _e('Makes it easier for users to download video file', 'video-embed-thumbnail-generator') ?></em></small></label></td>
@@ -4930,12 +5499,12 @@ function kgvid_generate_attachment_shortcode($kgvid_video_embed) {
4930
  global $post;
4931
  global $wp_query;
4932
  $options = kgvid_get_options();
 
4933
 
4934
  if ( is_array($kgvid_video_embed) && array_key_exists('sample', $kgvid_video_embed) ) { $url = plugins_url('/images/sample-video-h264.mp4', __FILE__); }
4935
  else { $url = wp_get_attachment_url($post->ID); }
4936
 
4937
  $poster = get_post_meta($post->ID, "_kgflashmediaplayer-poster", true);
4938
- $downloadlink = get_post_meta($post->ID, '_kgflashmediaplayer-downloadlink', true);
4939
 
4940
  if ( is_array($kgvid_video_embed) && array_key_exists('gallery', $kgvid_video_embed) ) { $gallery = true; }
4941
  else { $gallery = false; }
@@ -4946,7 +5515,7 @@ function kgvid_generate_attachment_shortcode($kgvid_video_embed) {
4946
  if ( $poster !="" ) { $shortcode .= ' poster="'.$poster.'"'; }
4947
  if ( !empty($dimensions['width']) ) { $shortcode .= ' width="'.$dimensions['width'].'"'; }
4948
  if ( !empty($dimensions['height']) ) { $shortcode .= ' height="'.$dimensions['height'].'"'; }
4949
- if ( $downloadlink == "checked" ) { $shortcode .= ' downloadlink="true"'; }
4950
  if (is_array($kgvid_video_embed) && array_key_exists('gallery', $kgvid_video_embed)) { $shortcode .= ' autoplay="true"'; }
4951
  if (is_array($kgvid_video_embed) && array_key_exists('sample', $kgvid_video_embed)) {
4952
  if ( $options['overlay_title'] == "on" ) { $shortcode .= ' title="'._x('Sample Video', 'example video', 'video-embed-thumbnail-generator').'"'; }
@@ -4975,6 +5544,39 @@ function kgvid_filter_video_attachment_content($content) {
4975
  }
4976
  add_filter( 'the_content', 'kgvid_filter_video_attachment_content' );
4977
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4978
  function kgvid_video_attachment_template() {
4979
 
4980
  global $post;
@@ -4984,39 +5586,30 @@ function kgvid_video_attachment_template() {
4984
  $options = kgvid_get_options();
4985
 
4986
  $kgvid_video_embed = array ( 'enable' => 'false' ); //turned off by default
4987
- if ( isset($wp_query->query_vars['kgvid_video_embed']) ) { $kgvid_video_embed = $wp_query->query_vars['kgvid_video_embed']; }
4988
  if ( $options['template'] == "old" ) { $kgvid_video_embed['enable'] = 'true'; } //regardless of any query settings, if we're using the old method it's turned on
4989
  if ( (!is_array($kgvid_video_embed) && $kgvid_video_embed == "true") ) { $kgvid_video_embed = array ( 'enable' => 'true' ); } //maintain backwards compatibility
4990
 
4991
  if ( $options['embeddable'] == 'false' && !array_key_exists('sample', $kgvid_video_embed) && !array_key_exists('gallery', $kgvid_video_embed) ) { $kgvid_video_embed['enable'] = 'false'; }
4992
 
4993
- if ( array_key_exists('enable', $kgvid_video_embed) && $kgvid_video_embed['enable'] == 'true' && (strpos($post->post_mime_type,"video") !== false || array_key_exists('sample', $kgvid_video_embed)) ) {
4994
-
4995
- $content_width_save = $content_width;
4996
- $content_width = 2048;
4997
-
4998
- remove_action('wp_head', '_admin_bar_bump_cb'); //don't show the WordPress admin bar if you're logged in
4999
- add_filter( 'show_admin_bar', '__return_false' );
5000
-
5001
- $shortcode = kgvid_generate_attachment_shortcode($kgvid_video_embed);
5002
-
5003
- echo '<html style="background-color:transparent;"><head>';
5004
- echo (wp_head());
5005
- echo '<style>.kgvid_wrapper { margin:0; }';
5006
- if ( array_key_exists('gallery', $kgvid_video_embed) ) { echo ' .kgvid_below_video { color:white; } .kgvid_below_video a { color:aaa; }'; }
5007
- echo '</style>';
5008
- echo '</head><body class="content" style="margin:0px; font-family: sans-serif; padding:0px; border:none;';
5009
- if ( array_key_exists('gallery', $kgvid_video_embed) ) { echo 'background-color:black; '; }
5010
- else { echo 'background-color:transparent; '; }
5011
- echo '">';
5012
- echo (do_shortcode( $shortcode ));
5013
- echo (wp_footer());
5014
- echo '</body></html>';
5015
- $content_width = $content_width_save; //reset $content_width
5016
  exit;
5017
  }
5018
 
5019
- if ( array_key_exists('download', $kgvid_video_embed) && $kgvid_video_embed['download'] == 'true' && strpos($post->post_mime_type,"video") !== false ) {
 
 
 
 
 
 
5020
 
5021
  $filepath = get_attached_file($post->ID);
5022
  $filetype = wp_check_filetype( $filepath );
@@ -5039,15 +5632,83 @@ function kgvid_video_attachment_template() {
5039
  header('Expires: 0');
5040
  header('Pragma: no-cache');
5041
  header("Content-Length: ".filesize($filepath));
 
 
 
 
5042
  }
5043
 
5044
- kvid_readfile_chunked($filepath);
5045
- exit;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5046
  }
5047
 
5048
  }
5049
  add_action('template_redirect', 'kgvid_video_attachment_template');
5050
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5051
  /* function kgvid_serve_secure_video_files($wp) {
5052
  if ( array_key_exists('kgvid_video_embed', $wp->query_vars) && array_key_exists('id', $wp->query_vars['kgvid_video_embed']) && array_key_exists('format', $wp->query_vars['kgvid_video_embed']) && array_key_exists('token', $wp->query_vars['kgvid_video_embed']) ) {
5053
  $kgvid_video_embed = $wp->query_vars['kgvid_video_embed'];
@@ -5113,22 +5774,23 @@ function kgvid_make_thumbs($postID, $movieurl, $numberofthumbs, $i, $iincreaser,
5113
  $moviefilepath = esc_url_raw(str_replace(" ", "%20", $movieurl));
5114
  $moviefilepath = str_replace("https://", "http://", $moviefilepath);
5115
  }
5116
- $duration = get_post_meta($postID, '_kgflashmediaplayer-duration', true);
5117
- if ( !$duration ) {
 
 
 
5118
  $movie_info = kgvid_get_video_dimensions($moviefilepath);
5119
- if ( !empty($movie_info['width']) ) { update_post_meta($postID, '_kgflashmediaplayer-actualwidth', $movie_info['width']); }
5120
- if ( !empty($movie_info['height']) ) { update_post_meta($postID, '_kgflashmediaplayer-actualheight', $movie_info['height']); }
5121
- if ( !empty($movie_info['duration']) ) { update_post_meta($postID, '_kgflashmediaplayer-duration', $movie_info['duration']); }
5122
- if ( !empty($movie_info['rotate']) ) { update_post_meta($postID, '_kgflashmediaplayer-rotate', $movie_info['rotate']); }
5123
  }
5124
- else {
5125
- $movie_info = array (
5126
- 'width' => get_post_meta($postID, '_kgflashmediaplayer-actualwidth', true),
5127
- 'height' => get_post_meta($postID, '_kgflashmediaplayer-actualheight', true),
5128
- 'duration' => get_post_meta($postID, '_kgflashmediaplayer-duration', true),
5129
- 'rotate' => get_post_meta($postID, '_kgflashmediaplayer-rotate', true),
5130
- 'worked' => true
5131
- );
5132
  }
5133
  }
5134
  else {
@@ -5148,11 +5810,12 @@ function kgvid_make_thumbs($postID, $movieurl, $numberofthumbs, $i, $iincreaser,
5148
 
5149
  if (!file_exists($uploads['path'].'/thumb_tmp')) { mkdir($uploads['path'].'/thumb_tmp'); }
5150
 
5151
- if ( $movie_info['rotate'] === false) { $movie_info['rotate'] = ""; }
5152
  switch ($movie_info['rotate']) { //if it's a sideways mobile video
5153
  case ' -vf "transpose=1"': //90 degrees
5154
  case ' -vf "transpose=2"': //270 degrees
5155
- $movie_width ^= $movie_height ^= $movie_width ^= $movie_height; break; //swap height & width
 
5156
  }
5157
 
5158
  $thumbnailheight = strval(round(floatval($movie_height) / floatval($movie_width) * 200));
@@ -5200,7 +5863,7 @@ function kgvid_make_thumbs($postID, $movieurl, $numberofthumbs, $i, $iincreaser,
5200
  if ( is_file($thumbnailfilename[$i]) )
5201
  kgvid_schedule_cleanup_generated_files('thumbs');
5202
 
5203
- $thumbnaildisplaycode = '<div class="kgvid_thumbnail_select" name="attachments['.$postID.'][thumb'.$i.']" id="attachments-'.$postID.'-thumb'.$i.'"><label for="kgflashmedia-'.$postID.'-thumbradio'.$i.'"><img src="'.$thumbnailurl.'?'.rand().'" width="200" height="'.$thumbnailheight.'" class="kgvid_thumbnail"></label><br /><input type="radio" name="attachments['.$postID.'][thumbradio'.$i.']" id="kgflashmedia-'.$postID.'-thumbradio'.$i.'" value="'.str_replace('/thumb_tmp/', '/', $thumbnailurl).'" onchange="kgvid_select_thumbnail(this.value, \''.$postID.'\', '.$movieoffset.');"></div>';
5204
 
5205
  $i++;
5206
 
@@ -5244,10 +5907,13 @@ function kgvid_enqueue_videos($postID, $movieurl, $encode_checked, $parent_id) {
5244
  $movie_height = $movie_info['height'];
5245
 
5246
  if ( get_post_type($postID) == "attachment" ) { //if the video is in the database
5247
- update_post_meta($postID, '_kgflashmediaplayer-actualwidth', $movie_width);
5248
- update_post_meta($postID, '_kgflashmediaplayer-actualheight', $movie_height);
5249
- update_post_meta($postID, '_kgflashmediaplayer-duration', $movie_info['duration']);
5250
- update_post_meta($postID, '_kgflashmediaplayer-rotate', $movie_info['rotate']);
 
 
 
5251
  }
5252
 
5253
  $encodevideo_info = kgvid_encodevideo_info($movieurl, $postID);
@@ -5265,17 +5931,19 @@ function kgvid_enqueue_videos($postID, $movieurl, $encode_checked, $parent_id) {
5265
  $encode_formats[$format]['status'] = "queued";
5266
  $encode_formats[$format]['name'] = $format_stats['name'];
5267
  $encode_list[$format] = $format_stats['name'];
5268
- update_post_meta($postID, '_kgflashmediaplayer-encode'.$format, 'on');
5269
  }
5270
  } // if video doesn't already exist
5271
  else { $encode_formats[$format]['status'] = "encoded"; }
5272
  } // if user wants to encode format
5273
  else {
5274
  $encode_formats[$format]['status'] = "notchecked";
5275
- update_post_meta($postID, '_kgflashmediaplayer-encode'.$format, 'notchecked');
5276
  }
5277
  }//end loop through video formats
5278
 
 
 
5279
  if ( !empty($encode_list) ) { //if there's anything to encode
5280
 
5281
  $video_encode_queue = kgvid_get_encode_queue();
@@ -5342,11 +6010,49 @@ function kgvid_enqueue_videos($postID, $movieurl, $encode_checked, $parent_id) {
5342
  }
5343
  }
5344
  } //if any video formats don't already exist, add to queue
5345
- else { $embed_display = "<strong>".__('Nothing to encode.', 'video-embed-thumbnail-generator')."</strong>"; }
 
 
 
 
 
 
 
 
 
5346
 
5347
  $replaceoptions = "";
5348
  $originalselect = "";
5349
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5350
  $arr = array ( "embed_display"=>$embed_display );
5351
  return $arr;
5352
  }
@@ -5355,6 +6061,7 @@ function kgvid_enqueue_videos($postID, $movieurl, $encode_checked, $parent_id) {
5355
  $arr = array ( "thumbnaildisplaycode"=>$thumbnaildisplaycode, "embed_display"=>$thumbnaildisplaycode, "lastthumbnumber"=>"break" );
5356
  return $arr;
5357
  } //can't open movie
 
5358
  }
5359
 
5360
  function kgivd_save_singleurl_poster($parent_id, $poster, $movieurl, $set_featured) { //called by the "Embed Video from URL" tab when submitting
@@ -5499,7 +6206,10 @@ function kgvid_encode_videos() {
5499
  $encode_string = kgvid_generate_encode_string($moviefilepath, $encodevideo_info[$format]['filepath'], $movie_info, $queued_format, $encode_dimensions['width'], $encode_dimensions['height'], $movie_info['rotate']);
5500
 
5501
  }//if file doesn't already exist
5502
- else { $embed_display = sprintf( __('%s already encoded', 'video-embed-thumbnail-generator'), $format_stats['name'] ); }
 
 
 
5503
  break; //don't bother looping through the rest if we already found the format
5504
  }//if the x264 library and an aac library is enabled
5505
  else {
@@ -5645,6 +6355,7 @@ add_action('wp_ajax_kgvid_test_ffmpeg', 'kgvid_test_ffmpeg');
5645
  function kgvid_encode_progress($video_key, $format, $page) {
5646
 
5647
  $video_encode_queue = kgvid_get_encode_queue();
 
5648
 
5649
  if ( is_array($video_encode_queue) && array_key_exists($video_key, $video_encode_queue) ) {
5650
 
@@ -5730,7 +6441,7 @@ function kgvid_encode_progress($video_key, $format, $page) {
5730
  else { $fps_match = "10"; }
5731
  }
5732
  else { $fps_match = "10"; }
5733
- $time_to_wait = strval(max(round(30000/intval($fps_match)), 1000)); //wait at least 1 second
5734
  if ( intval($time_to_wait) > 10000 ) { //wait no more than 10 seconds
5735
  $time_to_wait = 10000;
5736
  }
@@ -5744,11 +6455,12 @@ function kgvid_encode_progress($video_key, $format, $page) {
5744
  $embed_display .= '<a href="javascript:void(0);" class="kgvid_cancel_button" id="attachments-'.$video_entry["attachmentID"].'-kgflashmediaplayer-cancelencode" onclick="kgvid_cancel_encode('.$pid.', \''.$video_entry["attachmentID"].'\', \''.$video_key.'\', \''.$format.'\');">'.__('Cancel', 'video-embed-thumbnail-generator').'</a>';
5745
  }
5746
 
5747
- $embed_display .= '<div class="kgvid_encoding_small_text"><small>'.__('Elapsed:', 'video-embed-thumbnail-generator').' '.date('H:i:s',$time_elapsed).'. '.__('Remaining:', 'video-embed-thumbnail-generator').' '.$time_remaining.'. '._x('FPS:', 'Frames per second', 'video-embed-thumbnail-generator').' '.$fps_match.'</small></div><script type="text/javascript">percent_timeout = setTimeout(function(){'.$script_function.'}, '.$time_to_wait.');</script>';
5748
  }
5749
  elseif ( time() - $started < 10 || ( file_exists($filepath) && time() - filemtime($filepath) < 10 ) ) { //not enough time has passed, so check again later
5750
  $args = array($video_key, $format, $page);
5751
- $embed_display = '<strong>'.__('Encoding', 'video-embed-thumbnail-generator').'</strong> <script type="text/javascript">percent_timeout = setTimeout(function(){'.$script_function.'}, 1000);</script>';
 
5752
  wp_schedule_single_event(time()+60, 'kgvid_cron_queue_check', $args);
5753
  }
5754
  elseif (
@@ -5823,7 +6535,7 @@ function kgvid_encode_progress($video_key, $format, $page) {
5823
 
5824
  //finish inserting attachment
5825
 
5826
- $embed_display = '<strong>'.__('Encoding Complete', 'video-embed-thumbnail-generator').'</strong> <script type="text/javascript">percent_timeout = setTimeout(function(){'.$script_function.'}, 1000);</script>';
5827
 
5828
  $next_video = kgvid_encode_videos(); //start the next queued video
5829
  if ( !empty($next_video['format']) ) { //if there's something to encode, schedule cron
@@ -5832,34 +6544,17 @@ function kgvid_encode_progress($video_key, $format, $page) {
5832
  }
5833
 
5834
  if ( (empty($next_video['format']) || $next_video['video_key'] != $video_key) && $video_encode_queue[$video_key]['encode_formats']['fullres']['status'] == "Encoding Complete" ) { //if there's nothing left to encode in this video and we've encoded the fullres
5835
-
5836
  $new_movie_url = kgvid_replace_video( $video_key, 'fullres' );
5837
  $script_function = 'kgvid_redraw_encode_checkboxes("'.$new_movie_url.'", "'.$video_entry['attachmentID'].'", "'.$page.'")';
5838
 
5839
- if ( $video_encode_queue[$video_key]['movie_info']['rotate'] != "" ) { //if the video needed rotating
5840
- $video_encode_queue[$video_key]['movie_info']['rotate'] = ""; //clear rotation because we've just fixed that problem
5841
- delete_post_meta($video_entry['attachmentID'], '_kgflashmediaplayer-rotate');
5842
-
5843
- $setwidth = $video_entry['movie_info']['width'];
5844
- $setheight = $video_entry['movie_info']['height'];
5845
- if ( intval($setwidth) > intval($setheight) ) { //swap the width and height meta if it hasn't already been done
5846
- update_post_meta($video_entry['attachmentID'], '_kgflashmediaplayer-actualwidth', $video_entry['movie_info']['height']);
5847
- update_post_meta($video_entry['attachmentID'], '_kgflashmediaplayer-width', $setheight);
5848
- $video_encode_queue[$video_key]['movie_info']['width'] = $video_entry['movie_info']['height'];
5849
- update_post_meta($video_entry['attachmentID'], '_kgflashmediaplayer-actualheight', $video_entry['movie_info']['width']);
5850
- update_post_meta($video_entry['attachmentID'], '_kgflashmediaplayer-height', $setwidth);
5851
- $video_encode_queue[$video_key]['movie_info']['height'] = $video_entry['movie_info']['width'];
5852
- }
5853
- kgvid_save_encode_queue($video_encode_queue);
5854
- }
5855
 
5856
- $embed_display = '<strong>'.__('Encoding Complete', 'video-embed-thumbnail-generator').'</strong> <script type="text/javascript">percent_timeout = setTimeout(function(){'.$script_function.'}, 1000);</script>';
5857
 
5858
- if ( $blog_id ) { restore_current_blog(); }
5859
 
5860
- }//encoding complete
5861
 
5862
- }
5863
  else { //there was an unexpected output and the encoded file hasn't been modified in more than 10 seconds
5864
 
5865
  if ( strpos($lastline, "signal 15") !== false ) { //if the encoding was intentionally canceled
@@ -5869,7 +6564,6 @@ function kgvid_encode_progress($video_key, $format, $page) {
5869
 
5870
  }
5871
 
5872
- $arr = array ( "embed_display"=>$embed_display );
5873
  } //if logfile
5874
  else {
5875
 
@@ -5884,16 +6578,18 @@ function kgvid_encode_progress($video_key, $format, $page) {
5884
  $embed_display = '<strong>'.__('Error:', 'video-embed-thumbnail-generator').' </strong><span class="kgvid_warning">'.stripslashes($lastline).'.</span>';
5885
  $next_video = kgvid_encode_videos(); //start the next queued video
5886
  if ( !empty($next_video['format']) ) {
5887
- $embed_display .= '<script type="text/javascript">percent_timeout = setTimeout(function(){'.$script_function.'}, 1000);</script>';
5888
  $args = array($next_video['video_key'], $next_video['format'], $page);
5889
  wp_schedule_single_event(time()+60, 'kgvid_cron_queue_check', $args);
5890
  }
5891
  }
5892
 
5893
  }//if not completed
5894
- else { $arr = array ( "embed_display"=>"<strong>".ucwords($video_encode_queue[$video_key]['encode_formats'][$format]['status'])."</strong>" ); }
5895
  } //if there's a queue and the video is encoding
5896
- else { $arr = array ( "embed_display"=>"<strong>".__('Waiting...', 'video-embed-thumbnail-generator')."</strong><script type='text/javascript'>percent_timeout = setTimeout(function(){'.$script_function.'}, 2000);</script>" ); }
 
 
 
5897
  return $arr;
5898
 
5899
  }//end if queue entry exists
@@ -5914,72 +6610,121 @@ function kgvid_ajax_encode_progress() {
5914
  }
5915
  add_action('wp_ajax_kgvid_encode_progress', 'kgvid_ajax_encode_progress');
5916
 
5917
- function kgvid_replace_video ( $video_key, $format ) {
5918
 
5919
  $video_encode_queue = kgvid_get_encode_queue();
5920
  $video_formats = kgvid_video_formats();
5921
  $encoded_filename = $video_encode_queue[$video_key]['encode_formats'][$format]['filepath'];
5922
  $video_id = $video_encode_queue[$video_key]['attachmentID'];
 
5923
 
5924
- $original_filename = get_attached_file($video_id);
5925
- $path_parts = pathinfo($original_filename);
5926
- if ( $path_parts['extension'] != $video_formats[$format]['extension'] ) {
5927
- $new_filename = str_replace("-fullres", "", $encoded_filename);
5928
- $sanitized_url = kgvid_sanitize_url($video_encode_queue[$video_key]['movieurl']);
5929
- $new_url = $sanitized_url['noextension'].".".$video_formats[$format]['extension'];
5930
- $video_encode_queue[$video_key]['movieurl'] = $new_url;
5931
- global $wpdb;
5932
- $query = $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE `post_content` LIKE '%%%s%%'", $sanitized_url['basename'].".".$path_parts['extension'] ); //find posts that use the old filename
5933
- $results = $wpdb->get_results($query);
5934
- if ( $results ) {
5935
- foreach ( $results as $result ) {
5936
- $post = get_post($result->ID);
5937
- $post->post_content = str_replace($sanitized_url['noextension'].".".$path_parts['extension'], $new_url, $post->post_content);
5938
- wp_update_post($post);
5939
  }
5940
- }
5941
- }
5942
- else {
5943
- $new_filename = $original_filename;
5944
- $new_url = $video_encode_queue[$video_key]['movieurl'];
5945
  }
5946
 
5947
- if ( file_exists($encoded_filename) ) {
5948
- rename($encoded_filename, $new_filename);
5949
- if ( file_exists($original_filename) && $original_filename != $new_filename ) { unlink($original_filename); }
5950
  }
5951
- $video_encode_queue[$video_key]['encode_formats'][$format]['url'] = $new_url;
5952
- kgvid_save_encode_queue($video_encode_queue);
5953
 
5954
- // you must first include the image.php file
5955
- // for the function wp_generate_attachment_metadata() to work and media.php for wp_read_video_metadata() in WP 3.6+
5956
- require_once(ABSPATH . 'wp-admin/includes/image.php');
5957
- global $wp_version;
5958
- if ( $wp_version >= 3.6 ) { require_once(ABSPATH . 'wp-admin/includes/media.php'); }
5959
- $attach_data = wp_generate_attachment_metadata( $video_id, $new_filename );
5960
- wp_update_attachment_metadata( $video_id, $attach_data );
5961
- update_attached_file( $video_id, $new_filename );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5962
 
5963
- $new_mime = wp_check_filetype( $new_filename );
5964
- $post = get_post($video_id);
5965
- $new_guid = str_replace( $path_parts['extension'], $new_mime['ext'], $post->guid );
 
 
5966
 
5967
- if ( $new_guid != $post->guid ) {
5968
- global $wpdb;
5969
- $guid_change = $wpdb->update( $wpdb->posts, //can't use wp_update_post because it won't change GUID
5970
- array(
5971
- 'guid' => $new_guid,
5972
- 'post_mime_type' => $new_mime['type']
5973
- ),
5974
- array( 'ID' => $video_id ),
5975
- array( '%s', '%s' ),
5976
- array( '%d' )
5977
- );
5978
 
5979
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5980
 
5981
- return $new_url;
5982
  }
 
5983
 
5984
  function kgvid_clear_completed_queue($type, $scope = 'site') {
5985
 
@@ -5993,14 +6738,18 @@ function kgvid_clear_completed_queue($type, $scope = 'site') {
5993
  foreach ( $video_encode_queue as $video_key => $queue_entry ) {
5994
  if ( !empty($queue_entry['encode_formats']) ) {
5995
  foreach ( $queue_entry['encode_formats'] as $format => $value ) {
5996
- if ( $value['status'] == "queued" || $value['status'] == "encoding" ) { //if it's not completed yet
5997
  $keep[$video_key] = true;
5998
  break;
5999
  }
 
 
 
 
 
6000
  if ( $type == "scheduled" && $value['status'] == "Encoding Complete" ) {
6001
  if ( time() - intval($value['ended']) < 604800 ) { //if it finished less than a week ago
6002
  $keep[$video_key] = true;
6003
- break;
6004
  }
6005
  }
6006
  if ( !is_network_admin() && $scope == 'site' && array_key_exists('blog_id', $queue_entry) && $queue_entry['blog_id'] != get_current_blog_id() ) { //only clear entries from current blog
@@ -6014,7 +6763,7 @@ function kgvid_clear_completed_queue($type, $scope = 'site') {
6014
  foreach ( $keep as $video_key => $value ) {
6015
  $cleared_video_queue[] = $video_encode_queue[$video_key];
6016
  }
6017
- sort($cleared_video_queue);
6018
 
6019
  kgvid_save_encode_queue($cleared_video_queue);
6020
 
@@ -6027,7 +6776,8 @@ function kgvid_ajax_clear_completed_queue() {
6027
  if ( current_user_can('encode_videos') ) {
6028
  check_ajax_referer( 'video-embed-thumbnail-generator-nonce', 'security' );
6029
  $scope = $_POST['scope'];
6030
- kgvid_clear_completed_queue('manual', $scope);
 
6031
  $table = kgvid_generate_queue_table($scope);
6032
  echo ($table);
6033
  die();
@@ -6045,7 +6795,7 @@ function kgvid_ajax_clear_queue_entry() {
6045
  $video_encode_queue = kgvid_get_encode_queue();
6046
  if ( is_array($video_encode_queue) && array_key_exists($video_key, $video_encode_queue) ) {
6047
  unset($video_encode_queue[$video_key]);
6048
- sort($video_encode_queue);
6049
  }
6050
  kgvid_save_encode_queue($video_encode_queue);
6051
 
@@ -6260,7 +7010,7 @@ function kgvid_get_set_featured() {
6260
  );
6261
  $videoposts = get_posts( $args );
6262
 
6263
- if ($videoposts) {
6264
  foreach ($videoposts as $post) {
6265
  if ( $post->post_type == "attachment" ) { $post_id = $post->post_parent; }
6266
  else { $post_id = $post->ID; }
@@ -6313,8 +7063,8 @@ function kgvid_get_switch_parents() {
6313
  );
6314
  $attachments = get_posts( $args );
6315
 
6316
- if ($attachments) {
6317
- foreach ($attachments as $post) {
6318
  if ( !empty($post->post_parent) ) { //if the video is attached to a post
6319
  $args = array(
6320
  'orderby' => 'post_date',
@@ -6325,7 +7075,7 @@ function kgvid_get_switch_parents() {
6325
  'numberposts' => -1
6326
  );
6327
  $thumbnails = get_posts( $args );
6328
- if ($thumbnails) {
6329
  foreach ( $thumbnails as $thumbnail ) {
6330
  $children[$thumbnail->ID] = array( 'post_parent' => $post->post_parent, 'video_id' => $post->ID );
6331
  }
@@ -6369,20 +7119,21 @@ function kgvid_switch_parents() {
6369
  if ( is_array($queue) && array_key_exists('switching_parents', $queue) && $queue['switching_parents'] ) {
6370
  $new_parent = 'post';
6371
  if (isset($_POST['parent'])) { $new_parent = $_POST['parent']; }
 
 
 
 
 
 
6372
 
6373
- foreach ( $queue['switching_parents'] as $thumbnail_id => $thumbnail ) {
6374
- if ( $new_parent == 'post' ) {
6375
- wp_update_post( array( 'ID' => $thumbnail_id, 'post_parent' => $thumbnail['post_parent'] ) );
6376
- update_post_meta($thumbnail_id, '_kgflashmediaplayer-video-id', $thumbnail['video_id']);
6377
- }
6378
-
6379
- if ( $new_parent == 'video' ) {
6380
- wp_update_post( array( 'ID' => $thumbnail_id, 'post_parent' => $thumbnail['video_id'] ) );
6381
  }
6382
- unset($queue['switching_parents'][$thumbnail_id]);
6383
- update_option('kgvid_video_embed_cms_switch', $queue);
6384
  }
6385
- unset($queue['switching_parents']);
6386
  if ( empty($queue) ) { delete_option('kgvid_video_embed_cms_switch'); }
6387
  else { update_option('kgvid_video_embed_cms_switch', $queue); }
6388
  }
@@ -6460,7 +7211,7 @@ function kgvid_generating_old() {
6460
  check_ajax_referer( 'video-embed-thumbnail-generator-nonce', 'security' );
6461
  if (isset($_POST['type'])) { $type = $_POST['type']; }
6462
  $queue = get_option('kgvid_video_embed_cms_switch');
6463
- if ( is_array($queue) && array_key_exists('generating_old_'.$type, $queue) && $queue['generating_old_'.$type] ) {
6464
 
6465
  foreach ( $queue['generating_old_'.$type] as $video_id ) {
6466
 
@@ -6493,82 +7244,6 @@ function kgvid_update_cms_progress() {
6493
  }
6494
  add_action('wp_ajax_kgvid_update_cms_progress', 'kgvid_update_cms_progress');
6495
 
6496
- /*function kgvid_singleurl_meta_box($postType) {
6497
-
6498
- $matches = kgvid_check_for_shortcode_in_content();
6499
-
6500
- if ( $matches[5] ) {
6501
- add_meta_box(
6502
- 'kgvid_singleurl_meta',
6503
- 'Video Embed & Thumbnail Generator',
6504
- 'kgvid_singleurl_inner_custom_box',
6505
- $postType
6506
- );
6507
- }
6508
- }
6509
- add_action( 'add_meta_boxes', 'kgvid_singleurl_meta_box' );
6510
-
6511
- function kgvid_singleurl_inner_custom_box($post) {
6512
-
6513
- global $wpdb;
6514
-
6515
- $video_formats = kgvid_video_formats();
6516
- $matches = kgvid_check_for_shortcode_in_content();
6517
- $urls = array_unique($matches[5]);
6518
- if ( $urls ) {
6519
- $nonce = wp_create_nonce('video-embed-thumbnail-generator-nonce');
6520
- echo '<h4>Alternate formats of embedded videos</h4>';
6521
- foreach ( $urls as $movieurl ) {
6522
- $query = $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE guid='%s'", $movieurl ); //GUID seems to be the only way to get a video URL
6523
- $video_id = $wpdb->get_var($query);
6524
-
6525
- echo '<div class="kgvid_post_meta_boxes">';
6526
- if ( empty($video_id) ) {
6527
- $sanitized_url = kgvid_sanitize_url($movieurl);
6528
- echo '<input type="hidden" name="attachments['.$sanitized_url['singleurl_id'].'][kgflashmediaplayer-security]" value="'.$nonce.'">';
6529
- echo '<strong>'.$sanitized_url['basename'].'</strong>';
6530
- echo kgvid_generate_encode_checkboxes($movieurl, $sanitized_url['singleurl_id'], 'queue');
6531
- echo '<input type="button" id="attachments-'.$sanitized_url['singleurl_id'].'-kgflashmediaplayer-update" name="attachments['.$sanitized_url['singleurl_id'].'][kgflashmediaplayer-update]" class="button-secondary" value="Re-scan External Server" onclick="kgvid_rescan_external_server(\''.$movieurl.'\', \''.$sanitized_url['singleurl_id'].'\');" /><span id="attachments-'.$sanitized_url['singleurl_id'].'-kgflashmediaplayer-rescanplaceholder"></span>';
6532
- }
6533
- else {
6534
- echo '<input type="hidden" name="attachments['.$video_id.'][kgflashmediaplayer-security]" value="'.$nonce.'">';
6535
- echo '<strong>'.get_the_title($video_id).'</strong>';
6536
- echo kgvid_generate_encode_checkboxes($movieurl, $video_id, 'queue');
6537
- }
6538
- echo '</div>';
6539
- }//loop through KGVID URLs
6540
- }//if there are any KGVID URLs
6541
- }
6542
-
6543
- function kgvid_ajax_rescan_external_server() {
6544
-
6545
- check_ajax_referer( 'video-embed-thumbnail-generator-nonce', 'security' );
6546
- if (isset($_POST['movieurl'])) { $movieurl = $_POST['movieurl']; }
6547
- if (isset($_POST['postID'])) { $post_id = $_POST['postID']; }
6548
- $video_formats = kgvid_video_formats();
6549
- $matching_posts = array();
6550
- foreach ( $video_formats as $format => $format_stats ) {
6551
- $args = array(
6552
- 'numberposts' => '-1',
6553
- 'post_type' => null,
6554
- 'meta_key' => '_kgflashmediaplayer-'.$post_id.'-'.$format
6555
- );
6556
- $posts = get_posts($args);
6557
- if ( $posts ) {
6558
- foreach ( $posts as $post ) {
6559
- $matching_posts[$post->ID] = $post;
6560
- delete_post_meta($post->ID, '_kgflashmediaplayer-'.$post_id.'-'.$format);
6561
- }
6562
- }
6563
- }
6564
- if ( $matching_posts ) {
6565
- foreach ( $matching_posts as $post ) { kgvid_encodevideo_info($movieurl, $post->ID); }
6566
- }
6567
- die;
6568
- }
6569
- add_action('wp_ajax_kgvid_rescan_external_server', 'kgvid_ajax_rescan_external_server');
6570
- */
6571
-
6572
  function kgvid_count_play() {
6573
 
6574
  check_ajax_referer( 'kgvid_frontend_nonce', 'security' );
@@ -6577,12 +7252,15 @@ function kgvid_count_play() {
6577
  $event = $_POST['video_event'];
6578
  if ( $event == "play" ) { $event = "starts"; }
6579
  if ( $event == "end" ) { $event = "completeviews"; }
6580
- $plays = get_post_meta($post_id, '_kgflashmediaplayer-'.$event, true);
 
6581
  if ( !empty($plays) ) { $plays = intval($plays)+1; }
6582
  else { $plays = 1; }
6583
- update_post_meta($post_id, '_kgflashmediaplayer-'.$event, $plays);
6584
- echo $plays;
 
6585
  die(); // stop executing script
 
6586
  }
6587
  add_action( 'wp_ajax_kgvid_count_play', 'kgvid_count_play' ); // ajax for logged in users
6588
  add_action( 'wp_ajax_nopriv_kgvid_count_play', 'kgvid_count_play' ); // ajax for not logged in users
@@ -6612,6 +7290,8 @@ function kgvid_add_contextual_help_tab() {
6612
  <li><code>loop="true/false"</code></li>
6613
  <li><code>autoplay="true/false"</code></li>
6614
  <li><code>watermark="http://www.example.com/image.png"</code> '.sprintf( __('or %s to disable.', 'video-embed-thumbnail-generator'), $false_code ).'</li>
 
 
6615
  <li><code>title="Video Title"</code> '.sprintf( __('or %s to disable.', 'video-embed-thumbnail-generator'), $false_code ).'</li>
6616
  <li><code>embedcode="html code"</code> '.sprintf( __('changes text displayed in the embed code overlay in order to provide a custom method for embedding a video or %s to disable.', 'video-embed-thumbnail-generator'), $false_code ).'</li>
6617
  <li><code>view_count="true/false"</code> '.__('turns the view count on or off.', 'video-embed-thumbnail-generator').'</li>
@@ -6620,13 +7300,14 @@ function kgvid_add_contextual_help_tab() {
6620
  <li><code>downloadlink="true/false"</code> '.__('generates a link below the video to make it easier for users to save the video file to their computers.', 'video-embed-thumbnail-generator').'</li>
6621
  <li><code>right_click="true/false"</code> '.__('allow or disable right-clicking on the video player.', 'video-embed-thumbnail-generator').'</li>
6622
  <li><code>resize="true/false"</code> '.__('allow or disable responsive resizing.', 'video-embed-thumbnail-generator').'</li>
6623
- <li><code>auto_res="true/false"</code> '.__('let the plugin select the best resolution for the size of the player.', 'video-embed-thumbnail-generator').'</li></ul>
6624
 
6625
  <p><strong>'.__('These options will add a subtitle/caption track.', 'video-embed-thumbnail-generator').'</strong></p>
6626
  <ul><li><code>track_src="http://www.example.com/subtitles.vtt_.txt"</code> '.__('URL of the WebVTT file.', 'video-embed-thumbnail-generator').'</li>
6627
  <li><code>track_kind=subtitles/captions/chapters</code></li>
6628
  <li><code>track_srclang=xx</code> '.__('the track\'s two-character language code (en, fr, es, etc)', 'video-embed-thumbnail-generator').'</li>
6629
- <li><code>track_label="Track Label"</code> '.__('text that will be shown to the user when selecting the track.', 'video-embed-thumbnail-generator').'</li></ul>
 
6630
 
6631
  <p><strong>'.__('These options will only affect Video.js playback', 'video-embed-thumbnail-generator').'</strong></p>
6632
  <ul><li><code>skin="example-css-class"</code> '.sprintf( __('Completely change the look of the video player. %sInstructions here.', 'video-embed-thumbnail-generator'), '<a href="https://github.com/zencoder/video-js/blob/master/docs/skins.md">' ).'</a></li></ul>
@@ -6648,7 +7329,9 @@ function kgvid_add_contextual_help_tab() {
6648
  <li><code>gallery_orderby="menu_order/title/post_date/rand/ID"</code> '.__('criteria for sorting the gallery', 'video-embed-thumbnail-generator').'</li>
6649
  <li><code>gallery_order="ASC/DESC"</code> '.__('sort order', 'video-embed-thumbnail-generator').'</li>
6650
  <li><code>gallery_id="241"</code> '.__('post ID to display a gallery made up of videos associated with a different post.', 'video-embed-thumbnail-generator').'</li>
6651
- <li><code>gallery_end="close/next"</code> '.__('either close the pop-up or start playing the next video when the current video finishes playing.', 'video-embed-thumbnail-generator').'</li></ul>'
 
 
6652
  ) );
6653
 
6654
  }
@@ -6663,9 +7346,11 @@ function kgvid_clear_cron_and_roles() {
6663
  wp_clear_scheduled_hook('kgvid_cleanup_generated_thumbnails');
6664
  kgvid_cleanup_generated_thumbnails_handler(); //run this now because cron won't do it later
6665
  global $wp_roles;
6666
- foreach ( $options['capabilities'] as $capability => $roles ) {
6667
- foreach ( $wp_roles->roles as $role => $role_info ) {
6668
- $wp_roles->remove_cap( $role, $capability );
 
 
6669
  }
6670
  }
6671
  }
3
  Plugin Name: Video Embed & Thumbnail Generator
4
  Plugin URI: http://www.kylegilman.net/2011/01/18/video-embed-thumbnail-generator-wordpress-plugin/
5
  Description: Generates thumbnails, HTML5-compliant videos, and embed codes for locally hosted videos. Requires FFMPEG or LIBAV for encoding.
6
+ Version: 4.5
7
  Author: Kyle Gilman
8
  Author URI: http://www.kylegilman.net/
9
  Text Domain: video-embed-thumbnail-generator
49
 
50
  */
51
 
52
+ if ( ! defined( 'WPINC' ) )
53
  die( "Can't load this file directly" );
54
 
55
  function kgvid_default_options_fn() {
58
  $edit_others_capable = kgvid_check_if_capable('edit_others_posts');
59
 
60
  $options = array(
61
+ "version" => 4.5,
62
  "embed_method" => "Video.js",
63
  "jw_player_id" => "",
64
  "template" => false,
69
  "encode_720" => "on",
70
  "encode_mobile" => "on",
71
  "encode_webm" => false,
72
+ "encode_vp9" => false,
73
  "encode_ogg" => false,
74
  "encode_custom" => false,
75
  "custom_format" => array(
82
  "ffmpeg_exists" =>"notchecked",
83
  "video_bitrate_flag" => false,
84
  "ffmpeg_vpre" => false,
85
+ "ffmpeg_old_rotation" => false,
86
  "nostdin" => false,
87
  "moov" => "none",
88
  "generate_thumbs" => 4,
92
  "titlecode" => "<strong>",
93
  "poster" => "",
94
  "watermark" => "",
95
+ "watermark_link_to" => "home",
96
+ "watermark_url" => "",
97
  "overlay_title" => "on",
98
  "overlay_embedcode" => false,
99
  "downloadlink" => false,
100
+ "click_download" => "on",
101
  "view_count" => false,
102
  "embeddable" => "on",
103
  "inline" => false,
107
  "minimum_width" => false,
108
  "fullwidth" => false,
109
  "gallery_width" => "960",
 
110
  "gallery_thumb" => "250",
111
  "gallery_end" => "",
112
+ "gallery_pagination" => false,
113
+ "gallery_per_page" => false,
114
+ "gallery_title" => "on",
115
  "controlbar_style" => "docked",
116
  "autoplay" => false,
117
  "loop" => false,
146
  "auto_thumb_position" => 50,
147
  "right_click" => "on",
148
  "resize" => "on",
149
+ "auto_res" => "automatic",
150
  "capabilities" => array(
151
  "make_video_thumbnails" => $upload_capable,
152
  "encode_videos" => $upload_capable,
153
  "edit_others_video_encodes" => $edit_others_capable
154
  ),
155
  "open_graph" => "on",
156
+ "oembed_provider" => "on",
157
+ "oembed_security" => false,
158
  "htaccess_login" => "",
159
  "htaccess_password" => "",
160
  "sample_format" => "mobile",
208
 
209
  }
210
 
211
+ function kgvid_get_attachment_meta($post_id) {
212
+
213
+ $options = kgvid_get_options();
214
+
215
+ $kgvid_postmeta = get_post_meta($post_id, "_kgvid-meta", true);
216
+
217
+ $meta_key_array = array(
218
+ 'embed' => 'Single Video',
219
+ 'width' => '',
220
+ 'height' => '',
221
+ 'actualwidth' => '',
222
+ 'actualheight' => '',
223
+ 'downloadlink' => $options['downloadlink'],
224
+ 'track' => '',
225
+ 'starts' => '0',
226
+ 'completeviews' => '0',
227
+ 'pickedformat' => '',
228
+ 'encodefullres' => '',
229
+ 'encode1080' => '',
230
+ 'encode720' => '',
231
+ 'encodemobile' => '',
232
+ 'encodewebm' => '',
233
+ 'encodeogg' => '',
234
+ 'encodecustom_h264' => '',
235
+ 'encodecustom_webm' => '',
236
+ 'encodecustom_ogg' => '',
237
+ 'encodecustom' => '',
238
+ 'rotate' => '',
239
+ 'autothumb-error' => '',
240
+ 'numberofthumbs' => $options['generate_thumbs'],
241
+ 'randomize' => '',
242
+ 'forcefirst' => '',
243
+ 'featured' => $options['featured'],
244
+ 'thumbtime' => '',
245
+ 'lockaspect' => 'on',
246
+ 'showtitle' => '',
247
+ 'gallery_thumb_width' => $options['gallery_thumb'],
248
+ 'gallery_exclude' => '',
249
+ 'gallery_include' => '',
250
+ 'gallery_orderby' => '',
251
+ 'gallery_order' => '',
252
+ 'gallery_id' => '',
253
+ 'duration' => '',
254
+ 'aspect' => ''
255
+ );
256
+
257
+ if ( $kgvid_postmeta == '' ) {
258
+
259
+ $kgvid_postmeta = array();
260
+
261
+ $embed = get_post_meta($post_id, "_kgflashmediaplayer-embed", true); //this was always saved if you modified the attachment
262
+
263
+ if ( !empty($embed) ) { //old meta values exist
264
+
265
+ foreach ( $meta_key_array as $key => $value ) { //read old meta keys and delete them
266
+ $kgvid_postmeta[$key] = get_post_meta($post_id, "_kgflashmediaplayer-".$key, true);
267
+ if ( $kgvid_postmeta[$key] == 'checked' ) { $kgvid_postmeta[$key] = 'on'; }
268
+ delete_post_meta($post_id, "_kgflashmediaplayer-".$key);
269
+ }
270
+
271
+ array_filter($kgvid_postmeta, 'strlen'); //remove empty elements
272
+ kgvid_save_attachment_meta($post_id, $kgvid_postmeta);
273
+
274
+ }
275
+
276
+ }
277
+
278
+ $kgvid_postmeta = array_merge($meta_key_array, $kgvid_postmeta); //make sure all keys are set
279
+
280
+ return $kgvid_postmeta;
281
+
282
+ }
283
+
284
+ function kgvid_save_attachment_meta($post_id, $kgvid_postmeta) {
285
+
286
+ $options = kgvid_get_options();
287
+
288
+ if ( is_array($kgvid_postmeta) ) {
289
+
290
+ foreach ( $kgvid_postmeta as $key => $meta ) { //don't save if it's the same as the default values or empty
291
+
292
+ if ( (array_key_exists($key, $options) && $meta == $options[$key])
293
+ || (!is_array($kgvid_postmeta[$key]) && strlen($kgvid_postmeta[$key]) == 0)
294
+ ) { unset($kgvid_postmeta[$key]); }
295
+
296
+ }
297
+
298
+ update_post_meta($post_id, "_kgvid-meta", $kgvid_postmeta);
299
+
300
+ }
301
+
302
+ }
303
+
304
  function kgvid_get_encode_queue() {
305
 
306
  if ( defined( 'DOING_CRON' ) ) { //unlike AJAX, cron doesn't load plugin.php
386
  "extension" => "webm",
387
  "mime" => "video/webm",
388
  "suffix" => ".webm",
389
+ "vcodec" => "libvpx"
390
+ ),
391
+ "vp9" => array(
392
+ "name" => "WEBM VP9",
393
+ "label" => 'WEBM VP9',
394
+ "width" => INF,
395
+ "height" => INF,
396
+ "type" => "webm",
397
+ "extension" => "webm",
398
+ "mime" => "video/webm",
399
+ "suffix" => "-vp9.webm",
400
+ "vcodec" => "libvpx-vp9"
401
  ),
402
  "ogg" => array(
403
  "name" => "OGV",
601
  }
602
  add_filter( 'plugin_row_meta', 'kgvid_plugin_meta_links', 10, 2 );
603
 
604
+ // add plugin upgrade notification
605
+ function kgvid_showUpgradeNotification($currentPluginMetadata, $newPluginMetadata){
606
+ // check "upgrade_notice"
607
+ if (isset($newPluginMetadata->upgrade_notice) && strlen(trim($newPluginMetadata->upgrade_notice)) > 0){
608
+ echo '<p style="background-color: #d54e21; padding: 10px; color: #f9f9f9; margin-top: 10px"><strong>Upgrade Notice:</strong> ';
609
+ echo esc_html($newPluginMetadata->upgrade_notice), '</p>';
610
+ }
611
+ }
612
+ add_action('in_plugin_update_message-video-embed-thumbnail-generator/video-embed-thumbnail-generator.php', 'kgvid_showUpgradeNotification', 10, 2);
613
+
614
  function kgvid_check_if_capable($capability) {
615
  global $wp_roles;
616
  $capable = array();
617
+
618
+ if ( is_object($wp_roles) && property_exists($wp_roles, 'roles') ) {
619
+
620
+ foreach ( $wp_roles->roles as $role => $role_info ) {
621
+ if ( is_array($role_info['capabilities']) && array_key_exists($capability, $role_info['capabilities']) && $role_info['capabilities'][$capability] == 1 ) {
622
+ $capable[$role] = "on";
623
+ }
624
+ else { $capable[$role] = false; }
625
  }
626
+
627
  }
628
  return $capable;
629
  }
632
 
633
  global $wp_roles;
634
 
635
+ if ( is_object($wp_roles) && property_exists($wp_roles, 'roles') ) {
 
 
 
 
 
636
 
637
+ $default_options = kgvid_default_options_fn();
638
+
639
+ foreach ( $default_options['capabilities'] as $default_capability => $default_enabled ) {
640
+ if ( is_array($capabilities) && !array_key_exists($default_capability, $capabilities) ) {
641
+ $capabilities[$default_capability] = array();
642
  }
643
+ }
644
+
645
+ foreach ( $capabilities as $capability => $enabled_roles ) {
646
+ foreach ( $wp_roles->roles as $role => $role_info ) { //check all roles
647
+ if ( is_array($role_info['capabilities']) && !array_key_exists($capability, $role_info['capabilities']) && array_key_exists($role, $enabled_roles) && $enabled_roles[$role] == "on" ) {
648
+ $wp_roles->add_cap( $role, $capability );
649
+ }
650
+ if ( is_array($role_info['capabilities']) && array_key_exists($capability, $role_info['capabilities']) && !array_key_exists($role, $enabled_roles) ) {
651
+ $wp_roles->remove_cap( $role, $capability );
652
+ }
653
  }
654
  }
655
+
656
+ }//end if $wp_roles defined
657
 
658
  }
659
 
683
  $url = str_replace(' ', '', $url); //in case a url with spaces got through
684
  // Get the path or the original size image by slicing the widthxheight off the end and adding the extension back
685
  $search_url = preg_replace( '/-\d+x\d+(\.(?:png|jpg|gif))$/i', '.' . pathinfo($url, PATHINFO_EXTENSION), $url );
 
 
686
 
687
+ $post_id = (int)$wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_wp_attached_file' AND meta_value LIKE RIGHT('%s', CHAR_LENGTH(meta_value))", $search_url ) );
 
 
688
 
689
  if ( $post_id ) { return $post_id; }
690
  else { return false; }
788
 
789
  if ( $wp_version < 3.5 ) {
790
  $field_id['poster'] = 'attachments['. $post_id .'][kgflashmediaplayer-poster]';
791
+ $field_id['thumbtime'] = 'attachments['. $post_id .'][kgflashmediaplayer-thumbtime]';
792
  }
793
  else {
794
  $field_id['poster'] = 'attachments-'. $post_id .'-kgflashmediaplayer-poster';
795
+ $field_id['thumbtime'] = 'attachments-'. $post_id .'-kgflashmediaplayer-thumbtime';
796
  }
797
  return $field_id;
798
 
800
 
801
  function kgvid_sanitize_url($movieurl) {
802
  $movieurl = rawurldecode($movieurl);
803
+ $movieurl = strtok($movieurl,'?');
804
  $movie_extension = pathinfo(parse_url($movieurl, PHP_URL_PATH), PATHINFO_EXTENSION);
805
  $sanitized_url['noextension'] = preg_replace("/\\.[^.\\s]{3,4}$/", "", $movieurl);
806
  $sanitized_url['basename'] = sanitize_file_name(basename($movieurl,'.'.$movie_extension));;
895
  $options = kgvid_get_options();
896
  $moviefile = get_attached_file( $id );
897
  $video_meta = wp_get_attachment_metadata( $id );
898
+ $kgvid_postmeta = kgvid_get_attachment_meta($id);
899
 
900
+ if ( is_array($video_meta) && array_key_exists('width', $video_meta) ) { $kgvid_postmeta['actualwidth'] = $video_meta['width']; }
901
+ if ( empty($kgvid_postmeta['width']) ) { $kgvid_postmeta['width'] = $kgvid_postmeta['actualwidth']; }
 
 
902
 
903
+ if ( is_array($video_meta) && array_key_exists('height', $video_meta) ) { $kgvid_postmeta['actualheight'] = $video_meta['height']; }
904
+ if ( empty($kgvid_postmeta['height']) ) { $kgvid_postmeta['height'] = $kgvid_postmeta['actualheight']; }
 
 
905
 
906
+ if ( !empty($kgvid_postmeta['width']) && !empty($kgvid_postmeta['height']) ) { $aspect_ratio = $kgvid_postmeta['height']/$kgvid_postmeta['width']; }
907
  else { $aspect_ratio = $options['height']/$options['width']; }
908
 
909
  if ( $gallery ) {
910
+ if ( !empty($kgvid_postmeta['actualwidth']) ) { $kgvid_postmeta['width'] = $kgvid_postmeta['actualwidth']; }
911
+ if ( intval($kgvid_postmeta['width']) > intval($options['gallery_width']) ) { $kgvid_postmeta['width'] = $options['gallery_width']; }
912
  }
913
  else {
914
+ if ( intval($kgvid_postmeta['width']) > intval($options['width']) || $options['minimum_width'] == "on" ) { $kgvid_postmeta['width'] = $options['width']; }
915
  }
916
 
917
+ $kgvid_postmeta['height'] = round(intval($kgvid_postmeta['width'])*$aspect_ratio);
918
 
919
+ $dimensions = array( 'width' => strval($kgvid_postmeta['width']), 'height' => strval($kgvid_postmeta['height']), 'actualwidth' => strval($kgvid_postmeta['actualwidth']), 'actualheight' => strval($kgvid_postmeta['actualheight']) );
920
  return $dimensions;
921
 
922
  }
1004
 
1005
  //start with the new database info before checking other locations
1006
 
1007
+ if ( $children ) {
1008
  foreach ( $children as $child ) {
1009
  $mime_type = get_post_mime_type($child->ID);
1010
+ $wp_attached_file = get_attached_file($child->ID);
 
1011
  $video_meta = wp_get_attachment_metadata( $child->ID );
1012
  $meta_format = get_post_meta($child->ID, '_kgflashmediaplayer-format', true);
1013
  if ( $meta_format == $format || ( substr($wp_attached_file, -strlen($format_stats['suffix'])) == $format_stats['suffix'] && $meta_format == false ) ) {
1014
+ $encodevideo_info[$format]['url'] = wp_get_attachment_url($child->ID);
1015
+ $encodevideo_info[$format]['filepath'] = $wp_attached_file;
1016
  $encodevideo_info[$format]['id'] = $child->ID;
1017
  $encodevideo_info[$format]['exists'] = true;
1018
  $encodevideo_info[$format]['writable'] = true;
1141
  $movie_info['duration'] = ($movie_duration_hours * 60 * 60) + ($movie_duration_minutes * 60) + $movie_duration_seconds;
1142
 
1143
  preg_match('/rotate : (.*?)\n/', $output, $matches);
1144
+ if ( $options['ffmpeg_vpre'] == false && is_array($matches) && array_key_exists(1, $matches) == true ) { $rotate = $matches[1]; }
1145
+ else { $rotate = "0"; }
1146
 
1147
  switch ($rotate) {
1148
  case "90": $movie_info['rotate'] = ' -vf "transpose=1"'; break;
1149
  case "180": $movie_info['rotate'] = ' -vf "hflip,vflip"'; break;
1150
  case "270": $movie_info['rotate'] = ' -vf "transpose=2"'; break;
1151
+ case "-90": $movie_info['rotate'] = ' -vf "transpose=2"'; break;
1152
  default: $movie_info['rotate'] = ""; break;
1153
  }
1154
 
1157
  exec ( $command, $output );
1158
  $output = implode("\n", $output);
1159
  $configuration = array();
1160
+ $video_lib_array = array('libtheora', 'libvorbis', 'libvpx', 'libvpx-vp9', 'libx264');
1161
  $aac_array = kgvid_aac_encoders();
1162
  $lib_list = array_merge($video_lib_array, $aac_array);
1163
  foreach ($lib_list as $lib) {
1299
  $watermark_filter = "";
1300
  }
1301
 
1302
+ if ( $rotate === false || $options['ffmpeg_vpre'] == "on" ) { $rotate = ""; }
1303
+ switch ($rotate) { //if it's a sideways mobile video
1304
+ case ' -vf "transpose=1"': //90 degrees
1305
+ case ' -vf "transpose=2"': //270 degrees
1306
+ if ( $options['video_bitrate_flag'] == "on" || $options['ffmpeg_old_rotation'] == "on" ) {
1307
+ $rotate .= " -metadata rotate=0";
1308
+ }
1309
+ else {
1310
+ $rotate .= " -metadata:s:v:0 rotate=0";
1311
+ $width ^= $height ^= $width ^= $height; //swap height & width
1312
+ }
1313
+ break;
1314
+ case ' -vf "hflip,vflip"': //180 degrees
1315
+ if ( $options['video_bitrate_flag'] == "on" || $options['ffmpeg_old_rotation'] == "on" ) { $rotate .= " -metadata rotate=0"; }
1316
+ else { $rotate .= " -metadata:s:v:0 rotate=0"; }
1317
+ break;
1318
+ }
1319
+
1320
  if ( $video_formats[$format]['type'] == 'h264' ) {
1321
 
1322
  $aac_array = kgvid_aac_encoders();
1441
 
1442
  //Video.js styles
1443
  if ( $options['embed_method'] == "Video.js" || $options['embed_method'] == "Strobe Media Playback" ) {
1444
+ wp_enqueue_style( 'video-js', plugins_url("", __FILE__).'/video-js/video-js.css', '', '4.12.7' );
1445
+ if ( $options['js_skin'] == 'kg-video-js-skin' ){ wp_enqueue_style( 'video-js-kg-skin', plugins_url("", __FILE__).'/video-js/kg-video-js-skin.css', '', $options['version'] ); }
1446
  }
1447
 
1448
  //plugin-related frontend styles
1451
  }
1452
  add_action('wp_enqueue_scripts', 'kgvid_video_embed_enqueue_scripts', 12);
1453
 
 
 
1454
  function enqueue_kgvid_script() { //loads plugin-related scripts in the admin area
1455
 
1456
  $options = kgvid_get_options();
1484
  'processing' => __('Processing...', 'video-embed-thumbnail-generator'),
1485
  'parentwarning_posts' => __("You are about to set all existing video thumbnails previously generated by this plugin as attachments of their posts rather than their associated videos. Proceed at your own risk.", 'video-embed-thumbnail-generator'),
1486
  'parentwarning_videos' => __("You are about to set all existing video thumbnails previously generated by this plugin as attachments of their videos rather than their associated posts. Proceed at your own risk.", 'video-embed-thumbnail-generator'),
1487
+ 'clearqueuedwarning' => __("You are about to clear all videos not yet encoded.", 'video-embed-thumbnail-generator'),
1488
  'complete' => __('Complete', 'video-embed-thumbnail-generator'),
1489
  'tracktype' => __('Track type:', 'video-embed-thumbnail-generator'),
1490
  'subtitles' => __('subtitles', 'video-embed-thumbnail-generator'),
1495
  'choosefromlibrary' => __('Choose from Library', 'video-embed-thumbnail-generator'),
1496
  'languagecode' => __('Language code:', 'video-embed-thumbnail-generator'),
1497
  'label' => _x('Label:', 'noun', 'video-embed-thumbnail-generator'),
1498
+ 'trackdefault' => __('Default:', 'video-embed-thumbnail-generator'),
1499
  'custom' => _x('Custom', 'Custom format', 'video-embed-thumbnail-generator')
1500
  ) );
1501
 
1516
  if ( !empty($posts) && is_array($posts) ) {
1517
  foreach ( $posts as $post ) {
1518
  if ( $options['open_graph'] == "on"
1519
+ && ( ( is_attachment() && strpos($post->post_mime_type, 'video') !== false )
1520
+ || ( preg_match_all( '/'. $pattern .'/s', $post->post_content, $matches )
1521
  && is_array($matches)
1522
  && array_key_exists( 2, $matches ) && array_key_exists( 5, $matches )
1523
+ && ( in_array( 'KGVID', $matches[2] ) || in_array( 'FMP', $matches[2] ) ) ) ) ) { //if KGVID or FMP shortcode is in posts on this page.
1524
+
1525
+ if ( isset($matches) ) {
1526
+
1527
+ $first_key = array_search('KGVID', $matches[2]);
1528
+ if ( $first_key === false ) { $first_key = array_search('FMP', $matches[2]); }
1529
+
1530
+ if ( $first_key !== false ) {
1531
+
1532
+ $attributes = array();
1533
+ $id = "";
1534
+ $url = "";
1535
+
1536
+ if ( array_key_exists( 3, $matches ) ) {
1537
+ $attributes = shortcode_parse_atts($matches[3][$first_key]);
1538
+ }
1539
 
1540
+ if ( !empty($matches[5][$first_key]) ) { //there's a URL
1541
+
1542
+ $url = $matches[5][$first_key];
1543
+ $attributes['id'] = kgvid_url_to_id($matches[5][$first_key]);
1544
+
1545
+ }//if there's a URL
1546
+
1547
+ elseif ( is_array($attributes) && array_key_exists( 'id', $attributes ) ) {
1548
+ $url = wp_get_attachment_url($attributes['id']);
1549
+ }//if there's no URL but there's an ID attribute
1550
+
1551
+ elseif ( ( is_array($attributes) && !array_key_exists( 'id', $attributes ) )
1552
+ || empty($attributes)
1553
+ ) {
1554
+
1555
+ $post_ID = $post->ID;
1556
+
1557
+ $args = array(
1558
+ 'numberposts' => 1,
1559
+ 'post_mime_type' => 'video',
1560
+ 'post_parent' => $post_ID,
1561
+ 'post_status' => null,
1562
+ 'post_type' => 'attachment'
1563
+ );
1564
+ $video_attachment = get_posts($args);
1565
+
1566
+ if ( $video_attachment ) {
1567
+ $attributes['id'] = $video_attachment[0]->ID;
1568
+ $url = wp_get_attachment_url($attributes['id']);
1569
+ }
1570
+
1571
+ }//if no URL or ID attribute
1572
+ }//if there's a KGVID shortcode in the post
1573
+ }//if there's a shortcode in the post
1574
+ elseif ( is_attachment() ) {
1575
+ $url = wp_get_attachment_url($post->ID);
1576
+ $kgvid_postmeta = kgvid_get_attachment_meta($post->ID);
1577
+ $attributes = array( 'width' => $kgvid_postmeta['width'], 'height' => $kgvid_postmeta['height'], 'id' => $post->ID );
1578
+ $mime_type_check['type'] = $post->post_mime_type;
1579
+
1580
+ }
1581
+
1582
+ if ( $url ) {
1583
+
1584
+ echo '<meta property="og:video" content="'.$url.'" />'."\n";
1585
+ $secure_url = str_replace('http://', 'https://', $url);
1586
+ echo '<meta property="og:video:secure_url" content="'.$secure_url.'" />'."\n";
1587
+ $mime_type_check = wp_check_filetype($url);
1588
+ echo '<meta property="og:video:type" content="'.$mime_type_check['type'].'" />'."\n";
1589
 
 
 
1590
  if ( is_array($attributes) && array_key_exists( 'width', $attributes ) ) {
1591
  echo '<meta property="og:video:width" content="'.$attributes['width'].'" />'."\n";
1592
  if ( array_key_exists( 'height', $attributes ) ) {
1594
  }
1595
  }
1596
  }
1597
+
1598
+ if ( is_array($attributes) && array_key_exists( 'id', $attributes ) ) {
1599
+
1600
+ echo '<meta property="og:video" content="'.site_url('/')."?attachment_id=".$attributes['id']."&amp;kgvid_video_embed[enable]=true".'" />'."\n";
1601
+ echo '<meta property="og:video:secure_url" content="'.site_url('/', 'https')."?attachment_id=".$attributes['id']."&amp;kgvid_video_embed[enable]=true".'" />'."\n";
1602
+ echo '<meta property="og:video:type" content="text/html" />'."\n";
1603
+
1604
+ if ( $options['oembed_provider'] == "on" && is_singular() ) { //add oembed provider links for single pages
1605
+
1606
+ echo '<link rel="alternate" type="application/json+oembed" href="' . site_url('/?kgvid_video_embed[oembed]=json&amp;kgvid_video_embed[post_id]=' .$attributes['id']).'" />'."\n";
1607
+ echo '<link rel="alternate" type="application/xml+oembed" href="' . site_url('/?kgvid_video_embed[oembed]=xml&amp;kgvid_video_embed[post_id]='.$attributes['id']).'" />'."\n";
1608
+
1609
+ }
1610
+
1611
+ }
1612
+
1613
+ break; //end execution after the first video embedded using the shortcode
1614
+
1615
+ }//end if shortcode is in post or is attachment
1616
  }//end post loop
1617
  }//end if posts
1618
 
1625
 
1626
  if ( $options['embed_method'] == "Video.js" || $options['embed_method'] == "Strobe Media Playback" ) {
1627
  wp_enqueue_script( 'video-quality-selector', plugins_url("", __FILE__).'/video-js/video-quality-selector.js', array('video-js'), $options['version'], true );
1628
+ wp_enqueue_script( 'video-js', plugins_url("", __FILE__).'/video-js/video.js', '', '4.12.7', true );
1629
  add_action('wp_footer', 'kgvid_print_videojs_footer', 99);
1630
  }
1631
 
1635
 
1636
  wp_enqueue_script( 'kgvid_video_embed', plugins_url("/js/kgvid_video_embed.js", __FILE__), array('jquery'), $options['version'], true );
1637
 
1638
+ wp_localize_script( 'kgvid_video_embed', 'kgvidL10n_frontend', array(
1639
+ 'ajaxurl' => admin_url( 'admin-ajax.php', is_ssl() ? 'admin' : 'http' ),
1640
+ 'ajax_nonce' => wp_create_nonce('kgvid_frontend_nonce'),
1641
+ 'playstart' => _x("Play Start", 'noun for Google Analytics event', 'video-embed-thumbnail-generator'),
1642
+ 'completeview' => _x("Complete View", 'noun for Google Analytics event', 'video-embed-thumbnail-generator'),
1643
+ 'next' => _x("Next", 'button text to play next video', 'video-embed-thumbnail-generator'),
1644
+ 'previous' => _x("Previous", 'button text to play previous video', 'video-embed-thumbnail-generator')
1645
+ ) );
1646
+
1647
  }
1648
 
1649
  function kgvid_print_videojs_footer() { //called by the shortcode if Video.js is used
1650
 
1651
+ echo '<script type="text/javascript">if(typeof videojs !== "undefined") { videojs.options.flash.swf = "'.plugins_url("", __FILE__).'/video-js/video-js.swf?4.7.0"; }</script>'."\n";
1652
+
1653
+ }
1654
+
1655
+ function kgvid_gallery_page($page_number, $query_atts, $last_video_id = 0) {
1656
+
1657
+ $options = kgvid_get_options();
1658
+ global $kgvid_video_id;
1659
+ if ( !$kgvid_video_id ) { $kgvid_video_id = $last_video_id + 1; }
1660
+
1661
+ $code = '';
1662
+
1663
+ if ( $query_atts['gallery_orderby'] == 'menu_order' ) { $query_atts['gallery_orderby'] = 'menu_order ID'; }
1664
+ if ( $options['gallery_pagination'] != 'on' && empty($query_atts['gallery_per_page']) || $query_atts['gallery_per_page'] == 'false' ) { $query_atts['gallery_per_page'] = -1; }
1665
+
1666
+ $args = array(
1667
+ 'post_type' => 'attachment',
1668
+ 'orderby' => $query_atts['gallery_orderby'],
1669
+ 'order' => $query_atts['gallery_order'],
1670
+ 'post_mime_type' => 'video',
1671
+ 'posts_per_page' => $query_atts['gallery_per_page'],
1672
+ 'paged' => $page_number,
1673
+ 'post_status' => 'published',
1674
+ 'post_parent' => $query_atts['gallery_id']
1675
+ );
1676
+
1677
+ if ( !empty($query_atts['gallery_exclude']) ) {
1678
+ $exclude_arr = wp_parse_id_list($query_atts['gallery_exclude']);
1679
+ if ( !empty($exclude_arr) ) {
1680
+ $args['post__not_in'] = $exclude_arr;
1681
+ }
1682
+ }
1683
+
1684
+ if ( !empty($query_atts['gallery_include']) ) {
1685
+ $include_arr = wp_parse_id_list($query_atts['gallery_include']);
1686
+ if ( !empty($include_arr) ) {
1687
+ $args['post__in'] = $include_arr;
1688
+ unset($args['post_parent']);
1689
+ }
1690
+ }
1691
+
1692
+ $attachments = new WP_Query($args);
1693
+
1694
+ if ( $attachments->have_posts() ) {
1695
+
1696
+ foreach ( $attachments->posts as $attachment ) {
1697
 
1698
+ $thumbnail_url = get_post_meta($attachment->ID, "_kgflashmediaplayer-poster", true);
1699
+ $poster_id = get_post_meta($attachment->ID, '_kgflashmediaplayer-poster-id', true);
1700
+ if ( !empty($poster_id) ) {
1701
+ $thumbnail_url = wp_get_attachment_url($poster_id);
1702
+ if ( intval($query_atts['gallery_thumb']) <= get_option('medium_size_h') ) {
1703
+ $poster_post = get_post($poster_id);
1704
+ if ( $poster_post->guid == $thumbnail_url ) {
1705
+ $thumbnail_url = kgvid_get_attachment_medium_url($poster_id);
1706
+ } //use the "medium" size image if available
1707
+ }
1708
+ }
1709
+ if (!$thumbnail_url) { $thumbnail_url = $options['poster']; } //use the default poster if no thumbnail set
1710
+ if (!$thumbnail_url) { $thumbnail_url = plugins_url('/images/nothumbnail.jpg', __FILE__);} //use the blank image if no other option
1711
+
1712
+ if ( empty($query_atts['caption']) ) { $query_atts['caption'] = $attachment->post_excerpt; }
1713
+ $below_video = 0;
1714
+ if ( !empty($query_atts['caption']) ) { $below_video = 1; }
1715
+ $kgvid_postmeta = kgvid_get_attachment_meta( $attachment->ID );
1716
+ if ( $kgvid_postmeta['downloadlink'] == "on" ) { ++$below_video; }
1717
+
1718
+ $play_button_html = '';
1719
+
1720
+ if ( $options['embed_method'] == "WordPress Default" ) {
1721
+
1722
+ $library = apply_filters( 'wp_video_shortcode_library', 'mediaelement' );
1723
+ if ( 'mediaelement' === $library && did_action( 'init' ) ) {
1724
+ wp_enqueue_style( 'wp-mediaelement' );
1725
+ wp_enqueue_script( 'wp-mediaelement' );
1726
+ }
1727
+
1728
+ $play_button_class = "mejs-overlay-button";
1729
+ $play_scale = strval( round(intval($query_atts["gallery_thumb"])/400,2) );
1730
+ $play_translate = 5;
1731
+ }
1732
+
1733
+ else {
1734
+ $play_button_class = "vjs-big-play-button";
1735
+ $play_scale = strval( round(intval($query_atts["gallery_thumb"])/600,2) );
1736
+ $play_translate = 30;
1737
+ }
1738
+
1739
+ $play_button_html = '<div class="'.esc_attr($options['js_skin']).'" ><div class="'.$play_button_class.'" style="-webkit-transform: scale('.$play_scale.') translateY(-'.$play_translate.'px); -o-transform: scale('.$play_scale.') translateY(-'.$play_translate.'px); -ms-transform: scale('.$play_scale.') translateY(-'.$play_translate.'px); transform: scale('.$play_scale.') translateY(-'.$play_translate.'px);"><span></span></div></div>';
1740
+
1741
+ $dimensions = kgvid_set_video_dimensions($attachment->ID, true);
1742
+
1743
+ $shortcode = '[KGVID autoplay="true" id="'.$attachment->ID.'" width="'.$dimensions['width'].'" height="'.$dimensions['height'].'"';
1744
+ if ($kgvid_postmeta['downloadlink'] == "on") { $shortcode .= ' downloadlink="true"'; }
1745
+ $shortcode .= '][/KGVID]';
1746
+
1747
+ $popup_code = do_shortcode($shortcode);
1748
+ preg_match('/data-kgvid_video_vars=.*? /', $popup_code, $video_vars);
1749
+ $popup_code = str_replace(array("\r", "\n", "\t", $video_vars[0]), "", $popup_code);
1750
+ $video_vars[0] = str_replace('&nbsp;', ' ', $video_vars[0]);
1751
+
1752
+ if ( $options['js_skin'] == "" ) { $options['js_skin'] = "vjs-default-skin"; }
1753
+ if ( is_array($query_atts) && array_key_exists('skin', $query_atts) ) {
1754
+ $options['js_skin'] = $query_atts['skin']; //allows user to set skin for individual videos using the skin="" attribute
1755
+ }
1756
+
1757
+ $code .= '<div class="kgvid_video_gallery_thumb" onclick="kgvid_SetVideo(\'kgvid_'.strval($kgvid_video_id-1).'\')" id="kgvid_video_gallery_thumb_kgvid_'.strval($kgvid_video_id-1).'" data-id="kgvid_'.strval($kgvid_video_id-1).'" data-width="'.esc_attr($dimensions['width']).'" data-height="'.esc_attr($dimensions['height']).'" data-meta="'.esc_attr($below_video).'" data-gallery_end="'.esc_attr($query_atts['gallery_end']).'" data-popupcode="'.esc_html($popup_code).'" '.$video_vars[0].'" style="max-width:'.$query_atts["gallery_thumb"].'px"><img src="'.esc_attr($thumbnail_url).'" alt="'.esc_attr($attachment->post_title).'">'.$play_button_html;
1758
+
1759
+ if ( $query_atts['gallery_title'] == 'true' ) { $code .= '<div class="titlebackground"><div class="videotitle">'.$attachment->post_title.'</div></div>'; }
1760
+
1761
+ $code .= '</div>'."\n\t\t\t";
1762
+
1763
+
1764
+ } //end attachment loop
1765
+
1766
+ if ( $attachments->max_num_pages > 1 ) {
1767
+
1768
+ $code .= '<div class="kgvid_gallery_pagination">';
1769
+ $code .= '<span class="kgvid_gallery_pagination_arrow"';
1770
+ if ( $page_number == 1 ) { $code .= ' style="visibility:hidden;"'; }
1771
+ $code .= ' onclick="kgvid_switch_gallery_page(jQuery(this).siblings(\'.kgvid_gallery_pagination_selected\').prev(), \'none\');"><a href="javascript:void(0)" title="'.__('Previous', 'video-embed-thumbnail-generator').'">&larr;</a></span> ';
1772
+ for ( $x = 1; $x <= $attachments->max_num_pages; $x++ ) {
1773
+ if ( $x == $page_number ) { $code .= '<span class="kgvid_gallery_pagination_selected">'.$x.'</span> '; }
1774
+ else { $code .= '<span onclick="kgvid_switch_gallery_page(this, \'none\');"><a href="javascript:void(0)">'.$x.'</a></span> '; }
1775
+ }
1776
+ $code .= '<span class="kgvid_gallery_pagination_arrow"';
1777
+ if ( $page_number == $attachments->max_num_pages ) { $code .= ' style="visibility:hidden;"'; }
1778
+ $code .= ' onclick="kgvid_switch_gallery_page(jQuery(this).siblings(\'.kgvid_gallery_pagination_selected\').next(), \'none\');"><a href="javascript:void(0)" title="'.__('Next', 'video-embed-thumbnail-generator').'">&rarr;</a></span>';
1779
+ $code .= '</div>';
1780
+
1781
+ }
1782
+
1783
+ } //if there are attachments
1784
+
1785
+ return $code;
1786
  }
1787
 
1788
+ function kgvid_switch_gallery_page() {
1789
+
1790
+ check_ajax_referer( 'kgvid_frontend_nonce', 'security' );
1791
+
1792
+ if ( isset($_POST['page']) ) { $page_number = $_POST['page']; }
1793
+ else { $page_number = 1; }
1794
+ $query_atts = $_POST['query_atts'];
1795
+ $last_video_id = $_POST['last_video_id'];
1796
+ $code = kgvid_gallery_page($page_number, $query_atts, $last_video_id);
1797
+ echo json_encode($code);
1798
+ die();
1799
+
1800
+ }
1801
+ add_action( 'wp_ajax_kgvid_switch_gallery_page', 'kgvid_switch_gallery_page' ); // ajax for logged in users
1802
+ add_action( 'wp_ajax_nopriv_kgvid_switch_gallery_page', 'kgvid_switch_gallery_page' ); // ajax for not logged in users
1803
+
1804
  function kgvid_shortcode_atts($atts) {
1805
 
1806
  $options = kgvid_get_options();
1810
 
1811
  $default_atts = array(
1812
  'id' => '',
1813
+ 'orderby' => 'menu_order ID',
1814
  'order' => 'ASC',
1815
  'videos' => -1,
1816
  'width' => $options['width'],
1821
  'autohide' => $options['autohide'],
1822
  'poster' => $options['poster'],
1823
  'watermark' => $options['watermark'],
1824
+ 'watermark_link_to' => $options['watermark_link_to'],
1825
+ 'watermark_url' => $options['watermark_url'],
1826
  'endofvideooverlay' => $options['endofvideooverlay'],
1827
  'endofvideooverlaysame' => $options['endofvideooverlaysame'],
1828
  'playbutton' => $options['playbutton'],
1834
  'configuration' => $options['configuration'],
1835
  'skin' => $options['skin'],
1836
  'gallery' => 'false',
1837
+ 'gallery_per_page' => $options['gallery_per_page'],
1838
  'gallery_thumb' => $options['gallery_thumb'],
1839
+ 'gallery_orderby' => 'menu_order ID',
1840
  'gallery_order' => 'ASC',
1841
  'gallery_exclude' => '',
1842
  'gallery_include' => '',
1843
  'gallery_id' => $post_ID,
1844
  'gallery_end' => $options['gallery_end'],
1845
+ 'gallery_title' => $options['gallery_title'],
1846
  'volume' => $options['volume'],
1847
  'mute' => $options['mute'],
1848
  'title' => $options['overlay_title'],
1858
  'track_kind' => 'subtitles',
1859
  'track_srclang' => substr(get_bloginfo('language'), 0, 2),
1860
  'track_src' => '',
1861
+ 'track_label' => get_bloginfo('language'),
1862
+ 'track_default' => ''
1863
  );
1864
 
1865
  $custom_atts_return = array();
1888
  "view_count",
1889
  "inline",
1890
  "resize",
 
1891
  "downloadlink",
1892
  "mute",
1893
+ "fullwidth",
1894
+ "gallery_title"
1895
  );
1896
  foreach ( $checkbox_convert as $query ) {
1897
  if ( $query_atts[$query] == "on" ) { $query_atts[$query] = "true"; }
1898
  if ( $query_atts[$query] == false ) { $query_atts[$query] = "false"; }
1899
  }
1900
 
1901
+ if ( $query_atts['auto_res'] == 'true' ) { $query_atts['auto_res'] = 'automatic'; } //if anyone used auto_res in the shortcode before version 4.4.3
1902
+ if ( $query_atts['auto_res'] == 'false' ) { $query_atts['auto_res'] = 'highest'; }
1903
+ if ( $query_atts['orderby'] == 'menu_order' ) { $query_atts['orderby'] = 'menu_order ID'; }
1904
+ if ( $query_atts['track_default'] == 'true' ) { $query_atts['track_default'] = 'default'; }
1905
 
1906
  return $query_atts;
1907
 
1910
  function KGVID_shortcode($atts, $content = ''){
1911
 
1912
  global $content_width;
1913
+ global $kgvid_video_id;
1914
  if ( !$kgvid_video_id ) { $kgvid_video_id = 0; }
1915
 
1916
  $content_width_save = $content_width;
1919
  if ( !is_feed() ) {
1920
 
1921
  $options = kgvid_get_options();
1922
+ $id_array = array();
1923
  kgvid_enqueue_shortcode_scripts();
1924
 
1925
  if ( in_the_loop() ) { $post_ID = get_the_ID(); }
1979
 
1980
  if ( !empty($id) ) { //if the video is an attachment in the WordPress db
1981
 
1982
+ $content = wp_get_attachment_url($id);
1983
+ if ( $content == false ) { echo "Invalid video ID"; continue; }
 
 
1984
 
1985
  $encodevideo_info = kgvid_encodevideo_info($content, $id);
1986
  $attachment_info = get_post( $id );
1987
+ $kgvid_postmeta = kgvid_get_attachment_meta($id);
1988
 
1989
  $dimensions = kgvid_set_video_dimensions($id);
1990
 
1996
  $poster_id = get_post_meta($id, '_kgflashmediaplayer-poster-id', true);
1997
  if ( !empty($poster_id) ) {
1998
  $poster_image_src = wp_get_attachment_image_src($poster_id, 'full');
1999
+ $query_atts['poster'] = $poster_image_src[0];
2000
+ if ( intval($query_atts['width']) <= get_option('medium_size_h') ) {
2001
  $query_atts['poster'] = kgvid_get_attachment_medium_url($poster_id);
2002
  }
2003
  }
2073
  if ( $query_atts['align'] == "right" ) { $aligncode = ' kgvid_wrapper_auto_left'; }
2074
  }
2075
 
2076
+ if ( ( $query_atts['title'] != "false" && $options['embed_method'] != "JW Player" )
2077
+ || $query_atts['embedcode'] != "false" ) { //generate content overlaid on video
2078
+ $kgvid_meta = true;
2079
+ }
2080
+ else { $kgvid_meta = false; }
2081
+
2082
+ $video_variables = array(
2083
+ 'id' => $div_suffix,
2084
+ 'attachment_id' => $id,
2085
+ 'player_type' => str_replace(' ', '&nbsp;', $options['embed_method']),
2086
+ 'width' => $query_atts['width'],
2087
+ 'height' => $query_atts['height'],
2088
+ 'fullwidth' => $query_atts['fullwidth'],
2089
+ 'countable' => $countable,
2090
+ 'autoplay' => $query_atts['autoplay'],
2091
+ 'set_volume' => $query_atts['volume'],
2092
+ 'mute' => $query_atts['mute'],
2093
+ 'meta' => $kgvid_meta,
2094
+ 'endofvideooverlay' => $query_atts['endofvideooverlay'],
2095
+ 'resize' => $query_atts['resize'],
2096
+ 'auto_res' => $query_atts['auto_res'],
2097
+ 'right_click' => $query_atts['right_click']
2098
+ );
2099
+
2100
+ if ( $options['embed_method'] == "Strobe Media Playback" && $flash_settings['flash_source_found'] ) {
2101
+
2102
+ $video_variables['swfurl'] = plugins_url('', __FILE__)."/flash/StrobeMediaPlayback.swf";
2103
+ $video_variables['expressinstallswfurl'] = plugins_url("", __FILE__)."/flash/expressInstall.swf";
2104
+ $video_variables['flashvars'] = $flash_settings['flashvars'];
2105
+ $video_variables['params'] = $flash_settings['params'];
2106
+
2107
+ } //if Strobe Media
2108
+
2109
+ //wp_localize_script( 'kgvid_video_embed', 'kgvid_video_vars_'.$div_suffix, $video_variables ); //add video variables in footer
2110
+
2111
  $code .= '<div id="kgvid_'.$div_suffix.'_wrapper" class="kgvid_wrapper'.$aligncode.'">'."\n\t\t\t";
2112
+ $code .= '<div id="video_'.$div_suffix.'_div" class="fitvidsignore kgvid_videodiv" data-id="'.$div_suffix.'" data-kgvid_video_vars="'.esc_attr(json_encode($video_variables)).'" itemprop="video" itemscope itemtype="https://schema.org/VideoObject">';
2113
  if ( $query_atts["poster"] != '' ) { $code .= '<meta itemprop="thumbnailUrl" content="'.esc_attr($query_atts["poster"]).'" />'; }
2114
  if ( !empty($id) ) { $schema_embedURL = site_url('/')."?attachment_id=".$id."&amp;kgvid_video_embed[enable]=true"; }
2115
  else { $schema_embedURL = $content; }
2122
  else { $description = ""; }
2123
  if ( !empty($description) ) { $code .= '<meta itemprop="description" content="'.esc_attr($description).'" />'; }
2124
 
2125
+ $track_keys = array('kind', 'srclang', 'src', 'label', 'default');
2126
+ if ( !isset($kgvid_postmeta) || ( is_array($kgvid_postmeta) && !is_array($kgvid_postmeta['track']) ) ) {
2127
+ $kgvid_postmeta['track'] = array();
2128
+ $kgvid_postmeta['track'][0] = array ( 'kind' => '', 'srclang' => '', 'src' => '', 'label' => '', 'default' => '');
 
2129
  }
2130
  foreach ( $track_keys as $key ) {
2131
+ if ( empty($kgvid_postmeta['track'][0][$key]) ) { $kgvid_postmeta['track'][0][$key] = $query_atts['track_'.$key]; }
2132
  }
2133
 
2134
  $track_code = "";
2135
+ if ( !empty($kgvid_postmeta['track'][0]['src']) ) {
2136
+ foreach ( $kgvid_postmeta['track'] as $track => $track_attribute ) {
2137
  foreach ( $track_attribute as $attribute => $value ) {
2138
  if ( empty($value) ) { $track_attribute[$attribute] = $query_atts['track_'.$attribute]; }
2139
  }
2140
  if ( $options['embed_method'] == "WordPress Default" && $track_attribute['kind'] == 'captions' ) { $track_attribute['kind'] = 'subtitles'; }
2141
+ $track_code .= "\t\t\t\t\t<track kind='".esc_attr($track_attribute['kind'])."' src='".esc_attr($track_attribute['src'])."' srclang='".esc_attr($track_attribute['srclang'])."' label='".esc_attr($track_attribute['label'])."' ".esc_attr($track_attribute['default'])." />\n";
2142
  }
2143
  }
2144
 
2203
  krsort($sources);
2204
 
2205
  $jw_tracks = array();
2206
+ if ( !empty($kgvid_postmeta['track'][0]['src']) ) {
2207
+ foreach ( $kgvid_postmeta['track'] as $track => $track_attribute ) {
2208
  foreach ( $track_attribute as $attribute => $value ) {
2209
  if ( empty($value) ) { $track_attribute[$attribute] = $query_atts['track_'.$attribute]; }
2210
  }
2211
+ $default_text = '';
2212
+ if ( $track_attribute['default'] == 'default' ) { $default_text = ', \'default\': true'; }
2213
+ $jw_tracks[] = '{ file:\''.esc_attr($track_attribute['src']).'\', kind:\''.esc_attr($track_attribute['kind']).'\', label:\''.esc_attr($track_attribute['label']).'\''.$default_text.'}';
2214
  }
2215
  }
2216
 
2252
 
2253
  $enable_resolutions_plugin = false;
2254
  $x = 20;
2255
+ $h264_resolutions = array();
2256
+
2257
  foreach ($video_formats as $format => $format_stats) {
2258
  if ( $format != "original" && $encodevideo_info[$format]["url"] == $content ) { unset($sources['original']); }
2259
  if ( $encodevideo_info[$format]["exists"] ) {
2265
  else { $source_key = $x; }
2266
 
2267
  $sources[$source_key] = "\t\t\t\t\t".'<source src="'.esc_attr($encodevideo_info[$format]["url"]).'?id='.$kgvid_video_id.'" type="'.$format_stats["mime"].'"';
2268
+ if ( $format == 'vp9' ) { $sources[$source_key] .= ' codecs="vp9, vorbis"'; }
2269
  if ( $format_stats['type'] == 'h264' ) {
2270
  $sources[$source_key] .= ' data-res="'.$format_stats['label'].'"';
2271
  if ( $mp4already ) { //there is more than one resolution available
2272
  $enable_resolutions_plugin = true;
2273
  }
2274
  $mp4already = true;
2275
+ $h264_resolutions[] = $format_stats['label'];
2276
  }
2277
  else { $sources[$source_key] .= ' data-res="'.$format_stats['name'].'"'; }
2278
  $sources[$source_key] .= '>'."\n";
2280
  $x--;
2281
  }
2282
  krsort($sources);
2283
+ natsort($h264_resolutions);
2284
 
2285
  $code .= '<video id="video_'.$div_suffix.'" ';
2286
  if ( $query_atts["loop"] == 'true') { $code .= 'loop '; }
2289
  $code .= 'preload="'.$options['preload'].'" ';
2290
  if ( $query_atts["poster"] != '' ) { $code .= 'poster="'.esc_attr($query_atts["poster"]).'" '; }
2291
  $code .= 'width="'.$query_atts["width"].'" height="'.esc_attr($query_atts["height"]).'"';
2292
+ $locale = get_locale();
2293
+ if ( $options['js_skin'] == "" ) { $options['js_skin'] = "vjs-default-skin"; }
2294
+ if ( is_array($atts) && array_key_exists('skin', $atts) ) {
2295
+ $options['js_skin'] = $atts['skin']; //allows user to set skin for individual videos using the skin="" attribute
2296
+ }
2297
+ $code .= ' class="fitvidsignore '.esc_attr('video-js '.$options['js_skin']).'" data-setup=\'{ "nativeControlsForTouch": true, "language": "'.substr($locale, 0, 2).'"';
2298
+ if ( $enable_resolutions_plugin ) { $code .= ', "plugins" : { "resolutionSelector" : { "force_types" : ["video/mp4"]';
2299
+ if ( $query_atts["auto_res"] == "highest" ) { $code .= ', "default_res": "'.end($h264_resolutions).'"'; }
2300
+ if ( $query_atts["auto_res"] == "lowest" ) { $code .= ', "default_res": "'.reset($h264_resolutions).'"'; }
2301
+ $code .= ' } }';
2302
+ }
2303
+ $code .= ' }\'';
2304
  $code .= ">\n";
2305
 
2306
  $code .= implode("", $sources); //add the <source> tags created earlier
2311
  $code .= "\t\t\t</div>\n";
2312
  $show_views = false;
2313
  if ( !empty($id) || !empty($query_atts['caption']) || $query_atts['downloadlink'] == "true" || $content == plugins_url('/images/sample-video-h264.mp4', __FILE__) ) { //generate content below the video
2314
+ if ( is_array($kgvid_postmeta) && array_key_exists('starts', $kgvid_postmeta) ) { $view_count = number_format(intval($kgvid_postmeta['starts'])); }
2315
+ else { $view_count = "0"; }
2316
  if ( $content == plugins_url('/images/sample-video-h264.mp4', __FILE__) ) { $view_count = "XX"; }
2317
  if ( $query_atts['view_count'] == "true" ) { $show_views = true; }
2318
  if ( !empty($query_atts['caption']) || $show_views || $query_atts['downloadlink'] == "true" ) {
2323
  if ( $query_atts['downloadlink'] == "true" ) {
2324
  if ( !empty($query_atts['caption']) ) { $code .= '<br>'; }
2325
  $forceable = false;
2326
+ if ( !empty($id) && $options['click_download'] == 'on' ) {
2327
  $filepath = get_attached_file($id);
2328
  if ( file_exists($filepath) ) {
2329
  $forceable = true;
2338
  }
2339
  }
2340
 
2341
+ if ( $kgvid_meta == true ) { //generate content overlaid on video
 
 
2342
  $code .= "\t\t\t<div style=\"display:none;\" id=\"video_".$div_suffix."_meta\" class=\"kgvid_video_meta kgvid_video_meta_hover\">\n";
2343
  if ( $query_atts['embedcode'] != "false" ) {
2344
  if ( $query_atts['embedcode'] == "true" ) { $iframeurl = site_url('/')."?attachment_id=".$id."&amp;kgvid_video_embed[enable]=true"; }
2351
  }
2352
  $code .= "\t\t\t</div>\n";
2353
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2354
 
2355
+ if ( !empty($query_atts["watermark"]) && $query_atts["watermark"] != "false" ) {
2356
+ $watermark_id = kgvid_url_to_id($query_atts["watermark"]);
2357
+ if ( $watermark_id ) { $query_atts["watermark"] = wp_get_attachment_url($watermark_id); }
2358
+ $code .= "<div style=\"display:none;\" id='video_".$div_suffix."_watermark' class='kgvid_watermark'>";
2359
+ if ( !empty($query_atts["watermark_url"]) && $query_atts["watermark_link_to"] != 'custom' ) { $query_atts["watermark_link_to"] = 'custom'; }
2360
+ if ( $query_atts['watermark_link_to'] != 'false' && $query_atts["watermark_url"] != 'false' ) {
2361
+ $watermark_link = true;
2362
+ switch ( $query_atts['watermark_link_to'] ) {
2363
+
2364
+ case 'home':
2365
+ $watermark_href = get_home_url();
2366
+ break;
2367
 
2368
+ case 'parent':
2369
+ if ( !empty($id) && is_object($attachment_info) && array_key_exists('post_parent', $attachment_info) && !empty($attachment_info->post_parent) ) {
2370
+ $watermark_href = get_permalink($attachment_info->post_parent);
2371
+ }
2372
+ else { $watermark_href = get_home_url(); }
2373
+ break;
2374
 
2375
+ case 'attachment':
2376
+ if ( !empty($id) ) {
2377
+ $watermark_href = get_permalink($id);
2378
+ }
2379
+ else { $watermark_href = get_home_url(); }
2380
+ break;
2381
 
2382
+ case 'download':
2383
+ if ( !empty($id) ) {
2384
+ $watermark_href = site_url('/').'?attachment_id='.$id.'&kgvid_video_embed[download]=true';
2385
+ }
2386
+ else { $watermark_href = $content; }
2387
+ break;
2388
 
2389
+ case 'custom':
2390
+ $watermark_href = $query_atts["watermark_url"];
2391
+ break;
 
 
 
 
 
2392
 
2393
+ }
2394
+ $code .= "<a target='_parent' href='".$watermark_href."'>";
2395
+ }
2396
+ else { $watermark_link = false; }
2397
+ $code .= "<img src='".esc_attr($query_atts["watermark"])."' alt='watermark'>";
2398
+ if ( $watermark_link ) { $code .= "</a>"; }
2399
+ $code .= "</div>";
2400
+ } //generate watermark
2401
+ $code .= "\t\t</div>"; //end kgvid_XXXX_wrapper div
2402
 
2403
  $kgvid_video_id++;
2404
 
2408
 
2409
  else { //if gallery
2410
 
 
 
2411
  static $kgvid_gallery_id = 0;
2412
+ $gallery_query_index = array(
2413
+ 'gallery_orderby',
2414
+ 'gallery_order',
2415
+ 'gallery_id',
2416
+ 'gallery_include',
2417
+ 'gallery_exclude',
2418
+ 'gallery_thumb',
2419
+ 'caption',
2420
+ 'gallery_end',
2421
+ 'gallery_per_page',
2422
+ 'gallery_title'
2423
  );
2424
+ $gallery_query_atts = array();
2425
+ foreach($gallery_query_index as $index) { $gallery_query_atts[$index] = $query_atts[$index]; };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2426
 
2427
+ wp_enqueue_script( 'simplemodal', plugins_url("/js/jquery.simplemodal.1.4.5.min.js", __FILE__), '', '1.4.5', true );
2428
 
2429
+ if ( $query_atts['align'] == "left" ) { $aligncode = ' kgvid_textalign_left'; }
2430
+ if ( $query_atts['align'] == "center" ) { $aligncode = ' kgvid_textalign_center'; }
2431
+ if ( $query_atts['align'] == "right" ) { $aligncode = ' kgvid_textalign_right'; }
2432
+ if ( $query_atts['inline'] == "true" ) { $aligncode .= ' kgvid_wrapper_inline'; }
2433
 
2434
+ $code .= '<div class="kgvid_gallerywrapper'.$aligncode.'" id="kgvid_gallery_'.$kgvid_gallery_id.'">';
2435
+ $code .= kgvid_gallery_page(1, $gallery_query_atts);
2436
+ $code .= '</div>'; //end wrapper div
2437
 
2438
+ wp_localize_script( 'kgvid_video_embed', 'kgvid_video_gallery_query_'.$kgvid_gallery_id, $gallery_query_atts ); //add popup video code in footer
2439
 
2440
+ $kgvid_gallery_id++;
2441
 
 
2442
  } //if gallery
2443
+
2444
  } //if not feed
2445
+
2446
  return $code;
2447
+
2448
  }
2449
  add_shortcode('FMP', 'KGVID_shortcode');
2450
  add_shortcode('KGVID', 'KGVID_shortcode');
2500
  }
2501
  add_action('wp_ajax_kgvid_clear_child_format', 'kgvid_clear_child_format');
2502
 
2503
+ function kgvid_update_encode_queue() {
2504
+
2505
+ check_ajax_referer( 'video-embed-thumbnail-generator-nonce', 'security' );
2506
+
2507
+ if ( isset( $_POST['page'] ) ) { $page = $_POST['page']; }
2508
+
2509
+ $video_encode_queue = kgvid_get_encode_queue();
2510
+
2511
+ if ( !empty($video_encode_queue) ) {
2512
+
2513
+ foreach ( $video_encode_queue as $video_key => $video_entry ) {
2514
+
2515
+ if ( !empty($video_entry['movieurl']) && !empty($video_entry['attachmentID']) ) {
2516
+ $encodevideo_info = kgvid_encodevideo_info($video_entry['movieurl'], $video_entry['attachmentID']);
2517
+ }
2518
+
2519
+ foreach ( $video_entry['encode_formats'] as $format => $value ) {
2520
+
2521
+ if ( !array_key_exists('lastline', $value) ) { $value['lastline'] = ''; }
2522
+
2523
+ $video_encode_queue[$video_key]['encode_formats'][$format]['meta_array'] = kgvid_encode_format_meta($encodevideo_info, $video_key, $format, $value['status'], $value['lastline'], $video_entry['attachmentID'], $video_entry['movieurl'], $page);
2524
+
2525
+ }
2526
+
2527
+ }
2528
+
2529
+ }//if there's a queue
2530
+
2531
+ $arr = array( 'queue' => $video_encode_queue );
2532
+
2533
+ echo json_encode($arr);
2534
+
2535
+ die();
2536
+
2537
+ }
2538
+ add_action('wp_ajax_kgvid_update_encode_queue', 'kgvid_update_encode_queue');
2539
+
2540
+ function kgvid_encode_format_meta( $encodevideo_info, $video_key, $format, $status, $lastline, $post_id, $movieurl, $page ) {
2541
+
2542
+ $options = kgvid_get_options();
2543
+
2544
+ $encodeset = "false";
2545
+ $checked = "";
2546
+ $meta = "";
2547
+ $disabled = "";
2548
+ $child_id = "";
2549
+ $something_to_encode = false;
2550
+ $encoding_now = false;
2551
+ $time_to_wait = 5000;
2552
+
2553
+ if ( get_post_type($post_id) == "attachment" ) {
2554
+ $kgvid_postmeta = kgvid_get_attachment_meta($post_id);
2555
+ if ( array_key_exists('encode'.$format, $kgvid_postmeta) ) { $encodeset = $kgvid_postmeta['encode'.$format]; }
2556
+ else { $encodeset = 'false'; }
2557
+ }
2558
+ if ( $encodeset == "false" && strpos($format, 'custom_') === false ) { $encodeset = $options['encode_'.$format]; }
2559
+
2560
+ if ( $encodeset == "on" || $status == "queued" ) { $checked = 'checked'; }
2561
+
2562
+ if ( $status != "notchecked" ) { //File is in queue
2563
+ $meta = ' <strong>'.ucfirst($status).'</strong>';
2564
+ if ( $status == "error" && !empty($lastline) ) {
2565
+ $meta .= ': <span class="kgvid_warning">'.stripslashes($lastline)."</span>";
2566
+ }
2567
+ }
2568
+
2569
+ if ( !empty($encodevideo_info) ) {
2570
+ if ( $encodevideo_info[$format]['exists'] ) { //if the video file exists
2571
+
2572
+ if ( array_key_exists('id', $encodevideo_info[$format]) ) {
2573
+ $child_id = $encodevideo_info[$format]['id'];
2574
+ $was_picked = get_post_meta( $child_id[$format], '_kgflashmediaplayer-pickedformat', true );
2575
+ }
2576
+ else { $was_picked = false; }
2577
+
2578
+ if ( $status != "encoding" ) { // not currently encoding
2579
+ if ( $status == "notchecked" ) {
2580
+ if ( $was_picked != false ) { $meta = ' <strong>Set: '.basename($encodevideo_info[$format]['filepath']).'</strong>'; }
2581
+ else { $meta = ' <strong>Encoded</strong>'; }
2582
+ }
2583
+ if ( $status != "canceling" ) {
2584
+
2585
+ if ( is_multisite() ) { $blog_id = get_current_blog_id(); }
2586
+ else { $blog_id = false; }
2587
+ if ( $encodevideo_info[$format]['writable']
2588
+ && current_user_can('encode_videos')
2589
+ && $format != "fullres" ) {
2590
+ if ( $was_picked != false ) {
2591
+ $meta .= '<a id="unpick-'.$post_id.'-'.$format.'" class="kgvid_delete-format" onclick="kgvid_clear_video(\''.$movieurl.'\', \''.$post_id.'\', \''.$child_id.'\', \''.$blog_id.'\');" href="javascript:void(0)">'.__('Clear Format', 'video-embed-thumbnail-generator').'</a>';
2592
+ }
2593
+ else {
2594
+ $meta .= '<a id="delete-'.$post_id.'-'.$format.'" class="kgvid_delete-format" onclick="kgvid_delete_video(\''.$movieurl.'\', \''.$post_id.'\', \''.$format.'\', \''.$child_id.'\', \''.$blog_id.'\');" href="javascript:void(0)">'.__('Delete Permanently', 'video-embed-thumbnail-generator').'</a>';
2595
+ }
2596
+ }
2597
+ }
2598
+ $disabled = ' disabled title="Format already exists"';
2599
+ $checked = '';
2600
+ }
2601
+ }
2602
+ else {
2603
+
2604
+ $something_to_encode = true;
2605
+
2606
+ } //if the video file doesn't exist, there's something to encode
2607
+ }
2608
+
2609
+ if ( $status == "encoding" ) {
2610
+ $encoding_now = true;
2611
+ $disabled = ' disabled title="'.__('Currently encoding', 'video-embed-thumbnail-generator').'"';
2612
+ $checked = 'checked';
2613
+ $progress = kgvid_encode_progress($video_key, $format, $page);
2614
+ $meta = $progress['embed_display'];
2615
+ $time_to_wait = $progress['time_to_wait'];
2616
+ }
2617
+
2618
+ if ( $status == "Encoding Complete" ) {
2619
+ $disabled = ' disabled title="'.__('Format already exists', 'video-embed-thumbnail-generator').'"';
2620
+ $checked = '';
2621
+ }
2622
+
2623
+ if ( $checked == '' ) { $something_to_encode = true; }
2624
+
2625
+ if ( !current_user_can('encode_videos') ) {
2626
+ $disabled = ' disabled title="'.__('You don\'t have permission to encode videos', 'video-embed-thumbnail-generator').'"';
2627
+ $something_to_encode = false;
2628
+ }
2629
+
2630
+ $meta_array = array( 'checked' => $checked, 'disabled' => $disabled, 'meta' => $meta, 'time_to_wait'=> $time_to_wait, 'something_to_encode' => $something_to_encode, 'encoding_now' => $encoding_now );
2631
+
2632
+ return $meta_array;
2633
+
2634
+ }
2635
+
2636
  function kgvid_ajax_generate_encode_checkboxes() {
2637
 
2638
  check_ajax_referer( 'video-embed-thumbnail-generator-nonce', 'security' );
2645
 
2646
  if (isset($_POST['encodeformats'])) {
2647
  $encode_checked = $_POST['encodeformats'];
2648
+ $kgvid_postmeta = kgvid_get_attachment_meta($post_id);
2649
  foreach ( $encode_checked as $format => $checked ) {
2650
+ if ( $checked == "true" ) { $kgvid_postmeta['encode'.$format] = 'on'; }
2651
+ else {$kgvid_postmeta['encode'.$format] = 'notchecked'; }
2652
  }
2653
+ kgvid_save_attachment_meta($post_id, $kgvid_postmeta);
2654
  }
2655
 
2656
  $checkboxes = kgvid_generate_encode_checkboxes($movieurl, $post_id, $page, $blog_id);
2673
  $post_mime_type = "";
2674
  $actualwidth = "1921";
2675
  $actualheight = "1081";
 
2676
  $encodevideo_info = array();
2677
  $is_attachment = false;
2678
 
2689
  $dimensions = kgvid_set_video_dimensions($post_id);
2690
  $actualwidth = $dimensions['actualwidth'];
2691
  $actualheight = $dimensions['actualheight'];
 
 
2692
  }
2693
  else { //video's not in the database
2694
  $is_attachment = false;
2702
  if ( is_array($video_entry) && array_key_exists('movie_info', $video_entry) ) {
2703
  $actualwidth = $video_entry['movie_info']['width'];
2704
  $actualheight = $video_entry['movie_info']['height'];
 
2705
  }
2706
  break;
2707
  }
2708
  }
 
2709
  reset($video_encode_queue);
 
 
 
 
2710
  }
2711
+
2712
  }
2713
  if ( $post_mime_type == "video/m4v" || $post_mime_type == "video/quicktime" ) { $post_mime_type = "video/mp4"; }
2714
 
2747
  elseif ( array_key_exists($format, $video_formats) ) { //don't recreate any formats that were previously unset
2748
  $video_formats[$format]['status'] = $value['status'];
2749
  }
2750
+ if ( array_key_exists('lastline', $video_entry['encode_formats'][$format]) ) {
2751
+ $video_formats[$format]['lastline'] = $video_entry['encode_formats'][$format]['lastline'];
2752
+ }
2753
  }
2754
  $video_queued = true;
2755
  break;
2763
 
2764
  if ( strpos($post_mime_type, $format) !== false ) { continue; } //skip webm or ogv checkbox if the video is webm or ogv
2765
 
 
 
 
 
 
 
2766
  if ( empty($movieurl) ) { $disabled[$format] = ' disabled title="Please enter a valid video URL"'; }
2767
 
2768
  if ( !array_key_exists('status', $format_stats) ) { $format_stats['status'] = "notchecked"; } //if this video isn't in the queue
2769
 
 
 
 
2770
  if ( $format_stats['status'] == "lowres" ||
2771
  (
2772
  $actualheight != "" && ($format == "1080" || $format == "720") &&
2773
  (
2774
  ( strpos($post_mime_type, "mp4") !== false && $actualheight <= $format_stats['height'] ) ||
2775
+ ( strpos($post_mime_type, "mp4") === false && $actualheight < $format_stats['height'] )
 
2776
  )
2777
  )
2778
  ) { continue; } //if the format is bigger than the original video, skip the checkbox
2779
 
2780
+ if ( !empty($encodevideo_info) && !$encodevideo_info[$format]['exists'] && strpos($format, 'custom_') === 0 ) { continue; } //skip custom formats that don't exist
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2781
 
2782
+ if ( !array_key_exists('lastline', $format_stats) ) { $format_stats['lastline'] = ''; }
2783
+ $meta_array = kgvid_encode_format_meta($encodevideo_info, $video_key, $format, $format_stats['status'], $format_stats['lastline'], $post_id, $movieurl, $page);
2784
 
2785
+ if ( $meta_array['something_to_encode'] == true ) { $something_to_encode = true; }
2786
+ if ( $meta_array['encoding_now'] == true ) { $encoding_now = true; }
2787
 
2788
+ $checkboxes .= "\n\t\t\t".'<li><input class="kgvid_encode_checkbox" type="checkbox" id="attachments-'.$post_id.'-kgflashmediaplayer-encode'.$format.'" name="attachments['.$post_id.'][kgflashmediaplayer-encode'.$format.']" '.$meta_array['checked'].' '.$ffmpeg_disabled_text.$meta_array['disabled'].'> <label for="attachments-'.$post_id.'-kgflashmediaplayer-encode'.$format.'">'.$format_stats['name'].'</label> <span id="attachments-'.$post_id.'-kgflashmediaplayer-meta'.$format.'" class="kgvid_format_meta">'.$meta_array['meta'].'</span>';
 
 
 
 
 
 
2789
 
2790
+ if ( $is_attachment && empty($meta_array['disabled']) && $format != 'fullres' && $blog_id == false ) { $checkboxes .= "<span id='pick-".$post_id."-".$format."' class='button-secondary kgvid_encode_checkbox_button' data-choose='".sprintf( __('Choose %s', 'video-embed-thumbnail-generator'), $format_stats['name'] )."' data-update='".sprintf( __('Set as %s', 'video-embed-thumbnail-generator'), $format_stats['name'] )."' onclick='kgvid_pick_format(this, \"".$post_id."\", \"".esc_attr($format_stats['mime'])."\", \"".$format."\", \"".esc_attr($movieurl)."\");'>".__('Choose from Library', 'video-embed-thumbnail-generator')."</span>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2791
  }
2792
  $checkboxes .= '</li>';
2793
 
2821
  if ( !$encoding_now && ($last_format['status'] == "queued" || $last_format['status'] == "canceling") ) {
2822
  $checkboxes .= '<script type="text/javascript">percent_timeout = setTimeout(function(){ kgvid_redraw_encode_checkboxes("'.$video_entry['movieurl'].'", "'.$video_entry['attachmentID'].'", "'.$page.'") }, 5000); jQuery(\'#wpwrap\').data("KGVIDCheckboxTimeout", percent_timeout);</script>';
2823
  }
2824
+
2825
+ if ( $encoding_now ) {
2826
+ $checkboxes .= '<script type="text/javascript">percent_timeout = setTimeout(function(){ kgvid_update_encode_queue() }, 5000);</script>';
2827
+ }
2828
  }
2829
  $checkboxes .= '</div>'; //close encodeboxes div
2830
 
2865
  $current_user = wp_get_current_user();
2866
  $video_encode_queue = kgvid_get_encode_queue();
2867
 
2868
+ $crons = _get_cron_array();
2869
+
2870
+ if ( $crons ) {
2871
+ foreach ( $crons as $timestamp => $cron_job ) {
2872
+ if ( is_array($cron_job) && array_key_exists('kgvid_cron_new_attachment', $cron_job) ) {
2873
+ foreach ( $cron_job['kgvid_cron_new_attachment'] as $id => $cron_info ) {
2874
+ if ( is_array($cron_info) && array_key_exists('args', $cron_info) ) {
2875
+ $post = get_post($cron_info['args'][0]);
2876
+ if ( $post ) {
2877
+ $video_encode_queue[] = array(
2878
+ 'attachmentID' => $post->ID,
2879
+ 'parent_id' => $post->post_parent,
2880
+ 'movieurl' => wp_get_attachment_url( $post->ID ),
2881
+ 'encode_formats' => 'temp'
2882
+ );
2883
+ }
2884
+ }
2885
+ }
2886
+ }
2887
+ }
2888
+ }
2889
+
2890
  if ( is_network_admin() || 'network' == $scope ) { $total_columns = 8; }
2891
  else { $total_columns = 7; }
2892
 
2899
  $html .= "<input type='hidden' name='attachments[kgflashmediaplayer-security]' value='".$nonce."' />";
2900
 
2901
  foreach ( $video_encode_queue as $order => $video_entry ) {
2902
+
2903
  $html .= "\t<tr id='tr_".$video_entry['attachmentID']."'";
 
2904
 
2905
+ if ( is_array($video_entry['encode_formats']) ) {
2906
+ foreach ( $video_formats as $format => $format_stats ) {
2907
 
2908
+ if ( array_key_exists($format, $video_entry['encode_formats']) && array_key_exists('status', $video_entry['encode_formats'][$format]) ) {
2909
+
2910
+ if ( $video_entry['encode_formats'][$format]['status'] == "encoding" ) {
2911
+ $currently_encoding[$order] = true;
2912
+ break;
2913
+ }
2914
+ else if ( $video_entry['encode_formats'][$format]['status'] == "queued" ) {
2915
+ $queued[$order] = true;
2916
+ }
2917
+ else {
2918
+ if ( !array_key_exists($order, $currently_encoding) ) { $currently_encoding[$order] = false; }
2919
+ if ( !array_key_exists($order, $queued) ) { $queued[$order] = false; }
2920
+ }
2921
 
2922
+ }
2923
  }
2924
  }
2925
+ else {
2926
+ $currently_encoding[$order] = false;
2927
+ $queued[$order] = false;
2928
+ }
2929
 
2930
  if ( $currently_encoding[$order] ) { $html .= " class='currently_encoding' "; }
2931
  elseif ( $queued[$order] ) { $html .= " class='kgvid_queued' "; }
2944
  $post = get_post( $video_entry['attachmentID'] );
2945
 
2946
  if ( ( is_network_admin() || 'network' == $scope )
2947
+ || ( $post && $current_user->ID == $post->post_author )
2948
  || ( current_user_can('edit_others_video_encodes') && ( $blog_id && get_current_blog_id() == $blog_id || !$blog_id ) )
2949
  ) {
2950
 
2951
+ if ( $post ) {
2952
+ $user = get_userdata( $post->post_author );
2953
+ $html .= "<td>".$user->display_name."</td>\n";
2954
+ }
2955
+ else { $html .= "<td></td>\n"; }
2956
 
2957
  //Site
2958
  if ( (is_network_admin() || 'network' == $scope) && $blog_id ) {
2968
  }
2969
 
2970
  //File
2971
+ if ( $post && $post->post_type == "attachment" ) {
2972
  $moviefilepath = get_attached_file($video_entry['attachmentID']);
2973
  $attachmentlink = get_admin_url()."post.php?post=".$video_entry['attachmentID']."&action=edit";
2974
  }
2985
  $html .= "\t\t\t\t\t<td class='queue_encode_formats' id='formats_".$video_entry['attachmentID']."'>";
2986
  $html .= "<input type='hidden' id='attachments-".$video_entry['attachmentID']."-kgflashmediaplayer-security' name='attachments[".$video_entry['attachmentID']."][kgflashmediaplayer-security]' value='".$nonce."' />";
2987
 
2988
+ if ( is_array($video_entry['encode_formats']) ) { $checkboxes = kgvid_generate_encode_checkboxes($video_entry['movieurl'], $video_entry['attachmentID'], 'queue', $blog_id); }
2989
+ else { $checkboxes = array('checkboxes' => __('Please wait while this video is automatically added to the queue...', 'video-embed-thumbnail-generator') ); }
2990
  $html .= $checkboxes['checkboxes'];
2991
  $html .= "</td>\n";
2992
 
3036
  <form method="post" action="tools.php?page=kgvid_video_encoding_queue">
3037
  <?php wp_nonce_field('video-embed-thumbnail-generator-nonce','video-embed-thumbnail-generator-nonce'); ?>
3038
 
3039
+ <table class="widefat" id="kgvid_encode_queue_table">
3040
  <thead>
3041
  <?php echo kgvid_generate_queue_table_header(); ?>
3042
  </thead>
3048
  </tbody>
3049
  </table>
3050
  <p>
3051
+ <?php if ( current_user_can('edit_others_video_encodes') ) { echo "<div class='attachment-info'><div class='actions'><a href='javascript:void(0)' onclick='kgvid_encode_queue(\"clear_completed\", 0, 0);'>". __('Clear All Completed', 'video-embed-thumbnail-generator') ."</a> | <a href='javascript:void(0)' onclick='kgvid_encode_queue(\"clear_queued\", 0, 0);'>". __('Clear All Queued', 'video-embed-thumbnail-generator') ."</a></div></div>"; } ?>
3052
  </p>
3053
  </form>
3054
  </div>
3055
  <?php
3056
+
3057
+ kgvid_encode_videos();
3058
+
3059
  }
3060
 
3061
  function kgvid_add_network_settings_page() {
3303
  add_settings_field('endofvideooverlay', __('End of video image:', 'video-embed-thumbnail-generator'), 'kgvid_endofvideooverlay_callback', __FILE__, 'kgvid_video_embed_playback_settings' );
3304
  add_settings_field('watermark', __('Watermark overlay:', 'video-embed-thumbnail-generator'), 'kgvid_watermark_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'watermark' ) );
3305
  add_settings_field('align', __('Video alignment:', 'video-embed-thumbnail-generator'), 'kgvid_align_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'align' ) );
3306
+ add_settings_field('resize', __('Automatically adjust videos:', 'video-embed-thumbnail-generator'), 'kgvid_resize_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'resize' ) );
 
3307
  add_settings_field('dimensions', __('Max embedded video dimensions:', 'video-embed-thumbnail-generator'), 'kgvid_dimensions_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'width' ) );
3308
+ add_settings_field('gallery_options', __('Video gallery:', 'video-embed-thumbnail-generator'), 'kgvid_video_gallery_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'gallery_width' ) );
 
 
3309
  add_settings_field('controlbar_style', __('Video controls:', 'video-embed-thumbnail-generator'), 'kgvid_controlbar_style_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'controlbar_style' ) );
3310
  add_settings_field('autoplay', __('Autoplay:', 'video-embed-thumbnail-generator'), 'kgvid_autoplay_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'autoplay' ) );
3311
  add_settings_field('loop', _x('Loop:', 'verb', 'video-embed-thumbnail-generator'), 'kgvid_loop_callback', __FILE__, 'kgvid_video_embed_playback_settings', array( 'label_for' => 'loop' ) );
3436
 
3437
  function kgvid_watermark_callback() {
3438
  $options = kgvid_get_options();
3439
+ echo __('Image:', 'video-embed-thumbnail-generator')." <input class='regular-text affects_player' id='watermark' name='kgvid_video_embed_options[watermark]' type='text' value='".$options['watermark']."' /> <span id='pick-watermark' class='button-secondary' data-choose='".__('Choose a Watermark', 'video-embed-thumbnail-generator')."' data-update='".__('Set as watermark', 'video-embed-thumbnail-generator')."' data-change='watermark' onclick='kgvid_pick_image(this);'>".__('Choose from Library', 'video-embed-thumbnail-generator')."</span><br />";
3440
+ echo __('Link to:', 'video-embed-thumbnail-generator').' ';
3441
+ $items = array(
3442
+ __("Home page", 'video-embed-thumbnail-generator') => "home",
3443
+ __("Parent post", 'video-embed-thumbnail-generator') => "parent",
3444
+ __("Video attachment page", 'video-embed-thumbnail-generator') => "attachment",
3445
+ __("Download video", 'video-embed-thumbnail-generator') => "download",
3446
+ __("Custom URL", 'video-embed-thumbnail-generator') => "custom",
3447
+ __("None", 'video-embed-thumbnail-generator') => "false"
3448
+ );
3449
+
3450
+ echo "<select class='affects_player' onchange='kgvid_hide_watermark_url(this);' id='watermark_link_to' name='kgvid_video_embed_options[watermark_link_to]'>";
3451
+ foreach($items as $name => $value) {
3452
+ $selected = ($options['watermark_link_to']==$value) ? 'selected="selected"' : '';
3453
+ echo "<option value='$value' $selected>$name</option>";
3454
+ }
3455
+ echo "</select>\n\t";
3456
+ echo " <input ";
3457
+ if ( $options['watermark_link_to'] != 'custom' ) {
3458
+ echo "style='display:none;' ";
3459
+ $options['watermark_url'] = '';
3460
+ }
3461
+ echo "class='regular-text affects_player' id='watermark_url' name='kgvid_video_embed_options[watermark_url]' type='text' value='".$options['watermark_url']."' />\n\t";
3462
  }
3463
 
3464
  function kgvid_align_callback() {
3475
  function kgvid_resize_callback() {
3476
  $options = kgvid_get_options();
3477
  echo "<input ".checked( $options['resize'], "on", false )." id='resize' name='kgvid_video_embed_options[resize]' type='checkbox' /> <label for='resize'>".__('Make video player responsive.', 'video-embed-thumbnail-generator')."</label><br />";
3478
+ $items = array( __("automatic", 'video-embed-thumbnail-generator'), __("highest", 'video-embed-thumbnail-generator'), __("lowest", 'video-embed-thumbnail-generator') );
3479
+ echo __('Default playback resolution', 'video-embed-thumbnail-generator')." <select id='auto_res' name='kgvid_video_embed_options[auto_res]'>";
3480
+ foreach($items as $name ) {
3481
+ $selected = ($options['auto_res']==$name) ? 'selected="selected"' : '';
3482
+ echo "<option value='$name' $selected>$name</option>";
3483
+ }
3484
+ echo "</select> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('If multiple H.264 resolutions for a video are available, you can choose to load the highest or lowest available resolution by default, or automatically select the resolution based on the size of the video window.', 'video-embed-thumbnail-generator')."</span></a>\n\t";
3485
 
 
 
 
3486
  }
3487
 
3488
  function kgvid_dimensions_callback() {
3489
  $options = kgvid_get_options();
3490
  echo __('Width:', 'video-embed-thumbnail-generator')." <input class='small-text affects_player' id='width' name='kgvid_video_embed_options[width]' type='text' value='".$options['width']."' /> ".__('Height:', 'video-embed-thumbnail-generator')." <input class='small-text affects_player' id='height' name='kgvid_video_embed_options[height]' type='text' value='".$options['height']."' /><br />";
3491
  echo "<input ".checked( $options['minimum_width'], "on", false )." id='minimum_width' name='kgvid_video_embed_options[minimum_width]' type='checkbox' /> <label for='minimum_width'>".__('Enlarge lower resolution videos to max width.', 'video-embed-thumbnail-generator')."</label> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('Usually if a video\'s resolution is less than the max width, the video player is set to the actual width of the video. Enabling this will always set the same width regardless of the quality of the video. When necessary you can override by setting the dimensions manually.', 'video-embed-thumbnail-generator')."</span></a><br />";
3492
+ echo "<input ".checked( $options['fullwidth'], "on", false )." id='fullwidth' name='kgvid_video_embed_options[fullwidth]' type='checkbox' /> <label for='fullwidth'>".__('Set all videos to expand to fill their containers.', 'video-embed-thumbnail-generator')."</label> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('Enabling this will ignore any other width settings and set the width of the video to the width of the container it\'s in.', 'video-embed-thumbnail-generator')."</span></a><br />";
3493
+ echo "<input ".checked( $options['inline'], "on", false )." id='inline' name='kgvid_video_embed_options[inline]' type='checkbox' /> <label for='inline'>".__('Allow other content on the same line as the video.', 'video-embed-thumbnail-generator')."</label>\n\t";
 
 
 
 
3494
  }
3495
 
3496
+ function kgvid_video_gallery_callback() {
3497
  $options = kgvid_get_options();
3498
+ echo __('Maximum popup width:', 'video-embed-thumbnail-generator')." <input class='small-text' id='gallery_width' name='kgvid_video_embed_options[gallery_width]' type='text' value='".$options['gallery_width']."' /><br />";
3499
+ echo __('Thumbnail width:', 'video-embed-thumbnail-generator')." <input class='small-text' id='gallery_thumb' name='kgvid_video_embed_options[gallery_thumb]' type='text' value='".$options['gallery_thumb']."' /><br />";
3500
 
 
 
3501
  $items = array();
3502
  $items = array(
3503
  __('Stop, but leave popup window open', 'video-embed-thumbnail-generator') => "",
3508
  $selected = ($options['gallery_end']==$value) ? 'selected="selected"' : '';
3509
  echo "<option value='$value' $selected>$name</option>";
3510
  }
3511
+ echo "</select> ". __('when current gallery video finishes.', 'video-embed-thumbnail-generator')."<br />";
3512
+ echo " <input ".checked( $options['gallery_pagination'], "on", false )." id='gallery_pagination' name='kgvid_video_embed_options[gallery_pagination]' onchange='kgvid_hide_paginate_gallery_setting(this)' type='checkbox' /> <label for='gallery_pagination'>".__('Paginate video galleries.', 'video-embed-thumbnail-generator')."</label> ";
3513
+ echo "<span ";
3514
+ if ( $options['gallery_pagination'] != 'on' ) { echo "style='display:none;' "; }
3515
+ echo "id='gallery_per_page_span'><input class='small-text' id='gallery_per_page' name='kgvid_video_embed_options[gallery_per_page]' type='text' value='".$options['gallery_per_page']."' /> ".__('videos per gallery page.', 'video-embed-thumbnail-generator')."</span><br />";
3516
+ echo " <input ".checked( $options['gallery_title'], "on", false )." id='gallery_title' name='kgvid_video_embed_options[gallery_title]' type='checkbox' /> <label for='gallery_title'>".__('Show video title overlay on thumbnails.', 'video-embed-thumbnail-generator')."</label>\n\t";
3517
+
3518
  }
3519
 
3520
  function kgvid_controlbar_style_callback() {
3649
  $capabilities = array( 'make_video_thumbnails'=>__('Can make thumbnails', 'video-embed-thumbnail-generator'), 'encode_videos'=>__('Can encode videos', 'video-embed-thumbnail-generator'), 'edit_others_video_encodes' => __('Can view & modify other users encode queue', 'video-embed-thumbnail-generator') );
3650
  foreach ( $capabilities as $capability => $capability_name ) {
3651
  $capabilities_checkboxes[] = "<div class='kgvid_user_roles'><strong>".$capability_name.":</strong><br>";
 
3652
 
3653
+ if ( is_object($wp_roles) && property_exists($wp_roles, 'roles') ) {
3654
+
3655
+ foreach ( $wp_roles->roles as $role => $role_info ) {
3656
+
3657
+ $capability_enabled = false;
3658
+ if ( $page_scope == 'network' ) {
3659
+ $option_name = 'default_capabilities';
3660
+ if ( array_key_exists('default_capabilities', $options)
3661
+ && array_key_exists($capability, $options['default_capabilities'])
3662
+ && array_key_exists($role, $options['default_capabilities'][$capability])
3663
+ && $options['default_capabilities'][$capability][$role] == "on" ) {
3664
+ $capability_enabled = true;
3665
+ }
3666
  }
3667
+ else {
3668
+ $option_name = 'capabilities';
3669
+ if ( is_array($wp_roles->roles[$role]['capabilities']) && array_key_exists($capability, $wp_roles->roles[$role]['capabilities'])
3670
+ && $wp_roles->roles[$role]['capabilities'][$capability] == 1 ) {
3671
+ $capability_enabled = true;
3672
+ }
3673
  }
3674
+ $capabilities_checkboxes[] = "<input type='checkbox' ".checked( $capability_enabled, true, false )." id='capability-".$capability."-".$role."' name='kgvid_video_embed_options[".$option_name."][".$capability."][".$role."]'> <label for='capability-".$capability."-".$role."'>".translate_user_role($role_info['name'])."</label><br>";
3675
+
3676
+ } //role loop
3677
+
3678
+ }
3679
 
 
3680
  $capabilities_checkboxes[] = "</div>";
3681
  }// capability loop
3682
  echo implode("", $capabilities_checkboxes)."\n\t";
3687
  if ( $options['embeddable'] != "on" ) { $embed_disabled = " disabled='disabled'"; }
3688
  else { $embed_disabled = ""; }
3689
  echo "<input class='affects_player' ".checked( $options['embeddable'], "on", false )." id='embeddable' name='kgvid_video_embed_options[embeddable]' type='checkbox' onclick='kgvid_embeddable_switch(this.checked);' /> <label for='embeddable'>".__('Allow users to embed your videos on other sites.', 'video-embed-thumbnail-generator')."</label><br />";
3690
+ echo "<input ".checked( $options['open_graph'], "on", false )." id='open_graph' name='kgvid_video_embed_options[open_graph]' type='checkbox'".$embed_disabled." /> <label for='open_graph'>"._x('Enable Open Graph video tags.', '"Open Graph" is a proper noun and might not need translation', 'video-embed-thumbnail-generator')."</label><a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('Facebook and some other social media sites will use these tags to embed the first video in your post. For the majority of Facebook users who have enabled secure browsing, your video must be served via https in order to be embedded directly on the page.', 'video-embed-thumbnail-generator')."</span></a><br />";
3691
+ echo "<input ".checked( $options['oembed_provider'], "on", false )." id='oembed_provider' name='kgvid_video_embed_options[oembed_provider]' type='checkbox'".$embed_disabled." /> <label for='oembed_provider'>"._x('Enable oEmbed provider.', '"oEmbed" is a proper noun and might not need translation', 'video-embed-thumbnail-generator')."</label><a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('Allows users of other websites to embed your videos using just the post URL rather than the full iframe embed code. For security reasons, this will not work on other WordPress sites unless they\'ve enabled oEmbed discovery from unkown providers.', 'video-embed-thumbnail-generator')."</span></a><br />";
3692
+ echo "<input ".checked( $options['oembed_security'], "on", false )." id='oembed_security' name='kgvid_video_embed_options[oembed_security]' type='checkbox' /> <label for='oembed_security'>"._x('Enable oEmbeds from unknown providers.', '"oEmbed" is a proper noun and might not need translation', 'video-embed-thumbnail-generator')."</label><a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('Allows your own users to embed content from any oEmbed provider. User must have the "unfiltered_html" capability which is limited to Administrators and Editors by default.', 'video-embed-thumbnail-generator')."</span></a><br />";
3693
+ echo "<input class='affects_player' ".checked( $options['right_click'], "on", false )." id='right_click' name='kgvid_video_embed_options[right_click]' type='checkbox' /> <label for='right_click'>".__('Allow right-clicking on videos.', 'video-embed-thumbnail-generator')."</label> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('We can\'t prevent a user from simply saving the downloaded video file from the browser\'s cache, but disabling right-clicking will make it more difficult for casual users to save your videos.', 'video-embed-thumbnail-generator')."</span></a><br />";
3694
+ echo "<input ".checked( $options['click_download'], "on", false )." id='click_download' name='kgvid_video_embed_options[click_download]' type='checkbox' /> <label for='click_download'>".__('Allow single-click download link for videos.', 'video-embed-thumbnail-generator')."</label> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('The plugin creates a one-click method for users who want to allow easy video downloading, but if some of your videos are hidden or private, depending on the methods you use, someone who guesses a video\'s WordPress database ID could potentially use the method to download videos they might not otherwise have access to.', 'video-embed-thumbnail-generator')."</span></a>\n\t";
3695
  }
3696
 
3697
  function kgvid_featured_callback() {
3793
  echo "</select> ";
3794
 
3795
 
3796
+ echo "</label> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('If you have FFMPEG/LIBAV and the proper libraries installed, you can choose to replace your uploaded video with your preferred format, and also transcode into as many as seven additional formats depending on the resolution of your original source. Different browsers have different playback capabilities. Most desktop browsers can play H.264, and all modern mobile devices can play at least 360p H.264. If you create multiple H.264 resolutions, the highest resolution supported by the device will be served up automatically. The plugin will not upconvert your video, so if you upload a 720p video, it will not waste your time creating a 1080p version. There was a time when it seemed like a good idea to provide OGV or WEBM for some desktop browsers, but even Firefox allows H.264 playback on most operating systems now. I no longer recommend encoding OGV or WEBM unless you expect a large number of no-Flash sticklers visiting your site. WEBM VP9 is a new technology and requires a version of FFMPEG or LIBAV newer than October 2013.', 'video-embed-thumbnail-generator')."</span></a><br />";
3797
+ echo "<input ".checked( $options['encode_1080'], "on", false )." id='encode_1080' name='kgvid_video_embed_options[encode_1080]' type='checkbox' /> <label for='encode_1080'>1080p H.264 <small><em>".__('(iPhone 4s+, iPad 2+, modern Android, Windows Phone 8, Chrome, Safari, IE 9+, Firefox)', 'video-embed-thumbnail-generator')."</em></small></label><br />";
3798
+ echo "<input ".checked( $options['encode_720'], "on", false )." id='encode_720' name='kgvid_video_embed_options[encode_720]' type='checkbox' /> <label for='encode_720'>720p H.264 <small><em>".__('(iPhone 4+, iPad, most Android, Chrome, Safari, IE 9+, Firefox)', 'video-embed-thumbnail-generator')."</em></small></label><br />";
3799
+ echo "<input ".checked( $options['encode_mobile'], "on", false )." id='encode_mobile' name='kgvid_video_embed_options[encode_mobile]' type='checkbox' /> <label for='encode_mobile'>360p H.264 <small><em>(iOS, Android, Windows Phone 7+, Chrome, Safari, IE 9+, Firefox)</em></small></label><br />";
3800
  echo "<input ".checked( $options['encode_webm'], "on", false )." id='encode_webm' name='kgvid_video_embed_options[encode_webm]' type='checkbox' /> <label for='encode_webm'>WEBM <small><em>(Firefox, Chrome, Android 2.3+, Opera)</em></small></label><br />";
3801
+ echo "<input ".checked( $options['encode_vp9'], "on", false )." id='encode_vp9' name='kgvid_video_embed_options[encode_vp9]' type='checkbox' /> <label for='encode_vp9'>WEBM VP9 <small><em>(Firefox, Chrome, Opera)</em></small></label><br />";
3802
  echo "<input ".checked( $options['encode_ogg'], "on", false )." id='encode_ogg' name='kgvid_video_embed_options[encode_ogg]' type='checkbox' /> <label for='encode_ogg'>OGV <small><em>(Firefox, Chrome, Android 2.3+, Opera)</em></small></label><br />";
3803
  echo "<input ".checked( $options['encode_custom'], "on", false )." id='encode_custom' name='kgvid_video_embed_options[encode_custom]' type='checkbox' /> <label for='encode_custom'>Custom";
3804
  $items = array( "H.264" => "h264" , "WEBM" => "webm", "OGV" => "ogg" );
3899
 
3900
  function kgvid_moov_callback() {
3901
  $options = kgvid_get_options();
3902
+ if ( empty($options['moov_path']) ) { $options['moov_path'] = $options['app_path']; }
3903
  echo "<div class='kgvid_video_app_required'>";
3904
  $items = array(__("none", 'video-embed-thumbnail-generator')=>"none", "movflags faststart"=>"movflag", "qt-faststart"=>"qt-faststart", "MP4Box"=>"MP4Box");
3905
  echo "<select onchange='kgvid_hide_plugin_settings()' id='moov' name='kgvid_video_embed_options[moov]' class='affects_ffmpeg'>";
3908
  echo "<option value='$value' $selected>$name</option>";
3909
  }
3910
  echo "</select> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".sprintf( __('By default %1$s places moov atoms at the end of H.264 encoded files, which forces the entire file to download before playback can start and can prevent Flash players from playing them at all. Since approximately October 2012 %1$s can fix the problem at the end of the encoding process by using the option `movflags faststart`. This is the easiest and fastest way to correct the problem, but older versions of %1$s will not work if you select the movflags option. If you can\'t update to a new version of %1$s, select qt-faststart or MP4Box which will run after encoding is finished if they are installed on your server.', 'video-embed-thumbnail-generator'), "<strong class='video_app_name'>".strtoupper($options['video_app'])."</strong>")."</span></a>";
3911
+ echo "<p id='moov_path_p'>".sprintf( __('Path to %s:', 'video-embed-thumbnail-generator'), "<span class='kgvid_moov_option'>".$options['moov']."</span>")." <input class='regular-text code affects_ffmpeg' id='moov_path' name='kgvid_video_embed_options[moov_path]' type='text' value='".$options['moov_path']."' /></p>";
3912
  echo "</div>\n\t";
3913
  }
3914
 
4003
  $options = kgvid_get_options();
4004
  echo "<div class='kgvid_video_app_required'>";
4005
  echo "<input class='affects_ffmpeg' onchange='if(jQuery(\"#ffmpeg_vpre\").attr(\"checked\")==\"checked\"){jQuery(\"#video_bitrate_flag\").attr(\"checked\", \"checked\"); jQuery(\"#nostdin\").removeAttr(\"checked\");}' ".checked( $options['video_bitrate_flag'], "on", false )." id='video_bitrate_flag' name='kgvid_video_embed_options[video_bitrate_flag]' type='checkbox' /> <label for='video_bitrate_flag'>".__('Enable legacy FFMPEG "-b" and "-ba" bitrate flags.', 'video-embed-thumbnail-generator')."</label> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('Enable if your installed version of FFMPEG is old enough that you can\'t use the newer -b:v flags (Dreamhost users must turn this on). It may cause newer versions of FFMPEG to fail.', 'video-embed-thumbnail-generator')."</span></a><br />";
4006
+ echo "<input class='affects_ffmpeg' onchange='if(jQuery(\"#ffmpeg_vpre\").attr(\"checked\")==\"checked\"){jQuery(\"#video_bitrate_flag\").attr(\"checked\", \"checked\"); jQuery(\"#nostdin\").removeAttr(\"checked\");}' ".checked( $options['ffmpeg_vpre'], "on", false )." id='ffmpeg_vpre' name='kgvid_video_embed_options[ffmpeg_vpre]' type='checkbox' /> <label for='ffmpeg_vpre'>".__('Enable legacy libx264 parameters.', 'video-embed-thumbnail-generator')."</label> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('Enable if your installed version of FFMPEG is old enough that libx264 requires additional configuration to operate (Dreamhost users must turn this on). This should help if you can encode WEBM or OGV files but H264/Mobile files fail. It could cause newer versions of FFMPEG to fail.', 'video-embed-thumbnail-generator')."</span></a><br />";
4007
+ echo "<input class='affects_ffmpeg' ".checked( $options['ffmpeg_old_rotation'], "on", false )." id='ffmpeg_old_rotation' name='kgvid_video_embed_options[ffmpeg_old_rotation]' type='checkbox' /> <label for='ffmpeg_old_rotation'>".__('Enable legacy FFMPEG rotation method.', 'video-embed-thumbnail-generator')."</label> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('Enable if vertical videos shot on mobile devices don\'t rotate correctly or generate errors. If legacy libx264 paramaters are necessary, rotation won\'t work at all.', 'video-embed-thumbnail-generator')."</span></a><br />";
4008
  echo "<input class='affects_ffmpeg' ".checked( $options['nostdin'], "on", false )." id='nostdin' name='kgvid_video_embed_options[nostdin]' type='checkbox' /> <label for='nostdin'>".__('Disable stdin.', 'video-embed-thumbnail-generator')."</label> <a class='kgvid_tooltip wp-ui-text-highlight' href='javascript:void(0);'><span class='kgvid_tooltip_classic'>".__('Turn off this checkbox if your installed version of FFMPEG is old enough that it does not recognize the nostdin flag (Dreamhost users must turn this off).', 'video-embed-thumbnail-generator')."</span></a>";
4009
  echo "</div>\n\t";
4010
  }
4042
  $movie_info = kgvid_get_video_dimensions(plugin_dir_path(__FILE__)."images/sample-video-h264.mp4");
4043
  $uploads = wp_upload_dir();
4044
  $encode_dimensions = kgvid_set_encode_dimensions($movie_info, $video_formats[$options['sample_format']]);
4045
+ $encode_string = kgvid_generate_encode_string(plugin_dir_path(__FILE__)."images/sample-video-h264.mp4", $uploads['path']."/sample-video-h264".$video_formats[$options['sample_format']]['suffix'], $movie_info, $options['sample_format'], $encode_dimensions['width'], $encode_dimensions['height'], ' -vf "transpose=1"');
4046
  }
4047
 
4048
  if ( is_array($encode_string) ) { $encode_string_implode = implode('' , $encode_string); }
4111
  delete_option($old_setting);
4112
  }
4113
  }
4114
+ $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'wp_FMP%'" );
4115
 
4116
  foreach ( $default_options as $key => $value ) { //apply default values for any settings that didn't exist before
4117
  if ( !array_key_exists($key, $options) ) { $options[$key] = $value; }
4189
  if ( array_key_exists('embeddable', $options) && $options['embeddable'] != "on" ) { $options['open_graph'] = false; }
4190
  else { $options['open_graph'] = "on"; }
4191
 
 
 
 
 
 
 
 
 
 
 
 
 
4192
  }
4193
  if ( $options['version'] < 4.25 ) {
4194
  $options['version'] = 4.25;
4241
  $options['fullwidth'] = false;
4242
  $options['auto_res'] = 'on';
4243
  }
4244
+ if ( $options['version'] < 4.5 ) {
4245
+ $options['version'] = 4.5;
4246
+ if ( $options['auto_res'] == 'on' ) { $options['auto_res'] = 'automatic'; }
4247
+ else { $options['auto_res'] = 'highest'; }
4248
+ $options['watermark_link_to'] = 'none';
4249
+ $options['watermark_url'] = '';
4250
+ $options['encode_vp9'] = false;
4251
+ $options['gallery_pagination'] = false;
4252
+ $options['gallery_per_page'] = false;
4253
+ $options['gallery_title'] = "on";
4254
+ $options['oembed_provider'] = "on";
4255
+ $options['oembed_security'] = false;
4256
+ $options['ffmpeg_old_rotation'] = "on";
4257
+ $options['click_download'] = "on";
4258
+ }
4259
 
4260
  if ( $options['version'] != $default_options['version'] ) { $options['version'] = $default_options['version']; }
4261
  if ( $options !== $options_old ) { update_option('kgvid_video_embed_options', $options); }
4316
  add_settings_error( __FILE__, "gallery-width-zero", __("You must enter a value for the maximum gallery video width.", 'video-embed-thumbnail-generator') );
4317
  $input['gallery_width'] = $options['gallery_width'];
4318
  }
 
 
 
 
4319
 
4320
  if ( $input['capabilities'] !== $options['capabilities'] ) { kgvid_set_capabilities($input['capabilities']); }
4321
 
4356
  } // if the custom format has been set
4357
  else {
4358
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4359
  if ( $input['sample_format'] == 'custom' ) { $input['sample_format'] = 'mobile'; }
4360
 
4361
  }
4421
  $uploads = wp_upload_dir();
4422
  $video_formats = kgvid_video_formats();
4423
  $encode_dimensions = kgvid_set_encode_dimensions($movie_info, $video_formats[$validated_options['sample_format']]);
4424
+ $encode_string = kgvid_generate_encode_string(plugin_dir_path(__FILE__)."images/sample-video-h264.mp4", $uploads['path']."/sample-video-h264".$video_formats[$validated_options['sample_format']]['suffix'], $movie_info, $validated_options['sample_format'], $encode_dimensions['width'], $encode_dimensions['height'], ' -vf "transpose=1"');
4425
  $auto_thumb_label = kgvid_generate_auto_thumb_label();
4426
  }
4427
  }
4442
  $options = kgvid_get_options();
4443
 
4444
  if ( $options['auto_encode'] == "on" || $options['auto_thumb'] == "on" ) {
4445
+
4446
  $post = get_post($post_id);
4447
 
4448
  if ( substr($post->post_mime_type, 0, 5) == 'video'
4449
+ && (empty($post->post_parent)
4450
+ || (strpos(get_post_mime_type( $post->post_parent ), 'video') === false && get_post_meta($post->ID, '_kgflashmediaplayer-externalurl', true) == false)) ) {
4451
+
4452
+ wp_schedule_single_event( time() + rand(0,10), 'kgvid_cron_new_attachment', array($post_id) );
4453
+
4454
+ $transient = get_transient( 'kgvid_new_attachment_transient' ); //error checking to avoid race conditions when using Add From Server
4455
+ if ( is_array($transient) ) { $transient[] = $post_id; }
4456
+ else { $transient = array($post_id); }
4457
+ set_transient( 'kgvid_new_attachment_transient', $transient, DAY_IN_SECONDS );
4458
  }
4459
+
4460
  }
4461
+
4462
  }
4463
  add_action('add_attachment', 'kgvid_add_attachment_handler');
4464
 
4537
  $thumb_id[$key] = kgvid_save_thumb($post_id, $post->post_title, $thumb_output[$key]['thumb_url'], $index);
4538
  }//end if there wasn't an error
4539
  else {
4540
+ $kgvid_postmeta = kgvid_get_attachment_meta($post_id);
4541
+ $kgvid_postmeta['autothumb-error'] = $thumb_output[$thumb_key]['embed_display'];
4542
+ kgvid_save_attachment_meta($post_id, $kgvid_postmeta);
4543
  }
4544
 
4545
  }//end loop through generated thumbnails to save them in the database
4546
 
4547
  if ( !empty($thumb_id[$thumb_key]) ) {
4548
+ $thumb_output[$thumb_key]['thumb_url'] = wp_get_attachment_url($thumb_id[$thumb_key]);
4549
  update_post_meta($post_id, '_kgflashmediaplayer-poster', $thumb_output[$thumb_key]['thumb_url']);
4550
  update_post_meta($post_id, '_kgflashmediaplayer-poster-id', $thumb_id[$thumb_key]);
4551
  set_post_thumbnail($post_id, $thumb_id[$thumb_key]);
4555
  }//end setting main thumbnail
4556
 
4557
 
4558
+ }//end if auto_thumb is on
4559
+
4560
+ if ( $force == 'encode' || $options['auto_encode'] == "on" ) {
4561
+ $video_formats = kgvid_video_formats();
4562
+ $something_to_encode = false;
4563
+ $encode_checked = array();
4564
+ foreach ( $video_formats as $format => $format_stats ) {
4565
+ if ( array_key_exists('encode_'.$format, $options) && $options['encode_'.$format] == "on" ) {
4566
+ $encode_checked[$format] = "true";
4567
+ $something_to_encode = true;
4568
+ }
4569
+ else { $encode_checked[$format] = "notchecked"; }
4570
+ }
4571
+ if ( $something_to_encode ) {
4572
+ $output = kgvid_enqueue_videos($post_id, $movieurl, $encode_checked, $post->post_parent);
4573
+ $output = kgvid_encode_videos();
4574
+ }
4575
+ }
4576
+ }
4577
+ add_action('kgvid_cron_new_attachment', 'kgvid_cron_new_attachment_handler');
4578
+
4579
+ function kgvid_change_thumbnail_parent( $post_ID, $parent_id ) {
4580
+
4581
+ $args = array(
4582
+ 'post_type' => 'attachment',
4583
+ 'post_mime_type' => 'image',
4584
+ 'numberposts' => '-1',
4585
+ 'meta_key' => '_kgflashmediaplayer-video-id',
4586
+ 'meta_value' => $post_ID,
4587
+ );
4588
+ $thumbnails = get_posts( $args ); //find all thumbnail children of the video in the database
4589
+
4590
+ if ( $thumbnails ) {
4591
+
4592
+ foreach ( $thumbnails as $thumbnail ) {
4593
+
4594
+ if ( $thumbnail->post_parent != $parent_id ) {
4595
+
4596
+ if ( empty($parent_id) ) {
4597
+ $thumbnail->post_parent = $post_ID;
4598
+ }
4599
+
4600
+ else {
4601
+ $thumbnail->post_parent = $parent_id;
4602
+ }
4603
+
4604
+ wp_update_post( $thumbnail );
4605
+ }
4606
+
4607
+ }//end loop through thumbnails
4608
+
4609
+ }//end if thumbnails
4610
+
4611
+ }
4612
+
4613
+ function kgvid_upload_page_change_thumbnail_parent( $location ) {
4614
+
4615
+ if( ! is_admin() ) { return $location; }
4616
+
4617
+ global $pagenow;
4618
+ $options = kgvid_get_options();
4619
+
4620
+ if ( 'upload.php' == $pagenow
4621
+ && isset( $_REQUEST['media'] )
4622
+ && is_array( $_REQUEST['media'] )
4623
+ && $options['thumb_parent'] == 'post'
4624
+ ) {
4625
+
4626
+ if ( isset( $_REQUEST['found_post_id'] ) ) { $parent_id = (int) $_REQUEST['found_post_id']; }
4627
+ else { $parent_id = 0; }
4628
+
4629
+ foreach ( $_REQUEST['media'] as $post_ID ) {
4630
+
4631
+ kgvid_change_thumbnail_parent( $post_ID, $parent_id );
4632
+
4633
+ }//end loop through modified attachments
4634
+
4635
+ }//end if changed parent
4636
+
4637
+ return $location;
4638
+
4639
+ }
4640
+ add_filter( 'wp_redirect', 'kgvid_upload_page_change_thumbnail_parent' ); //when attachment parent is manually changed on the Media Library page
4641
+
4642
+ function kgvid_validate_post_updated( $post_ID ) {
4643
+
4644
+ $options = kgvid_get_options();
4645
+ $post = get_post($post_ID);
4646
+
4647
+ if ( $options['thumb_parent'] == 'post'
4648
+ && substr($post->post_mime_type, 0, 5) == 'video'
4649
+ && ( empty($post->post_parent)
4650
+ || (strpos(get_post_mime_type( $post->post_parent ), 'video') === false && get_post_meta($post->ID, '_kgflashmediaplayer-externalurl', true) == '' )
4651
+ )
4652
+ ) { //if the attachment is a video with no parent or if it has a parent the parent is not a video and the video doesn't have the externalurl post meta
4653
+
4654
+ kgvid_change_thumbnail_parent( $post_ID, $post->post_parent );
4655
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4656
  }
4657
+
4658
  }
4659
+ add_action( 'edit_attachment', 'kgvid_validate_post_updated' );
4660
 
4661
  /**
4662
  * Adding our custom fields to the $form_fields array
4669
 
4670
  $options = kgvid_get_options();
4671
 
4672
+ if ( substr($post->post_mime_type, 0, 5) == 'video' &&
4673
+ ( empty($post->post_parent)
4674
+ || (strpos(get_post_mime_type( $post->post_parent ), 'video') === false && get_post_meta($post->ID, '_kgflashmediaplayer-externalurl', true) == '' )
4675
+ )
4676
  ) { //if the attachment is a video with no parent or if it has a parent the parent is not a video and the video doesn't have the externalurl post meta
4677
 
4678
  wp_enqueue_media(); //allows using the media modal in the Media Library
4682
  $field_id = kgvid_backwards_compatible($post->ID);
4683
  $movieurl = wp_get_attachment_url($post->ID);
4684
  $moviefile = get_attached_file($post->ID);
4685
+ $kgvid_postmeta = kgvid_get_attachment_meta($post->ID);
 
 
 
 
 
 
4686
 
4687
  $form_fields["kgflashmediaplayer-url"]["input"] = "hidden";
4688
  $form_fields["kgflashmediaplayer-url"]["value"] = $movieurl;
4689
 
4690
+ $video_aspect = NULL;
4691
+ $dimensions_saved = false;
4692
+ $video_meta = wp_get_attachment_metadata( $post->ID );
4693
+ if ( is_array($video_meta) && array_key_exists('width', $video_meta) && array_key_exists('height', $video_meta) ) { $video_aspect = $video_meta['height']/$video_meta['width']; }
4694
+ if ( !empty($kgvid_postmeta['width']) && !empty($kgvid_postmeta['height']) ) {
4695
+ if ( empty($video_aspect) ) { $video_aspect = $kgvid_postmeta['height']/$kgvid_postmeta['width']; }
4696
+ $dimensions_saved = true;
4697
  }
 
4698
 
4699
+ $dimension_words = array('width', 'height');
4700
+ $max = array();
4701
+ $set = array();
4702
 
4703
+ foreach ( $dimension_words as $dimension ) {
4704
 
4705
+ $max[$dimension] = $options[$dimension];
4706
+ if ( $dimensions_saved ) { $set[$dimension] = $kgvid_postmeta[$dimension]; }
4707
+ elseif ( $dimension == 'width' && $options['minimum_width'] == "on" ) { $set[$dimension] = $max[$dimension]; }
4708
+ else {
4709
+ if ( is_array($video_meta) && array_key_exists($dimension, $video_meta) && intval($video_meta[$dimension]) <= intval($max[$dimension]) ) { $set[$dimension] = $video_meta[$dimension]; }
4710
+ else { $set[$dimension] = $max[$dimension]; }
4711
+ }
4712
+ if ( !$dimensions_saved ) { $kgvid_postmeta[$dimension] = $set[$dimension]; }
4713
 
4714
+ $form_fields["kgflashmediaplayer-max".$dimension]["input"] = "hidden";
4715
+ $form_fields["kgflashmediaplayer-max".$dimension]["value"] = $max[$dimension];
 
 
 
 
 
 
 
4716
 
4717
+ }
 
4718
 
4719
  $form_fields["kgflashmediaplayer-aspect"]["input"] = "hidden";
4720
+ $form_fields["kgflashmediaplayer-aspect"]["value"] = round($set['height']/$set['width'], 5);
4721
 
4722
  $nonce = wp_create_nonce('video-embed-thumbnail-generator-nonce');
4723
 
4724
+ $form_fields["views"]["label"] = __('Video Stats', 'video-embed-thumbnail-generator');
 
 
 
 
 
 
 
 
 
4725
  $form_fields["views"]["input"] = "html";
4726
+ $form_fields["views"]["html"] = sprintf( _n('%d Start', '%d Starts', intval($kgvid_postmeta['starts']), 'video-embed-thumbnail-generator'), intval($kgvid_postmeta['starts']) ).', '.sprintf( _n('%d Complete View', '%d Complete Views', intval($kgvid_postmeta['completeviews']), 'video-embed-thumbnail-generator'), intval($kgvid_postmeta['completeviews']) ).'<br />'.__('Video ID:', 'video-embed-thumbnail-generator').' '.$post->ID;
4727
 
4728
  // ** Thumbnail section **//
4729
 
4730
  $thumbnail_url = get_post_meta($post->ID, "_kgflashmediaplayer-poster", true);
4731
 
4732
  $thumbnail_html = "";
4733
+ if ( !empty($kgvid_postmeta['autothumb-error']) ) {
4734
+ $thumbnail_html = '<div class="kgvid_thumbnail_box kgvid_chosen_thumbnail_box">'.$kgvid_postmeta['autothumb-error'].'</div>';
4735
+ }
4736
+ elseif ($thumbnail_url != "" ) {
4737
  $thumbnail_html = '<div class="kgvid_thumbnail_box kgvid_chosen_thumbnail_box"><img width="200" src="'.$thumbnail_url.'"></div>';
4738
  }
4739
 
4740
+ if ( current_user_can('make_video_thumbnails') ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4741
 
4742
+ if ( !empty($kgvid_postmeta['thumbtime']) ) { $kgvid_postmeta['numberofthumbs'] = "1"; }
 
4743
 
4744
+ $args = array(
4745
+ 'mime_type' => 'image/jpeg',
4746
+ 'methods' => array(
4747
+ 'save'
4748
+ )
4749
+ );
4750
+ $img_editor_works = wp_image_editor_supports($args);
4751
 
4752
+ if ( !isset($options['ffmpeg_exists']) || $options['ffmpeg_exists'] == "notchecked" ) {
4753
+ kgvid_check_ffmpeg_exists($options, true);
 
 
 
 
4754
  }
4755
+ if ( $options['ffmpeg_exists'] == "notinstalled" ) { $ffmpeg_disabled_text = 'disabled="disabled" title="'.sprintf( __('%1$s not found at %2$s and unable to load video in browser for thumbnail generation.', 'video-embed-thumbnail-generator'), strtoupper($options['video_app']), $options['app_path'] ).'"'; }
4756
+ else { $ffmpeg_disabled_text = ""; }
4757
+
4758
+ $update_script = "";
4759
+ $created_time = time()-get_post_time('U', true, $post->ID);
4760
+ if ( $created_time < 60 && ($options['auto_encode'] == "on" || $options['auto_thumb'] == "on") ) {
4761
+ $update_script = '<script type="text/javascript">jQuery(document).ready(function() { ';
4762
+ if ( $options['ffmpeg_exists'] == "on" && $options['auto_encode'] == "on" ) {
4763
+ $update_script .= 'percent_timeout = setTimeout(function(){ kgvid_redraw_encode_checkboxes("'.$movieurl.'", "'.$post->ID.'", "attachment") }, 5000); jQuery(\'#wpwrap\').data("KGVIDCheckboxTimeout", percent_timeout);';
4764
+ }
4765
+ if ( $options['ffmpeg_exists'] == "on" && $options['auto_thumb'] == "on" && !$thumbnail_url ) {
4766
+ $thumbnail_html = '<div class="kgvid_thumbnail_box kgvid_chosen_thumbnail_box" style="height:112px;"><span style="margin-top: 45px;
4767
+ display: inline-block;">Loading thumbnail...</span></div>';
4768
+ $update_script .= ' setTimeout(function(){ kgvid_redraw_thumbnail_box("'.$post->ID.'") }, 5000);';
4769
+ }
4770
+ $update_script .= '});</script>';
4771
  }
 
 
4772
 
4773
+ $choose_from_video_content = "";
4774
+ $generate_content = "";
4775
+ $thumbnail_timecode = "";
4776
 
 
4777
  $moviefiletype = pathinfo($movieurl, PATHINFO_EXTENSION);
4778
  $h264compatible = array("mp4", "mov", "m4v");
4779
  if ( $moviefiletype == "mov" || $moviefiletype == "m4v" ) { $moviefiletype = "mp4"; }
4798
  $choose_from_video_content = '<div style="display:none;" class="kgvid_thumbnail_box kgvid-tabs-content" id="thumb-video-'.$post->ID.'-container">
4799
  <div class="kgvid-reveal-thumb-video" onclick="kgvid_reveal_thumb_video('.$post->ID.')" id="show-thumb-video-'.$post->ID.'"><span class="kgvid-right-arrow"></span><span class="kgvid-show-video">'.__('Choose from video...', 'video-embed-thumbnail-generator').'</span></div>
4800
  <div style="display:none;" id="thumb-video-'.$post->ID.'-player">
4801
+ <video crossorigin="anonymous" preload="metadata" class="kgvid-thumb-video" width="200" data-allowed="'.$options['browser_thumbnails'].'" onloadedmetadata="kgvid_thumb_video_loaded(\''.$post->ID.'\');" id="thumb-video-'.$post->ID.'" controls>'.
4802
  implode("\n", $sources).'
4803
  </video>
4804
  <div class="kgvid-video-controls">
4812
  </div>';
4813
  }
4814
  $generate_content = '<div id="generate-thumb-'.$post->ID.'-container" class="kgvid-tabs-content">
4815
+ <input id="attachments-'. $post->ID .'-kgflashmediaplayer-numberofthumbs" name="attachments['.$post->ID.'][kgflashmediaplayer-numberofthumbs]" type="text" value="'.$kgvid_postmeta['numberofthumbs'].'" maxlength="2" style="width:35px;text-align:center;" onchange="kgvid_disable_thumb_buttons(\''.$post->ID.'\', \'onchange\');document.getElementById(\''.$field_id['thumbtime'].'\').value =\'\';" '.$ffmpeg_disabled_text.'/>
4816
  <input type="button" id="attachments-'. $post->ID .'-thumbgenerate" class="button-secondary" value="'._x('Generate', 'Button text. Implied "Generate thumbnails"', 'video-embed-thumbnail-generator').'" name="thumbgenerate" onclick="kgvid_generate_thumb('. $post->ID .', \'generate\');" '.$ffmpeg_disabled_text.'/>
4817
  <input type="button" id="attachments-'. $post->ID .'-thumbrandomize" class="button-secondary" value="'._x('Randomize', 'Button text. Implied "Randomize thumbnail generation"', 'video-embed-thumbnail-generator').'" name="thumbrandomize" onclick="kgvid_generate_thumb('. $post->ID .', \'random\');" '.$ffmpeg_disabled_text.'/>
4818
+ <span style="white-space:nowrap;"><input type="checkbox" id="attachments-'. $post->ID .'-firstframe" name="attachments['.$post->ID.'][kgflashmediaplayer-forcefirst]" onchange="document.getElementById(\''.$field_id['thumbtime'].'\').value =\'\';" '.checked( $kgvid_postmeta['forcefirst'], 'on', false ).' '.$ffmpeg_disabled_text.'/> <label for="attachments-'. $post->ID .'-firstframe">'.__('Force 1st frame thumbnail', 'video-embed-thumbnail-generator').'</label></span></div>';
4819
 
4820
+ $thumbnail_timecode = __('Thumbnail timecode:', 'video-embed-thumbnail-generator').' <input name="attachments['. $post->ID .'][kgflashmediaplayer-thumbtime]" id="attachments-'. $post->ID .'-kgflashmediaplayer-thumbtime" type="text" value="'. $kgvid_postmeta['thumbtime'] .'" style="width:60px;"><br>';
4821
 
4822
  }
4823
 
4824
+ $form_fields["kgflashmediaplayer-autothumb-error"]["input"] = "hidden";
4825
+ $form_fields["kgflashmediaplayer-autothumb-error"]["value"] = $kgvid_postmeta['autothumb-error'];
4826
+
4827
  $form_fields["generator"]["label"] = _x("Thumbnails", 'Header for thumbnail section', 'video-embed-thumbnail-generator');
4828
  $form_fields["generator"]["input"] = "html";
4829
  $form_fields["generator"]["html"] = '<input type="hidden" name="attachments['.$post->ID.'][kgflashmediaplayer-security]" id="attachments-'.$post->ID.'-kgflashmediaplayer-security" value="'.$nonce.'" />
4830
  '.$choose_from_video_content.'
4831
  '.$generate_content.'
4832
  '.$thumbnail_timecode.'
4833
+ <div id="attachments-'.$post->ID.'-thumbnailplaceholder" style="position:relative;">'. $thumbnail_html .'</div>
4834
  <span id="pick-thumbnail" class="button-secondary" style="margin:10px 0;" data-choose="'.__('Choose a Thumbnail', 'video-embed-thumbnail-generator').'" data-update="'.__('Set as video thumbnail', 'video-embed-thumbnail-generator').'" data-change="attachments-'. $post->ID .'-kgflashmediaplayer-poster" onclick="kgvid_pick_image(this);">'.__('Choose from Library', 'video-embed-thumbnail-generator').'</span><br />
4835
+ <input type="checkbox" id="attachments-'. $post->ID .'-featured" name="attachments['.$post->ID.'][kgflashmediaplayer-featured]" '.checked( $kgvid_postmeta['featured'], 'on', false ).' '.$ffmpeg_disabled_text.'/> <label for="attachments-'. $post->ID .'-featured">'.__('Set thumbnail as featured image', 'video-embed-thumbnail-generator').'</label>'.$update_script;
4836
 
4837
  $form_fields["kgflashmediaplayer-poster"]["label"] = __("Thumbnail URL", 'video-embed-thumbnail-generator');
4838
  $form_fields["kgflashmediaplayer-poster"]["value"] = get_post_meta($post->ID, "_kgflashmediaplayer-poster", true);
4839
  $form_fields["kgflashmediaplayer-poster"]["helps"] = "<small>".sprintf( __('Leave blank to use %sdefault thumbnail', 'video-embed-thumbnail-generator'), "<a href='options-general.php?page=video-embed-thumbnail-generator/video-embed-thumbnail-generator.php' target='_blank'>" )."</a>.</small>";
4840
 
 
 
 
 
4841
  $form_fields["kgflashmediaplayer-dimensions"]["label"] = __("Video Embed Dimensions", 'video-embed-thumbnail-generator');
4842
  $form_fields["kgflashmediaplayer-dimensions"]["input"] = "html";
4843
+ $form_fields["kgflashmediaplayer-dimensions"]["html"] = __('Width:', 'video-embed-thumbnail-generator').' <input name="attachments['. $post->ID .'][kgflashmediaplayer-width]" id="attachments-'. $post->ID .'-kgflashmediaplayer-width" type="text" value="'.$kgvid_postmeta['width'].'" style="width:50px;" data-minimum="'.$options['minimum_width'].'" onchange="kgvid_set_dimension('.$post->ID.', \'height\', this.value);" onkeyup="kgvid_set_dimension('.$post->ID.', \'height\', this.value);"> '.__('Height:', 'video-embed-thumbnail-generator').'
4844
+ <input name="attachments['. $post->ID .'][kgflashmediaplayer-height]" id="attachments-'. $post->ID .'-kgflashmediaplayer-height" type="text" value="'.$kgvid_postmeta['height'].'" style="width:50px;" onchange="kgvid_set_dimension('.$post->ID.', \'width\', this.value);" onkeyup="kgvid_set_dimension('.$post->ID.', \'width\', this.value);"> <br />
4845
+ <input type="checkbox" name="attachments['. $post->ID .'][kgflashmediaplayer-lockaspect]" id="attachments-'. $post->ID .'-kgflashmediaplayer-lockaspect" onclick="kgvid_set_aspect('.$post->ID.', this.checked);" '.checked( $kgvid_postmeta['lockaspect'], 'on', false ).'>
4846
  <label for="attachments-'. $post->ID .'-kgflashmediaplayer-lockaspect"><small>'.__('Lock to aspect ratio', 'video-embed-thumbnail-generator').'</small></label>';
4847
  $form_fields["kgflashmediaplayer-dimensions"]["helps"] = "<small>".sprintf( __('Leave blank to use %sdefault dimensions', 'video-embed-thumbnail-generator'), "<a href='options-general.php?page=video-embed-thumbnail-generator/video-embed-thumbnail-generator.php' target='_blank'>" )."</a>.</small>";
4848
 
4853
  $form_fields["kgflashmediaplayer-encode"]["input"] = "html";
4854
  $form_fields["kgflashmediaplayer-encode"]["html"] = $checkboxes['checkboxes'];
4855
 
 
 
4856
  $tracks_html = '';
4857
+ if ( is_array($kgvid_postmeta['track']) ) {
4858
+ foreach ( $kgvid_postmeta['track'] as $track => $track_attribute ) {
4859
  $items = array(__("subtitles", 'video-embed-thumbnail-generator')=>"subtitles", __("captions", 'video-embed-thumbnail-generator')=>"captions", __("chapters", 'video-embed-thumbnail-generator')=>"chapters");
4860
  $track_type_select = '<select name="attachments['.$post->ID.'][kgflashmediaplayer-track]['.$track.'][kind]" id="attachments-'.$post->ID.'-kgflashmediaplayer-track_'.$track.'_kind]">';
4861
  foreach($items as $name=>$value) {
4862
+ $selected = ($kgvid_postmeta['track'][$track]['kind']==$value) ? 'selected="selected"' : '';
4863
  $track_type_select .= "<option value='$value'>$name</option>";
4864
  }
4865
  $track_type_select .= "</select>";
4867
  $tracks_html .= '<div id="kgflashmediaplayer-'.$post->ID.'-trackdiv-'.$track.'" class="kgvid_thumbnail_box kgvid_track_box"><strong>'._x('Track', 'captions track', 'video-embed-thumbnail-generator').' '.strval($track+1).'</strong><span class="kgvid_track_box_removeable" onclick="jQuery(this).parent().remove();jQuery(\'form.compat-item input\').first().change();">X</span><br />
4868
  '.__('Track type:', 'video-embed-thumbnail-generator').' '.$track_type_select.'<br />
4869
  <span id="pick-track'.$track.'" class="button-secondary" style="margin:10px 0;" data-choose="'.__('Choose a Text File', 'video-embed-thumbnail-generator').'" data-update="'.__('Set as track source', 'video-embed-thumbnail-generator').'" data-change="attachments-'. $post->ID .'-kgflashmediaplayer-track_'.$track.'_src" onclick="kgvid_pick_attachment(this);">'.__('Choose from Library', 'video-embed-thumbnail-generator').'</span><br />
4870
+ URL: <input name="attachments['. $post->ID .'][kgflashmediaplayer-track]['.$track.'][src]" id="attachments-'. $post->ID .'-kgflashmediaplayer-track_'.$track.'_src" type="text" value="'.$kgvid_postmeta['track'][$track]['src'].'" class="text" style="width:180px;"><br />
4871
+ '._x('Language code:', 'two-letter code indicating track\'s language', 'video-embed-thumbnail-generator').' <input name="attachments['. $post->ID .'][kgflashmediaplayer-track]['.$track.'][srclang]" id="attachments-'. $post->ID .'-kgflashmediaplayer-track_'.$track.'_srclang" type="text" value="'.$kgvid_postmeta['track'][$track]['srclang'].'" maxlength="2" style="width:40px;"><br />
4872
+ '.__('Label:', 'video-embed-thumbnail-generator').' <input name="attachments['. $post->ID .'][kgflashmediaplayer-track]['.$track.'][label]" id="attachments-'. $post->ID .'-kgflashmediaplayer-track_'.$track.'_label" type="text" value="'.$kgvid_postmeta['track'][$track]['label'].'" class="text" style="width:172px;"><br />
4873
+ '.__('Default:', 'video-embed-thumbnail-generator').'<input '.checked(array_key_exists('default', $kgvid_postmeta['track'][$track]), true, false).' name="attachments['. $post->ID .'][kgflashmediaplayer-track]['.$track.'][default]" id="attachments-'. $post->ID .'-kgflashmediaplayer-track_'.$track.'_default" type="checkbox" value="default"></div>';
4874
  }
4875
  }
4876
 
4879
  $form_fields["kgflashmediaplayer-track"]["html"] = '<div id="kgflashmediaplayer-'.$post->ID.'-trackdiv">'.$tracks_html.'</div><span class="button-secondary" id="kgflashmediaplayer-add_track" onclick="kgvid_add_subtitles('.$post->ID.')">'.__('Add track', 'video-embed-thumbnail-generator').'</span>';
4880
 
4881
 
 
 
 
 
 
 
 
 
4882
  $items = array(__("Single Video", 'video-embed-thumbnail-generator')=>"Single Video", __("Video Gallery", 'video-embed-thumbnail-generator')=>"Video Gallery", __("WordPress Default", 'video-embed-thumbnail-generator')=>"WordPress Default");
4883
  $shortcode_select = '<select name="attachments['.$post->ID.'][kgflashmediaplayer-embed]" id="attachments['.$post->ID.'][kgflashmediaplayer-embed]">';
4884
  foreach($items as $name=>$value) {
4885
+ $selected = ($kgvid_postmeta['embed']==$value) ? 'selected="selected"' : '';
4886
  $shortcode_select .= "<option value='$value' $selected>$name</option>";
4887
  }
4888
  $shortcode_select .= "</select>";
4889
 
4890
  $form_fields["kgflashmediaplayer-options"]["label"] = __("Video Embed Options", 'video-embed-thumbnail-generator');
4891
  $form_fields["kgflashmediaplayer-options"]["input"] = "html";
4892
+ $form_fields["kgflashmediaplayer-options"]["html"] = '<input type="checkbox" name="attachments['.$post->ID.'][kgflashmediaplayer-showtitle]" id="attachments-'.$post->ID.'-kgflashmediaplayer-showtitle" '.checked( $kgvid_postmeta['showtitle'], 'on', false ).'>
4893
  <label for="attachments-'.$post->ID.'-kgflashmediaplayer-showtitle">'.__('Insert title above video', 'video-embed-thumbnail-generator').'</label><br />
4894
+ <input type="checkbox" name="attachments['.$post->ID.'][kgflashmediaplayer-downloadlink]" id="attachments-'.$post->ID.'-kgflashmediaplayer-downloadlink" '.checked( $kgvid_postmeta['downloadlink'], 'on', false ).'>
4895
  <label for="attachments-'.$post->ID.'-kgflashmediaplayer-downloadlink">'.__('Insert download link below video', 'video-embed-thumbnail-generator').'<em><small><br />'.__('Makes it easier for users to download file.', 'video-embed-thumbnail-generator').'</em></small></label><br />
4896
  <label for="attachments-'.$post->ID.'-kgflashmediaplayer-embed">'._x('Insert', 'verb', 'video-embed-thumbnail-generator').'</label>
4897
  '.$shortcode_select.'
4898
  <script type="text/javascript">jQuery(document).ready(function(){kgvid_hide_standard_wordpress_display_settings('.$post->ID.');});</script>';
4899
 
4900
+ if ( $kgvid_postmeta['embed'] == "Video Gallery" ) {
 
 
 
4901
 
4902
+ if ( empty($kgvid_postmeta['gallery_id']) ) { $kgvid_postmeta['gallery_id'] = $post->post_parent; }
 
 
 
 
 
 
4903
 
4904
  $items = array("menu_order", "title", "post_date", "rand", "ID");
4905
  $gallery_orderby_select = '<select name="attachments['.$post->ID.'][kgflashmediaplayer-gallery_orderby]" id="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_orderby">';
4906
  foreach($items as $item) {
4907
+ $selected = ($kgvid_postmeta['gallery_orderby']==$item) ? 'selected="selected"' : '';
4908
  $gallery_orderby_select .= "<option value='$item' $selected>$item</option>";
4909
  }
4910
  $gallery_orderby_select .= "</select>";
4912
  $items = array("ASC", "DESC");
4913
  $gallery_order_select = '<select name="attachments['.$post->ID.'][kgflashmediaplayer-gallery_order]" id="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_order">';
4914
  foreach($items as $item) {
4915
+ $selected = ($kgvid_postmeta['gallery_order']==$item) ? 'selected="selected"' : '';
4916
  $gallery_order_select .= "<option value='$item' $selected>$item</option>";
4917
  }
4918
  $gallery_order_select .= "</select>";
4919
 
4920
  $form_fields["kgflashmediaplayer-gallery"]["label"] = __("Gallery Settings (all optional)", 'video-embed-thumbnail-generator');
4921
  $form_fields["kgflashmediaplayer-gallery"]["input"] = "html";
4922
+ $form_fields["kgflashmediaplayer-gallery"]["html"] = '<input name="attachments['.$post->ID.'][kgflashmediaplayer-gallery_thumb_width]" id="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_thumb_width" type ="text" value="'.$kgvid_postmeta['gallery_thumb_width'].'" class="kgvid_50_width"> <label for="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_thumb_width">'.__('Thumbnail Width', 'video-embed-thumbnail-generator').'</label><br />
4923
  '.$gallery_orderby_select.' '.__('Order By', 'video-embed-thumbnail-generator').'<br />
4924
  '.$gallery_order_select.' '.__('Sort Order', 'video-embed-thumbnail-generator').'<br />
4925
+ <input name="attachments['.$post->ID.'][kgflashmediaplayer-gallery_exclude]" id="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_exclude" type ="text" value="'.$kgvid_postmeta['gallery_exclude'].'" class="kgvid_50_width"> <label for="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_exclude">'.__('Exclude', 'video-embed-thumbnail-generator').'</label><br />
4926
+ <input name="attachments['.$post->ID.'][kgflashmediaplayer-gallery_include]" id="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_include" type ="text" value="'.$kgvid_postmeta['gallery_include'].'" class="kgvid_50_width"> <label for="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_include">'.__('Include', 'video-embed-thumbnail-generator').'</label><br />
4927
+ <input name="attachments['.$post->ID.'][kgflashmediaplayer-gallery_id]" id="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_id" type ="text" value="'.$kgvid_postmeta['gallery_id'].'" class="kgvid_50_width"> <label for="attachments-'.$post->ID.'-kgflashmediaplayer-gallery_id">'.__('Post ID', 'video-embed-thumbnail-generator').'</label>
4928
  ';
4929
 
4930
  }//if video gallery
4934
  // attach our function to the correct hook
4935
  add_filter("attachment_fields_to_edit", "kgvid_image_attachment_fields_to_edit", null, 2);
4936
 
4937
+ function kgvid_add_video_stats_column($cols) { //add Video Stats column to media library
4938
+
4939
+ $cols['video_stats'] = __("Video Stats", 'video-embed-thumbnail-generator');
4940
+ return $cols;
4941
+
4942
+ }
4943
+ add_filter( 'manage_media_columns', 'kgvid_add_video_stats_column' );
4944
+
4945
+ function kgvid_video_stats_column_data( $column_name, $id ) {
4946
+
4947
+ if ( $column_name == 'video_stats' ) {
4948
+
4949
+ $kgvid_postmeta = kgvid_get_attachment_meta($id);
4950
+ if ( is_array($kgvid_postmeta) && array_key_exists('starts', $kgvid_postmeta) && intval($kgvid_postmeta['starts']) > 0 ) {
4951
+ /* translators: Start refers to the number of times a video has been started */
4952
+ printf( _n('%d Start', '%d Starts', intval($kgvid_postmeta['starts']), 'video-embed-thumbnail-generator'), intval($kgvid_postmeta['starts']) );
4953
+ echo '<br>';
4954
+ printf( _n('%d Complete View', '%d Complete Views', intval($kgvid_postmeta['completeviews']), 'video-embed-thumbnail-generator'), intval($kgvid_postmeta['completeviews']) );
4955
+ }
4956
+ }
4957
+
4958
+ }
4959
+ add_action( 'manage_media_custom_column', 'kgvid_video_stats_column_data', 10, 2 );
4960
+
4961
  function kgvid_hide_video_children($wp_query_obj) {
4962
 
4963
  if ( is_admin()
4984
  function kgvid_change_video_icon($icon, $mime, $post_id) {
4985
 
4986
  $post = get_post($post_id);
4987
+ $kgvid_postmeta = kgvid_get_attachment_meta($post_id);
4988
 
4989
  if ( substr($mime, 0, 5) == 'video' ) {
4990
 
4991
  if ( !empty($post->post_parent) && strpos(get_post_mime_type( $post->post_parent ), 'video') !== false
4992
+ || get_post_meta($post->ID, '_kgflashmediaplayer-externalurl', true) != '' ) {
4993
  $post_id = $post->post_parent; //use post parent if this is a child video or encoded from an external url
4994
  }
4995
  $poster_id = get_post_meta($post_id, '_kgflashmediaplayer-poster-id', true);
4996
+ if ( !empty($poster_id) ) {
4997
  $poster_src = wp_get_attachment_image_src( $poster_id, 'thumbnail' );
4998
+ if ( is_ssl() ) { $poster_src[0] = str_replace( "http:", "https:", $poster_src[0] ); }
4999
  global $_current_video_icon_dir;
5000
  $_current_video_icon_dir = dirname($poster_src[0]);
5001
  // - Return your icon path
5020
  }
5021
  add_filter('icon_dir', 'kgvid_video_icon_dir');
5022
 
 
 
 
 
 
 
5023
  function kgvid_ajax_save_html5_thumb() {
5024
 
5025
  if ( current_user_can('make_video_thumbnails') ) {
5045
  $editor = wp_get_image_editor( $tmp_posterpath );
5046
  $thumb_dimensions = $editor->get_size();
5047
  if ( $thumb_dimensions ) {
5048
+ $kgvid_postmeta = kgvid_get_attachment_meta($post_id);
5049
+ $kgvid_postmeta['actualwidth'] = $thumb_dimensions['width'];
5050
+ $kgvid_postmeta['actualheight'] = $thumb_dimensions['height'];
5051
+ kgvid_save_attachment_meta($post_id, $kgvid_postmeta);
5052
  }
5053
  $editor->set_quality( 90 );
5054
  $new_image_info = $editor->save( $uploads['path'].'/thumb_tmp/'.$posterfile.'.jpg', 'image/jpeg' );
5215
  check_ajax_referer( 'video-embed-thumbnail-generator-nonce', 'security' );
5216
 
5217
  $post_id = $_POST['post_id'];
5218
+ $kgvid_postmeta = kgvid_get_attachment_meta($post_id);
5219
  $poster_id = get_post_meta($post_id, "_kgflashmediaplayer-poster-id", true);
5220
  $thumbnail_size_url = "";
5221
+ if ( !empty($poster_id) ) {
5222
  $thumbnail_src = wp_get_attachment_image_src($poster_id, 'thumbnail');
5223
  if ( is_array($thumbnail_src) && array_key_exists(0, $thumbnail_src) ) { $thumbnail_size_url = $thumbnail_src[0]; }
5224
  }
5225
  $response['thumb_url'] = get_post_meta($post_id, "_kgflashmediaplayer-poster", true);
5226
  $response['thumbnail_size_url'] = $thumbnail_size_url;
5227
+ $response['thumb_error'] = $kgvid_postmeta['autothumb-error'];
5228
  echo json_encode($response);
5229
  die();
5230
 
5242
  // $post['post_type'] == 'attachment'
5243
  static $flag = 0;
5244
 
5245
+ if( !empty($post['ID']) && isset($attachment['kgflashmediaplayer-url']) && $flag < 1 ) {
5246
+
5247
+ $options = kgvid_get_options();
5248
 
5249
  $thumb_id = "";
5250
  if( isset($attachment['kgflashmediaplayer-poster']) ) {
5251
 
5252
  $thumb_url = $attachment['kgflashmediaplayer-poster'];
5253
+ $old_thumb_url = get_post_meta($post['ID'], '_kgflashmediaplayer-poster', true);
5254
 
5255
+ if ( !empty($thumb_url) && $old_thumb_url != $thumb_url ) {
5256
  $thumb_id = kgvid_save_thumb($post['ID'], $post['post_title'], $thumb_url);
5257
+ if ( $thumb_id ) {
5258
+ $thumb_url = wp_get_attachment_url($thumb_id);
5259
+ update_post_meta($post['ID'], '_kgflashmediaplayer-poster-id', $thumb_id);
5260
+ }
5261
  }
5262
  else {
5263
  delete_post_meta($post['ID'], '_kgflashmediaplayer-poster');
5266
  update_post_meta($post['ID'], '_kgflashmediaplayer-poster', $thumb_url);
5267
  }
5268
 
 
 
 
5269
  if( isset($attachment['kgflashmediaplayer-featured']) ) {
5270
+
5271
  if ( !empty($thumb_id) ) {
5272
 
5273
  if ( isset($_POST['action']) && $_POST['action'] == 'save-attachment-compat' && isset($_POST['post_id']) ) { //if this is in the media modal
5283
 
5284
  }
5285
  }
 
5286
 
5287
  if ( !empty($thumb_id) ) { //always set the video's featured image regardless of the plugin setting
5288
  set_post_thumbnail($post['ID'], $thumb_id);
5289
  }
 
5290
 
5291
+ $video_formats = kgvid_video_formats(false, false);
 
 
 
 
 
 
 
5292
  foreach ( $video_formats as $format => $format_stats ) {
5293
+ if( !isset($attachment['kgflashmediaplayer-encode'.$format]) ) {
5294
+ if ( $options['encode_'.$format] == false ) { $attachment['kgflashmediaplayer-encode'.$format] = "false"; }
5295
+ else { $attachment['kgflashmediaplayer-encode'.$format] = "notchecked"; }
5296
+ }
5297
  }
5298
 
5299
+ $checkboxes = array( 'lockaspect', 'featured', 'showtitle', 'downloadlink' ); //make sure unchecked checkbox values are saved
5300
+ foreach ( $checkboxes as $checkbox ) {
5301
+ if( !isset($attachment['kgflashmediaplayer-'.$checkbox]) ) { $attachment['kgflashmediaplayer-'.$checkbox] = "false"; }
5302
+ }
5303
 
5304
+ $kgvid_postmeta = array();
 
5305
 
5306
+ foreach ( $attachment as $kgflashmediaplayer_key => $value ) {
5307
+ if ( strpos($kgflashmediaplayer_key, 'kgflashmediaplayer-') !== false && $kgflashmediaplayer_key != 'kgflashmediaplayer-security' ) {
5308
+ $key = str_replace('kgflashmediaplayer-', '', $kgflashmediaplayer_key);
5309
+ $kgvid_postmeta[$key] = $value;
5310
+ }
5311
+ }
5312
 
5313
+ kgvid_save_attachment_meta($post['ID'], $kgvid_postmeta);
 
 
 
 
 
 
5314
 
5315
  }
5316
  $flag++;
5318
  }
5319
  add_filter("attachment_fields_to_save", "kgvid_video_attachment_fields_to_save", null, 2);
5320
 
 
 
 
 
 
 
 
5321
  class kgInsertMedia {
5322
  //class constructor
5323
  function kgInsertMedia () {
5326
  //function that does the modifying
5327
  function kgmodifyMediaInsert($html, $attachment_id, $attachment) {
5328
 
5329
+ $mime_type = get_post_mime_type($attachment_id);
5330
+
5331
+ if ( substr($mime_type, 0, 5) == 'video' ) {
5332
+
5333
+ $options = kgvid_get_options();
5334
+
5335
+ $kgvid_postmeta = kgvid_get_attachment_meta($attachment_id);
5336
+
5337
+ if ( $kgvid_postmeta['embed'] == "Single Video" ) {
5338
+ $html = "";
5339
+ $kgvid_postmeta['url'] = wp_get_attachment_url($attachment_id);
5340
+ $kgvid_postmeta['title'] = get_the_title($attachment_id);
5341
+ $kgvid_postmeta['poster'] = get_post_meta($attachment_id, "_kgflashmediaplayer-poster", true);
5342
+ $kgvid_postmeta['poster-id'] = get_post_meta($attachment_id, "_kgflashmediaplayer-poster-id", true);
5343
+
5344
+ if ($kgvid_postmeta['showtitle'] == "on" ) {
5345
+ $titlecode = html_entity_decode(stripslashes($options['titlecode']));
5346
+ if ( substr($titlecode, 0, 1) != '<' ) { $titlecode = '<'.$titlecode; }
5347
+ if ( substr($titlecode, -1, 1) != '>' ) { $titlecode .= '>'; }
5348
+ $endtitlecode = str_replace("<", "</", $titlecode);
5349
+ $endtitlecode_array = explode(' ', $endtitlecode);
5350
+ if ( substr($endtitlecode_array[0], -1) != ">" ) { $endtitlecode = $endtitlecode_array[0].">"; }
5351
+ $html .= $titlecode.'<span itemprop="name">'.$kgvid_postmeta["title"].'</span>'.$endtitlecode.'<br />';
5352
+ }
5353
+
5354
+ $html .= '[KGVID';
5355
+ if ( !empty($kgvid_postmeta['poster']) && empty($kgvid_postmeta['poster-id']) ) { $html .= ' poster="'.$kgvid_postmeta["poster"].'"'; }
5356
+ if ( !empty($kgvid_postmeta['width']) ) { $html .= ' width="'.$kgvid_postmeta["width"].'"'; }
5357
+ if ( !empty($kgvid_postmeta['height']) ) { $html .= ' height="'.$kgvid_postmeta["height"].'"'; }
5358
+ if ( $kgvid_postmeta['downloadlink'] == "on" ) { $html .= ' downloadlink="true"'; }
5359
+ $html .= ']'.$kgvid_postmeta["url"].'[/KGVID]<br />';
5360
+ } //if embed code is enabled
5361
+
5362
+ if ($kgvid_postmeta['embed'] == "Video Gallery" ) {
5363
+
5364
+ $post = get_post($attachment_id);
5365
+ $parent_id = $post->post_parent;
5366
+
5367
+ $html = "";
5368
+ $html .= '[KGVID gallery="true"';
5369
+ if ( !empty($kgvid_postmeta['gallery_thumb']) && $kgvid_postmeta['gallery_thumb'] != $options['gallery_thumb'] ) { $html .= ' gallery_thumb="'.$kgvid_postmeta["gallery_thumb"].'"'; }
5370
+ if ( !empty($kgvid_postmeta['gallery_exclude']) ) { $html .= ' gallery_exclude="'.$kgvid_postmeta["gallery_exclude"].'"'; }
5371
+ if ( !empty($kgvid_postmeta['gallery_include']) ) { $html .= ' gallery_include="'.$kgvid_postmeta["gallery_include"].'"'; }
5372
+ if ( !empty($kgvid_postmeta['gallery_orderby']) && $kgvid_postmeta['gallery_orderby'] != "menu_order" ) { $html .= ' gallery_orderby="'.$kgvid_postmeta["gallery_orderby"].'"'; }
5373
+ if ( !empty($kgvid_postmeta['gallery_order']) && $kgvid_postmeta['gallery_order'] != "ASC" ) { $html .= ' gallery_order="'.$kgvid_postmeta["gallery_order"].'"'; }
5374
+ if ( !empty($kgvid_postmeta['gallery_id']) && $kgvid_postmeta['gallery_id'] != $parent_id ) { $html .= ' gallery_id="'.$kgvid_postmeta["gallery_id"].'"'; }
5375
+ $html .= '][/KGVID]';
5376
+ }
5377
+
 
5378
  }
5379
 
5380
+ return $html;
5381
+
5382
+ }//end function
5383
  }
5384
  //instantiate the class
5385
  $kgIM = new kgInsertMedia();
5386
 
5387
  function kgvid_embedurl_menu($tabs) {
5388
  $newtab = array( 'embedurl' => _x('Embed Video from URL', 'Title in "Add Media" popup sidebar', 'video-embed-thumbnail-generator') );
5389
+ if (is_array($tabs) ) { return array_merge($tabs, $newtab); }
5390
+ else { return $newtab; }
5391
  }
5392
  add_filter('media_upload_tabs', 'kgvid_embedurl_menu');
5393
 
5426
  </tr>
5427
  <?php if ( current_user_can('make_video_thumbnails') ) { ?>
5428
  <tr>
5429
+ <th valign="top" scope="row" class="label"><span class="alignleft"><label><?php _e('Thumbnails', 'video-embed-thumbnail-generator') ?></label></span></th>
5430
  <td class="field">
5431
+ <input id="attachments-singleurl-kgflashmediaplayer-numberofthumbs" type="text" value="<?php echo $options['generate_thumbs']; ?>" maxlength="2" size="4" style="width:35px;text-align:center;" title="<?php _e('Number of Thumbnails', 'video-embed-thumbnail-generator') ?>" onchange="document.getElementById('attachments-singleurl-kgflashmediaplayer-thumbtime').value='';" />
5432
  <input type="button" id="attachments-singleurl-thumbgenerate" class="button-secondary" value="<?php _e('Generate', 'video-embed-thumbnail-generator') ?>" name="thumbgenerate" onclick="kgvid_generate_thumb('singleurl', 'generate');" disabled title="<?php _e('Please enter a valid video URL', 'video-embed-thumbnail-generator') ?>" />
5433
  <input type="button" id="attachments-singleurl-thumbrandomize" class="button-secondary" value="<?php _e('Randomize', 'video-embed-thumbnail-generator') ?>" name="thumbrandomize" onclick="kgvid_generate_thumb('singleurl', 'random');" disabled title="<?php _e('Please enter a valid video URL', 'video-embed-thumbnail-generator') ?>" />
5434
+ <input type="checkbox" id="attachments-singleurl-firstframe" onchange="document.getElementById('attachments-singleurl-kgflashmediaplayer-thumbtime').value ='';" /><label for="attachments-singleurl-firstframe"><?php _e('Force 1st Frame Thumbnail', 'video-embed-thumbnail-generator') ?></label><br>
5435
  <div id="attachments-singleurl-thumbnailplaceholder"></div>
5436
+ <span><?php _e('Thumbnail timecode:', 'video-embed-thumbnail-generator') ?></span> <input name="attachments[singleurl][kgflashmediaplayer-thumbtime]" id="attachments-singleurl-kgflashmediaplayer-thumbtime" type="text" value="" style="width:60px;"><br>
5437
  <input type="checkbox" <?php echo checked( $options["featured"], "on", false ); ?> id="attachments-singleurl-featured" name="attachments[singleurl][kgflashmediaplayer-featured]" /> <?php _e('Set thumbnail as featured image', 'video-embed-thumbnail-generator') ?>
5438
  </td>
5439
  </tr>
5456
  <?php } ?>
5457
  <tr>
5458
  <th valign="top" scope="row" class="label"><span class="alignleft"><label><?php _e('Subtitles & Captions', 'video-embed-thumbnail-generator') ?></span></label></th>
5459
+ <td><div id="kgflashmediaplayer-singleurl-trackdiv" class="kgvid_thumbnail_box kgvid_track_box"><?php _e('Track type:', 'video-embed-thumbnail-generator') ?><select name="attachments[singleurl][kgflashmediaplayer-track][kind]" id="attachments-singleurl-kgflashmediaplayer-track_kind"><option value="subtitles"><?php _e('subtitles', 'video-embed-thumbnail-generator') ?></option><option value="captions"><?php _e('captions', 'video-embed-thumbnail-generator') ?></option><option value="chapters"><?php _e('chapters', 'video-embed-thumbnail-generator') ?></option></select><br />URL: <input name="attachments[singleurl][kgflashmediaplayer-track][src]" id="attachments-singleurl-kgflashmediaplayer-track_src" type="text" value="" class="text"><br /><?php _e('Language code:', 'video-embed-thumbnail-generator') ?> <input name="attachments[singleurl][kgflashmediaplayer-track][srclang]" id="attachments-singleurl-kgflashmediaplayer-track_srclang" type="text" value="" maxlength="2" style="width:40px;"><br /><?php _e('Label:', 'video-embed-thumbnail-generator') ?> <input name="attachments[singleurl][kgflashmediaplayer-track][label]" id="attachments-singleurl-kgflashmediaplayer-track_label" type="text" value="" class="text"><br /><?php _e('Default:', 'video-embed-thumbnail-generator') ?> <input name="attachments[singleurl][kgflashmediaplayer-track][default]" id="attachments-singleurl-kgflashmediaplayer-track_default" type="checkbox" value="default"></div></td>
5460
  <tr>
5461
  <th valign="top" scope="row" class="label"><span class="alignleft"><label>Options</span></label></th>
5462
  <td><input type="checkbox" <?php echo checked( $options["downloadlink"], "on", false ); ?> name="downloadlink" id="downloadlink" value="true" class="field" /><label for="downloadlink"><?php _e('Generate Download Link Below Video', 'video-embed-thumbnail-generator') ?><br /><small></em><?php _e('Makes it easier for users to download video file', 'video-embed-thumbnail-generator') ?></em></small></label></td>
5499
  global $post;
5500
  global $wp_query;
5501
  $options = kgvid_get_options();
5502
+ $kgvid_postmeta = kgvid_get_attachment_meta($post->ID);
5503
 
5504
  if ( is_array($kgvid_video_embed) && array_key_exists('sample', $kgvid_video_embed) ) { $url = plugins_url('/images/sample-video-h264.mp4', __FILE__); }
5505
  else { $url = wp_get_attachment_url($post->ID); }
5506
 
5507
  $poster = get_post_meta($post->ID, "_kgflashmediaplayer-poster", true);
 
5508
 
5509
  if ( is_array($kgvid_video_embed) && array_key_exists('gallery', $kgvid_video_embed) ) { $gallery = true; }
5510
  else { $gallery = false; }
5515
  if ( $poster !="" ) { $shortcode .= ' poster="'.$poster.'"'; }
5516
  if ( !empty($dimensions['width']) ) { $shortcode .= ' width="'.$dimensions['width'].'"'; }
5517
  if ( !empty($dimensions['height']) ) { $shortcode .= ' height="'.$dimensions['height'].'"'; }
5518
+ if ( $kgvid_postmeta['downloadlink'] == "on" ) { $shortcode .= ' downloadlink="true"'; }
5519
  if (is_array($kgvid_video_embed) && array_key_exists('gallery', $kgvid_video_embed)) { $shortcode .= ' autoplay="true"'; }
5520
  if (is_array($kgvid_video_embed) && array_key_exists('sample', $kgvid_video_embed)) {
5521
  if ( $options['overlay_title'] == "on" ) { $shortcode .= ' title="'._x('Sample Video', 'example video', 'video-embed-thumbnail-generator').'"'; }
5544
  }
5545
  add_filter( 'the_content', 'kgvid_filter_video_attachment_content' );
5546
 
5547
+ function kgvid_generate_embeddable_video( $kgvid_video_embed ) {
5548
+
5549
+ global $content_width;
5550
+ $content_width_save = $content_width;
5551
+ $content_width = 2048;
5552
+
5553
+ remove_action('wp_head', '_admin_bar_bump_cb'); //don't show the WordPress admin bar if you're logged in
5554
+ add_filter( 'show_admin_bar', '__return_false' );
5555
+
5556
+ $shortcode = kgvid_generate_attachment_shortcode($kgvid_video_embed);
5557
+
5558
+ $html = '<html style="background-color:transparent;"><head>';
5559
+ ob_start();
5560
+ wp_head();
5561
+ $html .= ob_get_clean();
5562
+ $html .= '<style>.kgvid_wrapper { margin:0; }';
5563
+ if ( array_key_exists('gallery', $kgvid_video_embed) ) { $html .= ' .kgvid_below_video { color:white; } .kgvid_below_video a { color:aaa; }'; }
5564
+ $html .= '</style>';
5565
+ $html .= '</head><body class="content" style="margin:0px; font-family: sans-serif; padding:0px; border:none;';
5566
+ if ( array_key_exists('gallery', $kgvid_video_embed) ) { $html .= 'background-color:black; '; }
5567
+ else { $html .= 'background-color:transparent; '; }
5568
+ $html .= '">';
5569
+ $html .= do_shortcode( $shortcode );
5570
+ ob_start();
5571
+ wp_footer();
5572
+ $html .= ob_get_clean();
5573
+ $html .= '</body></html>';
5574
+ $content_width = $content_width_save; //reset $content_width
5575
+
5576
+ return $html;
5577
+
5578
+ }
5579
+
5580
  function kgvid_video_attachment_template() {
5581
 
5582
  global $post;
5586
  $options = kgvid_get_options();
5587
 
5588
  $kgvid_video_embed = array ( 'enable' => 'false' ); //turned off by default
5589
+ if ( is_object($wp_query) && isset($wp_query->query_vars['kgvid_video_embed']) ) { $kgvid_video_embed = $wp_query->query_vars['kgvid_video_embed']; }
5590
  if ( $options['template'] == "old" ) { $kgvid_video_embed['enable'] = 'true'; } //regardless of any query settings, if we're using the old method it's turned on
5591
  if ( (!is_array($kgvid_video_embed) && $kgvid_video_embed == "true") ) { $kgvid_video_embed = array ( 'enable' => 'true' ); } //maintain backwards compatibility
5592
 
5593
  if ( $options['embeddable'] == 'false' && !array_key_exists('sample', $kgvid_video_embed) && !array_key_exists('gallery', $kgvid_video_embed) ) { $kgvid_video_embed['enable'] = 'false'; }
5594
 
5595
+ if ( is_array($kgvid_video_embed) && array_key_exists('enable', $kgvid_video_embed) && $kgvid_video_embed['enable'] == 'true'
5596
+ && ( ( array_key_exists('post_mime_type', $post) && strpos($post->post_mime_type, 'video') !== false ) || array_key_exists('sample', $kgvid_video_embed) )
5597
+ ) {
5598
+
5599
+ $html = kgvid_generate_embeddable_video( $kgvid_video_embed );
5600
+
5601
+ echo $html;
5602
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5603
  exit;
5604
  }
5605
 
5606
+ if ( is_array($kgvid_video_embed)
5607
+ && array_key_exists('download', $kgvid_video_embed)
5608
+ && $kgvid_video_embed['download'] == 'true'
5609
+ && is_object($post)
5610
+ && strpos($post->post_mime_type,"video") !== false
5611
+ && $options['click_download'] == 'on'
5612
+ ) {
5613
 
5614
  $filepath = get_attached_file($post->ID);
5615
  $filetype = wp_check_filetype( $filepath );
5632
  header('Expires: 0');
5633
  header('Pragma: no-cache');
5634
  header("Content-Length: ".filesize($filepath));
5635
+ }
5636
+
5637
+ kvid_readfile_chunked($filepath);
5638
+ exit;
5639
  }
5640
 
5641
+ if ( $options['oembed_provider'] == "on" && is_array($kgvid_video_embed) && array_key_exists('oembed', $kgvid_video_embed) && array_key_exists('post_id', $kgvid_video_embed) ) {
5642
+
5643
+ $post = get_post($kgvid_video_embed['post_id']);
5644
+
5645
+ if (!$post) {
5646
+ status_header(404);
5647
+ wp_die("Not found");
5648
+ }
5649
+
5650
+ $dimensions = kgvid_set_video_dimensions($post->ID);
5651
+ $thumbnail_url = get_post_meta($post->ID, "_kgflashmediaplayer-poster", true);
5652
+ $author = get_userdata($post->post_author);
5653
+
5654
+ $oembed_provider_data = array(
5655
+ 'version' => '1.0',
5656
+ 'provider_name' => get_bloginfo('name'),
5657
+ 'provider_url' => home_url(),
5658
+ 'author_name' => $author->display_name,
5659
+ 'author_url' => get_author_posts_url($author->ID, $author->nicename),
5660
+ 'title' => $post->post_title,
5661
+ 'type' => 'video',
5662
+ 'width' => $dimensions['width'],
5663
+ 'height' => $dimensions['height'],
5664
+ 'thumbnail_url' => $thumbnail_url,
5665
+ 'thumbnail_width' => $dimensions['width'],
5666
+ 'thumbnail_height' => $dimensions['height'],
5667
+ 'html' => "<iframe allowfullscreen src='".site_url('/')."?attachment_id=".$post->ID."&amp;kgvid_video_embed[enable]=true' frameborder='0' scrolling='no' width='".esc_attr($dimensions['width'])."' height='".esc_attr($dimensions['height'])."'></iframe>"
5668
+ );
5669
+
5670
+ if ( $kgvid_video_embed['oembed'] == 'json' ) {
5671
+
5672
+ header('Content-Type: application/json; charset=' . get_bloginfo('charset'), true);
5673
+ $json = json_encode($oembed_provider_data);
5674
+ echo $json;
5675
+ exit;
5676
+
5677
+ }
5678
+
5679
+ if ( $kgvid_video_embed['oembed'] == 'xml' ) {
5680
+
5681
+ header('Content-Type: text/xml; charset=' . get_bloginfo('charset'), true);
5682
+
5683
+ // render xml-output
5684
+ echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '" ?>';
5685
+ echo '<oembed>';
5686
+ foreach ( $oembed_provider_data as $element => $value ) {
5687
+ echo '<' . $element . '>' . esc_html($value) . '</' . $element . '>';
5688
+ }
5689
+ echo '</oembed>';
5690
+ exit;
5691
+ }
5692
+
5693
  }
5694
 
5695
  }
5696
  add_action('template_redirect', 'kgvid_video_attachment_template');
5697
 
5698
+ function kgvid_enable_oembed_discover() {
5699
+
5700
+ $options = kgvid_get_options();
5701
+
5702
+ if ( $options['oembed_security'] == "on" ) {
5703
+
5704
+ return true;
5705
+
5706
+ }
5707
+
5708
+ else { return false; }
5709
+ }
5710
+ add_filter( 'embed_oembed_discover', 'kgvid_enable_oembed_discover' );
5711
+
5712
  /* function kgvid_serve_secure_video_files($wp) {
5713
  if ( array_key_exists('kgvid_video_embed', $wp->query_vars) && array_key_exists('id', $wp->query_vars['kgvid_video_embed']) && array_key_exists('format', $wp->query_vars['kgvid_video_embed']) && array_key_exists('token', $wp->query_vars['kgvid_video_embed']) ) {
5714
  $kgvid_video_embed = $wp->query_vars['kgvid_video_embed'];
5774
  $moviefilepath = esc_url_raw(str_replace(" ", "%20", $movieurl));
5775
  $moviefilepath = str_replace("https://", "http://", $moviefilepath);
5776
  }
5777
+
5778
+ $kgvid_postmeta = kgvid_get_attachment_meta($postID);
5779
+ $keys = array( 'width' => 'actualwidth', 'height' => 'actualheight', 'duration' => 'duration', 'rotate' => 'rotate' );
5780
+
5781
+ if ( empty($kgvid_postmeta['duration']) ) {
5782
  $movie_info = kgvid_get_video_dimensions($moviefilepath);
5783
+ foreach ( $keys as $info => $meta ) {
5784
+ if ( !empty($movie_info[$info]) ) { $kgvid_postmeta[$meta] = $movie_info[$info]; }
5785
+ }
5786
+ kgvid_save_attachment_meta($postID, $kgvid_postmeta);
5787
  }
5788
+ else { //post meta is already set
5789
+ $movie_info = array();
5790
+ foreach ( $keys as $info => $meta ) {
5791
+ $movie_info[$info] = $kgvid_postmeta[$meta];
5792
+ }
5793
+ $movie_info['worked'] = true;
 
 
5794
  }
5795
  }
5796
  else {
5810
 
5811
  if (!file_exists($uploads['path'].'/thumb_tmp')) { mkdir($uploads['path'].'/thumb_tmp'); }
5812
 
5813
+ if ( $movie_info['rotate'] === false || $options['ffmpeg_vpre'] == "on" ) { $movie_info['rotate'] = ""; }
5814
  switch ($movie_info['rotate']) { //if it's a sideways mobile video
5815
  case ' -vf "transpose=1"': //90 degrees
5816
  case ' -vf "transpose=2"': //270 degrees
5817
+ $movie_width ^= $movie_height ^= $movie_width ^= $movie_height; //swap height & width
5818
+ break;
5819
  }
5820
 
5821
  $thumbnailheight = strval(round(floatval($movie_height) / floatval($movie_width) * 200));
5863
  if ( is_file($thumbnailfilename[$i]) )
5864
  kgvid_schedule_cleanup_generated_files('thumbs');
5865
 
5866
+ $thumbnaildisplaycode = '<div class="kgvid_thumbnail_select" name="attachments['.$postID.'][thumb'.$i.']" id="attachments-'.$postID.'-thumb'.$i.'"><label for="kgflashmedia-'.$postID.'-thumbradio'.$i.'"><img src="'.$thumbnailurl.'?'.rand().'" width="200" height="'.$thumbnailheight.'" class="kgvid_thumbnail"></label><br /><input type="radio" name="attachments['.$postID.'][thumbradio_'.$postID.']" id="kgflashmedia-'.$postID.'-thumbradio'.$i.'" value="'.str_replace('/thumb_tmp/', '/', $thumbnailurl).'" onchange="kgvid_select_thumbnail(this.value, \''.$postID.'\', '.$movieoffset.');"></div>';
5867
 
5868
  $i++;
5869
 
5907
  $movie_height = $movie_info['height'];
5908
 
5909
  if ( get_post_type($postID) == "attachment" ) { //if the video is in the database
5910
+
5911
+ $kgvid_postmeta = kgvid_get_attachment_meta($postID);
5912
+ $keys = array( 'width' => 'actualwidth', 'height' => 'actualheight', 'duration' => 'duration', 'rotate' => 'rotate' );
5913
+ foreach ( $keys as $info => $meta ) {
5914
+ $kgvid_postmeta[$meta] = $movie_info[$info];
5915
+ }
5916
+
5917
  }
5918
 
5919
  $encodevideo_info = kgvid_encodevideo_info($movieurl, $postID);
5931
  $encode_formats[$format]['status'] = "queued";
5932
  $encode_formats[$format]['name'] = $format_stats['name'];
5933
  $encode_list[$format] = $format_stats['name'];
5934
+ if ( isset($kgvid_postmeta) ) { $kgvid_postmeta['encode'.$format] = 'on'; }
5935
  }
5936
  } // if video doesn't already exist
5937
  else { $encode_formats[$format]['status'] = "encoded"; }
5938
  } // if user wants to encode format
5939
  else {
5940
  $encode_formats[$format]['status'] = "notchecked";
5941
+ if ( isset($kgvid_postmeta) ) { $kgvid_postmeta['encode'.$format] = 'notchecked'; }
5942
  }
5943
  }//end loop through video formats
5944
 
5945
+ kgvid_save_attachment_meta($postID, $kgvid_postmeta);
5946
+
5947
  if ( !empty($encode_list) ) { //if there's anything to encode
5948
 
5949
  $video_encode_queue = kgvid_get_encode_queue();
6010
  }
6011
  }
6012
  } //if any video formats don't already exist, add to queue
6013
+ else {
6014
+ $embed_display = "<strong>".__('Nothing to encode.', 'video-embed-thumbnail-generator')."</strong>";
6015
+ $transient = get_transient( 'kgvid_new_attachment_transient' );
6016
+ if ( is_array($transient) && in_array($postID, $transient) ) {
6017
+ $key = array_search($postID, $transient);
6018
+ unset($transient[$key]);
6019
+ if ( empty($transient) ) { delete_transient( 'kgvid_new_attachment_transient' ); }
6020
+ else { set_transient( 'kgvid_new_attachment_transient', $transient, DAY_IN_SECONDS ); }
6021
+ }
6022
+ }
6023
 
6024
  $replaceoptions = "";
6025
  $originalselect = "";
6026
 
6027
+ $transient = get_transient( 'kgvid_new_attachment_transient' ); //error checking to avoid race conditions when using Add From Server
6028
+
6029
+ if ( is_array($transient) ) {
6030
+
6031
+ $video_encode_queue = kgvid_get_encode_queue();
6032
+
6033
+ if ( $video_encode_queue ) {
6034
+ foreach ( $video_encode_queue as $index => $entry ) {
6035
+ $key = array_search($entry['attachmentID'], $transient);
6036
+ if ( $key !== false ) {
6037
+ unset($transient[$key]);
6038
+ }
6039
+ }
6040
+ }
6041
+
6042
+ if ( !empty($transient) ) {
6043
+ foreach ( $transient as $id ) {
6044
+ $cron_scheduled = wp_next_scheduled( 'kgvid_cron_new_attachment', array($id) );
6045
+ if ( $cron_scheduled ) { continue; }
6046
+ else { wp_schedule_single_event( time() + rand(0,10), 'kgvid_cron_new_attachment', array($id) ); }
6047
+ }
6048
+ }
6049
+
6050
+ }
6051
+
6052
+ if ( empty($transient) ) { delete_transient( 'kgvid_new_attachment_transient' ); }
6053
+ else { set_transient( 'kgvid_new_attachment_transient', $transient, DAY_IN_SECONDS ); }
6054
+
6055
+
6056
  $arr = array ( "embed_display"=>$embed_display );
6057
  return $arr;
6058
  }
6061
  $arr = array ( "thumbnaildisplaycode"=>$thumbnaildisplaycode, "embed_display"=>$thumbnaildisplaycode, "lastthumbnumber"=>"break" );
6062
  return $arr;
6063
  } //can't open movie
6064
+
6065
  }
6066
 
6067
  function kgivd_save_singleurl_poster($parent_id, $poster, $movieurl, $set_featured) { //called by the "Embed Video from URL" tab when submitting
6206
  $encode_string = kgvid_generate_encode_string($moviefilepath, $encodevideo_info[$format]['filepath'], $movie_info, $queued_format, $encode_dimensions['width'], $encode_dimensions['height'], $movie_info['rotate']);
6207
 
6208
  }//if file doesn't already exist
6209
+ else {
6210
+ $embed_display = sprintf( __('%s already encoded', 'video-embed-thumbnail-generator'), $format_stats['name'] );
6211
+ $video_encode_queue[$video_key]['encode_formats'][$format]['status'] = 'Encoding Complete';
6212
+ }
6213
  break; //don't bother looping through the rest if we already found the format
6214
  }//if the x264 library and an aac library is enabled
6215
  else {
6355
  function kgvid_encode_progress($video_key, $format, $page) {
6356
 
6357
  $video_encode_queue = kgvid_get_encode_queue();
6358
+ $time_to_wait = 5000; //default 5 seconds between checking encode progress
6359
 
6360
  if ( is_array($video_encode_queue) && array_key_exists($video_key, $video_encode_queue) ) {
6361
 
6441
  else { $fps_match = "10"; }
6442
  }
6443
  else { $fps_match = "10"; }
6444
+ $time_to_wait = strval(max(round(40000/intval($fps_match)), 1000)); //wait at least 1 second
6445
  if ( intval($time_to_wait) > 10000 ) { //wait no more than 10 seconds
6446
  $time_to_wait = 10000;
6447
  }
6455
  $embed_display .= '<a href="javascript:void(0);" class="kgvid_cancel_button" id="attachments-'.$video_entry["attachmentID"].'-kgflashmediaplayer-cancelencode" onclick="kgvid_cancel_encode('.$pid.', \''.$video_entry["attachmentID"].'\', \''.$video_key.'\', \''.$format.'\');">'.__('Cancel', 'video-embed-thumbnail-generator').'</a>';
6456
  }
6457
 
6458
+ $embed_display .= '<div class="kgvid_encoding_small_text"><small>'.__('Elapsed:', 'video-embed-thumbnail-generator').' '.date('H:i:s',$time_elapsed).'. '.__('Remaining:', 'video-embed-thumbnail-generator').' '.$time_remaining.'. '._x('FPS:', 'Frames per second', 'video-embed-thumbnail-generator').' '.$fps_match.'</small></div>';
6459
  }
6460
  elseif ( time() - $started < 10 || ( file_exists($filepath) && time() - filemtime($filepath) < 10 ) ) { //not enough time has passed, so check again later
6461
  $args = array($video_key, $format, $page);
6462
+ $embed_display = '<strong>'.__('Encoding', 'video-embed-thumbnail-generator').'</strong>';
6463
+ $time_to_wait = 1000;
6464
  wp_schedule_single_event(time()+60, 'kgvid_cron_queue_check', $args);
6465
  }
6466
  elseif (
6535
 
6536
  //finish inserting attachment
6537
 
6538
+ $embed_display = '<strong>'.__('Encoding Complete', 'video-embed-thumbnail-generator').'</strong>';
6539
 
6540
  $next_video = kgvid_encode_videos(); //start the next queued video
6541
  if ( !empty($next_video['format']) ) { //if there's something to encode, schedule cron
6544
  }
6545
 
6546
  if ( (empty($next_video['format']) || $next_video['video_key'] != $video_key) && $video_encode_queue[$video_key]['encode_formats']['fullres']['status'] == "Encoding Complete" ) { //if there's nothing left to encode in this video and we've encoded the fullres
 
6547
  $new_movie_url = kgvid_replace_video( $video_key, 'fullres' );
6548
  $script_function = 'kgvid_redraw_encode_checkboxes("'.$new_movie_url.'", "'.$video_entry['attachmentID'].'", "'.$page.'")';
6549
 
6550
+ $embed_display = '<strong>'.__('Encoding Complete', 'video-embed-thumbnail-generator').'</strong>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6551
 
6552
+ }//fullres encoding complete
6553
 
6554
+ if ( $blog_id ) { restore_current_blog(); }
6555
 
6556
+ }//encoding complete
6557
 
 
6558
  else { //there was an unexpected output and the encoded file hasn't been modified in more than 10 seconds
6559
 
6560
  if ( strpos($lastline, "signal 15") !== false ) { //if the encoding was intentionally canceled
6564
 
6565
  }
6566
 
 
6567
  } //if logfile
6568
  else {
6569
 
6578
  $embed_display = '<strong>'.__('Error:', 'video-embed-thumbnail-generator').' </strong><span class="kgvid_warning">'.stripslashes($lastline).'.</span>';
6579
  $next_video = kgvid_encode_videos(); //start the next queued video
6580
  if ( !empty($next_video['format']) ) {
 
6581
  $args = array($next_video['video_key'], $next_video['format'], $page);
6582
  wp_schedule_single_event(time()+60, 'kgvid_cron_queue_check', $args);
6583
  }
6584
  }
6585
 
6586
  }//if not completed
6587
+ else { $embed_display = "<strong>".ucwords($video_encode_queue[$video_key]['encode_formats'][$format]['status'])."</strong>"; }
6588
  } //if there's a queue and the video is encoding
6589
+
6590
+ else { $embed_display = "<strong>".__('Waiting...', 'video-embed-thumbnail-generator')."</strong>"; }
6591
+
6592
+ $arr = array ( 'embed_display' => $embed_display, 'time_to_wait' => $time_to_wait );
6593
  return $arr;
6594
 
6595
  }//end if queue entry exists
6610
  }
6611
  add_action('wp_ajax_kgvid_encode_progress', 'kgvid_ajax_encode_progress');
6612
 
6613
+ function kgvid_replace_video( $video_key, $format ) {
6614
 
6615
  $video_encode_queue = kgvid_get_encode_queue();
6616
  $video_formats = kgvid_video_formats();
6617
  $encoded_filename = $video_encode_queue[$video_key]['encode_formats'][$format]['filepath'];
6618
  $video_id = $video_encode_queue[$video_key]['attachmentID'];
6619
+ $replace = true;
6620
 
6621
+ if ( !empty($video_encode_queue) ) {
6622
+ foreach ( $video_encode_queue[$video_key]['encode_formats'] as $encoding_format => $value ) { //make sure there isn't another encoding process using this original video
6623
+ if ( $value['status'] == "encoding" || $value['status'] == "queued" ) {
6624
+ $replace = false;
 
 
 
 
 
 
 
 
 
 
 
6625
  }
6626
+ }//end loop
 
 
 
 
6627
  }
6628
 
6629
+ if ( $replace = false ) {
6630
+ wp_schedule_single_event(time()+60, 'kgvid_cron_replace_video_check', array($video_key, $format) );
6631
+ return $video_encode_queue[$video_key]['movieurl'];
6632
  }
6633
+ else {
 
6634
 
6635
+ $original_filename = get_attached_file($video_id);
6636
+ $path_parts = pathinfo($original_filename);
6637
+
6638
+ if ( $path_parts['extension'] != $video_formats[$format]['extension'] ) {
6639
+ $new_filename = str_replace("-fullres", "", $encoded_filename);
6640
+ $sanitized_url = kgvid_sanitize_url($video_encode_queue[$video_key]['movieurl']);
6641
+ $new_url = $sanitized_url['noextension'].".".$video_formats[$format]['extension'];
6642
+ $video_encode_queue[$video_key]['movieurl'] = $new_url;
6643
+ global $wpdb;
6644
+ $query = $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE `post_content` LIKE '%%%s%%'", $sanitized_url['basename'].".".$path_parts['extension'] ); //find posts that use the old filename
6645
+ $results = $wpdb->get_results($query);
6646
+ if ( $results ) {
6647
+ foreach ( $results as $result ) {
6648
+ $post = get_post($result->ID);
6649
+ $post->post_content = str_replace($sanitized_url['noextension'].".".$path_parts['extension'], $new_url, $post->post_content);
6650
+ wp_update_post($post);
6651
+ }
6652
+ }
6653
+ }
6654
+ else {
6655
+ if ( strpos($original_filename, 'http') !== false ) { $original_filename = str_replace("-fullres", "", $encoded_filename); }
6656
+ $new_filename = $original_filename;
6657
+ $new_url = $video_encode_queue[$video_key]['movieurl'];
6658
+ }
6659
 
6660
+ if ( file_exists($encoded_filename) ) {
6661
+ rename($encoded_filename, $new_filename);
6662
+ if ( file_exists($original_filename) && $original_filename != $new_filename ) { unlink($original_filename); }
6663
+ }
6664
+ $video_encode_queue[$video_key]['encode_formats'][$format]['url'] = $new_url;
6665
 
 
 
 
 
 
 
 
 
 
 
 
6666
 
6667
+ if ( $video_encode_queue[$video_key]['movie_info']['rotate'] != "" ) { //if the video needed rotating
6668
+ $video_encode_queue[$video_key]['movie_info']['rotate'] = ""; //clear rotation because we've just fixed that problem
6669
+ $kgvid_postmeta = kgvid_get_attachment_meta($video_encode_queue[$video_key]['attachmentID']);
6670
+ $kgvid_postmeta['rotate'] = '';
6671
+ kgvid_save_attachment_meta($video_encode_queue[$video_key]['attachmentID'], $kgvid_postmeta);
6672
+
6673
+ $setwidth = $video_encode_queue[$video_key]['movie_info']['width'];
6674
+ $setheight = $video_encode_queue[$video_key]['movie_info']['height'];
6675
+ if ( intval($setwidth) > intval($setheight) ) { //swap the width and height meta if it hasn't already been done
6676
+ $kgvid_postmeta['actualwidth'] = $video_encode_queue[$video_key]['movie_info']['height'];
6677
+ $kgvid_postmeta['width'] = $setheight;
6678
+ $video_encode_queue[$video_key]['movie_info']['width'] = $video_encode_queue[$video_key]['movie_info']['height'];
6679
+
6680
+ $kgvid_postmeta['actualheight'] = $video_encode_queue[$video_key]['movie_info']['width'];
6681
+ $kgvid_postmeta['height'] = $setwidth;
6682
+ $video_encode_queue[$video_key]['movie_info']['height'] = $video_encode_queue[$video_key]['movie_info']['width'];
6683
+ }
6684
+
6685
+ kgvid_save_attachment_meta($video_encode_queue[$video_key]['attachmentID'], $kgvid_postmeta);
6686
+ }
6687
+
6688
+ kgvid_save_encode_queue($video_encode_queue);
6689
+
6690
+ // you must first include the image.php file
6691
+ // for the function wp_generate_attachment_metadata() to work and media.php for wp_read_video_metadata() in WP 3.6+
6692
+ require_once(ABSPATH . 'wp-admin/includes/image.php');
6693
+ global $wp_version;
6694
+ if ( $wp_version >= 3.6 ) { require_once(ABSPATH . 'wp-admin/includes/media.php'); }
6695
+ $attach_data = wp_generate_attachment_metadata( $video_id, $new_filename );
6696
+ wp_update_attachment_metadata( $video_id, $attach_data );
6697
+ update_attached_file( $video_id, $new_filename );
6698
+
6699
+ $new_mime = wp_check_filetype( $new_filename );
6700
+ $post = get_post($video_id);
6701
+ $new_guid = str_replace( $path_parts['extension'], $new_mime['ext'], $post->guid );
6702
+
6703
+
6704
+
6705
+ if ( $new_guid != $post->guid ) {
6706
+ $post->guid = $new_guid;
6707
+ global $wpdb;
6708
+ $guid_change = $wpdb->update( $wpdb->posts, //can't use wp_update_post because it won't change GUID
6709
+ array(
6710
+ 'guid' => $new_guid
6711
+ ),
6712
+ array( 'ID' => $video_id ),
6713
+ array( '%s', '%s' ),
6714
+ array( '%d' )
6715
+ );
6716
+ clean_post_cache( $video_id ); //otherwise wp_update_post will get the cached version of the post and the old GUID
6717
+ }
6718
+
6719
+ $post_update = array('ID' => $video_id, 'post_mime_type' => $new_mime['type']);
6720
+ wp_update_post($post_update);
6721
+
6722
+ return $new_url;
6723
+
6724
+ }//end replace true
6725
 
 
6726
  }
6727
+ add_action('kgvid_cron_replace_video_check', 'kgvid_replace_video', 10, 2);
6728
 
6729
  function kgvid_clear_completed_queue($type, $scope = 'site') {
6730
 
6738
  foreach ( $video_encode_queue as $video_key => $queue_entry ) {
6739
  if ( !empty($queue_entry['encode_formats']) ) {
6740
  foreach ( $queue_entry['encode_formats'] as $format => $value ) {
6741
+ if ( $value['status'] == "encoding" ) { //if it's not completed yet
6742
  $keep[$video_key] = true;
6743
  break;
6744
  }
6745
+ if ( ($type == "manual" && $value['status'] == "queued")
6746
+ || ($type == "queued" && $value['status'] == "Encoding Complete")
6747
+ ) {
6748
+ $keep[$video_key] = true;
6749
+ }
6750
  if ( $type == "scheduled" && $value['status'] == "Encoding Complete" ) {
6751
  if ( time() - intval($value['ended']) < 604800 ) { //if it finished less than a week ago
6752
  $keep[$video_key] = true;
 
6753
  }
6754
  }
6755
  if ( !is_network_admin() && $scope == 'site' && array_key_exists('blog_id', $queue_entry) && $queue_entry['blog_id'] != get_current_blog_id() ) { //only clear entries from current blog
6763
  foreach ( $keep as $video_key => $value ) {
6764
  $cleared_video_queue[] = $video_encode_queue[$video_key];
6765
  }
6766
+ $cleared_video_queue = array_merge($cleared_video_queue);
6767
 
6768
  kgvid_save_encode_queue($cleared_video_queue);
6769
 
6776
  if ( current_user_can('encode_videos') ) {
6777
  check_ajax_referer( 'video-embed-thumbnail-generator-nonce', 'security' );
6778
  $scope = $_POST['scope'];
6779
+ $type = $_POST['type'];
6780
+ kgvid_clear_completed_queue($type, $scope);
6781
  $table = kgvid_generate_queue_table($scope);
6782
  echo ($table);
6783
  die();
6795
  $video_encode_queue = kgvid_get_encode_queue();
6796
  if ( is_array($video_encode_queue) && array_key_exists($video_key, $video_encode_queue) ) {
6797
  unset($video_encode_queue[$video_key]);
6798
+ $video_encode_queue = array_merge($video_encode_queue);
6799
  }
6800
  kgvid_save_encode_queue($video_encode_queue);
6801
 
7010
  );
7011
  $videoposts = get_posts( $args );
7012
 
7013
+ if ( $videoposts ) {
7014
  foreach ($videoposts as $post) {
7015
  if ( $post->post_type == "attachment" ) { $post_id = $post->post_parent; }
7016
  else { $post_id = $post->ID; }
7063
  );
7064
  $attachments = get_posts( $args );
7065
 
7066
+ if ( $attachments ) {
7067
+ foreach ( $attachments as $post ) {
7068
  if ( !empty($post->post_parent) ) { //if the video is attached to a post
7069
  $args = array(
7070
  'orderby' => 'post_date',
7075
  'numberposts' => -1
7076
  );
7077
  $thumbnails = get_posts( $args );
7078
+ if ( $thumbnails ) {
7079
  foreach ( $thumbnails as $thumbnail ) {
7080
  $children[$thumbnail->ID] = array( 'post_parent' => $post->post_parent, 'video_id' => $post->ID );
7081
  }
7119
  if ( is_array($queue) && array_key_exists('switching_parents', $queue) && $queue['switching_parents'] ) {
7120
  $new_parent = 'post';
7121
  if (isset($_POST['parent'])) { $new_parent = $_POST['parent']; }
7122
+ if ( is_array($queue) && array_key_exists('switching_parents', $queue) && is_array($queue['switching_parents']) ) {
7123
+ foreach ( $queue['switching_parents'] as $thumbnail_id => $thumbnail ) {
7124
+ if ( $new_parent == 'post' ) {
7125
+ wp_update_post( array( 'ID' => $thumbnail_id, 'post_parent' => $thumbnail['post_parent'] ) );
7126
+ update_post_meta($thumbnail_id, '_kgflashmediaplayer-video-id', $thumbnail['video_id']);
7127
+ }
7128
 
7129
+ if ( $new_parent == 'video' ) {
7130
+ wp_update_post( array( 'ID' => $thumbnail_id, 'post_parent' => $thumbnail['video_id'] ) );
7131
+ }
7132
+ unset($queue['switching_parents'][$thumbnail_id]);
7133
+ update_option('kgvid_video_embed_cms_switch', $queue);
 
 
 
7134
  }
7135
+ unset($queue['switching_parents']);
 
7136
  }
 
7137
  if ( empty($queue) ) { delete_option('kgvid_video_embed_cms_switch'); }
7138
  else { update_option('kgvid_video_embed_cms_switch', $queue); }
7139
  }
7211
  check_ajax_referer( 'video-embed-thumbnail-generator-nonce', 'security' );
7212
  if (isset($_POST['type'])) { $type = $_POST['type']; }
7213
  $queue = get_option('kgvid_video_embed_cms_switch');
7214
+ if ( is_array($queue) && array_key_exists('generating_old_'.$type, $queue) && is_array($queue['generating_old_'.$type]) ) {
7215
 
7216
  foreach ( $queue['generating_old_'.$type] as $video_id ) {
7217
 
7244
  }
7245
  add_action('wp_ajax_kgvid_update_cms_progress', 'kgvid_update_cms_progress');
7246
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7247
  function kgvid_count_play() {
7248
 
7249
  check_ajax_referer( 'kgvid_frontend_nonce', 'security' );
7252
  $event = $_POST['video_event'];
7253
  if ( $event == "play" ) { $event = "starts"; }
7254
  if ( $event == "end" ) { $event = "completeviews"; }
7255
+ $kgvid_postmeta = kgvid_get_attachment_meta($post_id);
7256
+ $plays = $kgvid_postmeta[$event];
7257
  if ( !empty($plays) ) { $plays = intval($plays)+1; }
7258
  else { $plays = 1; }
7259
+ $kgvid_postmeta[$event] = $plays;
7260
+ kgvid_save_attachment_meta($post_id, $kgvid_postmeta);
7261
+ echo number_format(intval($plays));
7262
  die(); // stop executing script
7263
+
7264
  }
7265
  add_action( 'wp_ajax_kgvid_count_play', 'kgvid_count_play' ); // ajax for logged in users
7266
  add_action( 'wp_ajax_nopriv_kgvid_count_play', 'kgvid_count_play' ); // ajax for not logged in users
7290
  <li><code>loop="true/false"</code></li>
7291
  <li><code>autoplay="true/false"</code></li>
7292
  <li><code>watermark="http://www.example.com/image.png"</code> '.sprintf( __('or %s to disable.', 'video-embed-thumbnail-generator'), $false_code ).'</li>
7293
+ <li><code>watermark_link_to=home/parent/attachment/download/false"</code></li>
7294
+ <li><code>watermark_url="http://www.example.com/"</code> '.sprintf( __('or %s to disable. If this is set, it will override the watermark_link_to setting.', 'video-embed-thumbnail-generator'), $false_code ).'</li>
7295
  <li><code>title="Video Title"</code> '.sprintf( __('or %s to disable.', 'video-embed-thumbnail-generator'), $false_code ).'</li>
7296
  <li><code>embedcode="html code"</code> '.sprintf( __('changes text displayed in the embed code overlay in order to provide a custom method for embedding a video or %s to disable.', 'video-embed-thumbnail-generator'), $false_code ).'</li>
7297
  <li><code>view_count="true/false"</code> '.__('turns the view count on or off.', 'video-embed-thumbnail-generator').'</li>
7300
  <li><code>downloadlink="true/false"</code> '.__('generates a link below the video to make it easier for users to save the video file to their computers.', 'video-embed-thumbnail-generator').'</li>
7301
  <li><code>right_click="true/false"</code> '.__('allow or disable right-clicking on the video player.', 'video-embed-thumbnail-generator').'</li>
7302
  <li><code>resize="true/false"</code> '.__('allow or disable responsive resizing.', 'video-embed-thumbnail-generator').'</li>
7303
+ <li><code>auto_res="automatic/highest/lowest"</code> '.__('specify the video resolution when the page loads.', 'video-embed-thumbnail-generator').'</li></ul>
7304
 
7305
  <p><strong>'.__('These options will add a subtitle/caption track.', 'video-embed-thumbnail-generator').'</strong></p>
7306
  <ul><li><code>track_src="http://www.example.com/subtitles.vtt_.txt"</code> '.__('URL of the WebVTT file.', 'video-embed-thumbnail-generator').'</li>
7307
  <li><code>track_kind=subtitles/captions/chapters</code></li>
7308
  <li><code>track_srclang=xx</code> '.__('the track\'s two-character language code (en, fr, es, etc)', 'video-embed-thumbnail-generator').'</li>
7309
+ <li><code>track_label="Track Label"</code> '.__('text that will be shown to the user when selecting the track.', 'video-embed-thumbnail-generator').'</li>
7310
+ <li><code>track_default="default"</code> '.__('track is enabled by default.', 'video-embed-thumbnail-generator').'</li></ul>
7311
 
7312
  <p><strong>'.__('These options will only affect Video.js playback', 'video-embed-thumbnail-generator').'</strong></p>
7313
  <ul><li><code>skin="example-css-class"</code> '.sprintf( __('Completely change the look of the video player. %sInstructions here.', 'video-embed-thumbnail-generator'), '<a href="https://github.com/zencoder/video-js/blob/master/docs/skins.md">' ).'</a></li></ul>
7329
  <li><code>gallery_orderby="menu_order/title/post_date/rand/ID"</code> '.__('criteria for sorting the gallery', 'video-embed-thumbnail-generator').'</li>
7330
  <li><code>gallery_order="ASC/DESC"</code> '.__('sort order', 'video-embed-thumbnail-generator').'</li>
7331
  <li><code>gallery_id="241"</code> '.__('post ID to display a gallery made up of videos associated with a different post.', 'video-embed-thumbnail-generator').'</li>
7332
+ <li><code>gallery_end="close/next"</code> '.__('either close the pop-up or start playing the next video when the current video finishes playing.', 'video-embed-thumbnail-generator').'</li>
7333
+ <li><code>gallery_per_page="xx"</code> '.sprintf( __('or %s to disable pagination. Number of video thumbnails to show on each gallery page.', 'video-embed-thumbnail-generator'), $false_code).'</li>
7334
+ <li><code>gallery_title="true/false"</code> '.__('display the title overlay on gallery thumbnails.', 'video-embed-thumbnail-generator').'</li></ul>'
7335
  ) );
7336
 
7337
  }
7346
  wp_clear_scheduled_hook('kgvid_cleanup_generated_thumbnails');
7347
  kgvid_cleanup_generated_thumbnails_handler(); //run this now because cron won't do it later
7348
  global $wp_roles;
7349
+ if ( is_object($wp_roles) && property_exists($wp_roles, 'roles') ) {
7350
+ foreach ( $options['capabilities'] as $capability => $roles ) {
7351
+ foreach ( $wp_roles->roles as $role => $role_info ) {
7352
+ $wp_roles->remove_cap( $role, $capability );
7353
+ }
7354
  }
7355
  }
7356
  }
video-js/font/vjs.woff CHANGED
Binary file
video-js/kg-video-js-skin.css CHANGED
@@ -9,7 +9,7 @@ The control icons are from a custom font. Each icon corresponds to a character
9
  @font-face {
10
  font-family: 'VideoJS';
11
  src: url('font/vjs.eot');
12
- src: url('font/vjs.eot?#iefix') format('embedded-opentype'), url('font/vjs.woff') format('woff'), url('font/vjs.ttf') format('truetype');
13
  font-weight: normal;
14
  font-style: normal;
15
  }
@@ -18,7 +18,7 @@ The control icons are from a custom font. Each icon corresponds to a character
18
  */
19
  /* Slider - used for Volume bar and Seek bar */
20
  .kg-video-js-skin .vjs-slider {
21
- /* Replace browser focus hightlight with handle highlight */
22
  outline: 0;
23
  position: relative;
24
  cursor: pointer;
@@ -107,6 +107,15 @@ The default control bar that is a container for most of the controls.
107
  .kg-video-js-skin.vjs-using-native-controls .vjs-control-bar {
108
  display: none;
109
  }
 
 
 
 
 
 
 
 
 
110
  /* IE8 is flakey with fonts, and you have to change the actual content to force
111
  fonts to show/hide properly.
112
  - "\9" IE8 hack didn't work for this
@@ -128,7 +137,7 @@ fonts to show/hide properly.
128
  height: 3.0em;
129
  width: 4em;
130
  }
131
- /* FontAwsome button icons */
132
  .kg-video-js-skin .vjs-control:before {
133
  font-family: VideoJS;
134
  font-size: 1.5em;
@@ -177,6 +186,25 @@ fonts to show/hide properly.
177
  .kg-video-js-skin.vjs-playing .vjs-play-control:before {
178
  content: "\e002";
179
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  /* Volume/Mute
181
  -------------------------------------------------------------------------------- */
182
  .kg-video-js-skin .vjs-mute-control,
@@ -238,9 +266,31 @@ fonts to show/hide properly.
238
  width: 1em;
239
  height: 1em;
240
  }
 
 
 
 
 
 
 
 
 
 
 
241
  .kg-video-js-skin .vjs-volume-menu-button .vjs-menu .vjs-menu-content {
242
- width: 6em;
243
- left: -4em;
 
 
 
 
 
 
 
 
 
 
 
244
  }
245
  /* Progress
246
  --------------------------------------------------------------------------------
@@ -287,6 +337,9 @@ fonts to show/hide properly.
287
  height: 100%;
288
  margin: 0;
289
  padding: 0;
 
 
 
290
  /* Needed for IE6 */
291
  left: 0;
292
  top: 0;
@@ -307,6 +360,12 @@ fonts to show/hide properly.
307
  background: #646464 /* IE8- Fallback */;
308
  background: rgba(255, 255, 255, 0.4);
309
  }
 
 
 
 
 
 
310
  .kg-video-js-skin .vjs-seek-handle {
311
  width: 1.5em;
312
  height: 100%;
@@ -463,29 +522,93 @@ height: 100%;
463
  transition-property: color;
464
  transition-duration: 0.4s;
465
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
466
  /* Loading Spinner
467
  --------------------------------------------------------------------------------
468
  */
469
  .vjs-loading-spinner {
 
470
  display: none;
471
  position: absolute;
472
  top: 50%;
473
  left: 50%;
474
- font-size: 5em;
475
  line-height: 1;
476
  width: 1em;
477
  height: 1em;
478
  margin-left: -0.5em;
479
  margin-top: -0.5em;
480
  opacity: 0.75;
 
 
 
 
 
 
481
  /* animation */
482
  -webkit-animation: spin 1.5s infinite linear;
483
  -moz-animation: spin 1.5s infinite linear;
484
  -o-animation: spin 1.5s infinite linear;
485
  animation: spin 1.5s infinite linear;
486
  }
 
 
 
 
 
 
 
 
 
 
487
  .kg-video-js-skin .vjs-loading-spinner:before {
488
- content: "\e00a";
489
  font-family: VideoJS;
490
  position: absolute;
491
  top: 0;
@@ -576,9 +699,14 @@ transition-duration: 0.4s;
576
  -moz-box-shadow: -0.2em -0.2em 0.3em rgba(255, 255, 255, 0.2);
577
  box-shadow: -0.2em -0.2em 0.3em rgba(255, 255, 255, 0.2);
578
  }
579
- .kg-video-js-skin .vjs-menu-button:hover .vjs-menu {
 
580
  display: block;
581
  }
 
 
 
 
582
  .kg-video-js-skin .vjs-menu-button ul li {
583
  list-style: none;
584
  margin: 0;
@@ -623,6 +751,14 @@ transition-duration: 0.4s;
623
  .kg-video-js-skin .vjs-captions-button:before {
624
  content: "\e008";
625
  }
 
 
 
 
 
 
 
 
626
  /* Replacement for focus outline */
627
  .kg-video-js-skin .vjs-captions-button:focus .vjs-control-content:before,
628
  .kg-video-js-skin .vjs-captions-button:hover .vjs-control-content:before {
@@ -651,7 +787,7 @@ control positioning and full window mode. **
651
  easily calculable. */
652
 
653
  font-size: 10px;
654
- /* Allow poster to be vertially aligned. */
655
 
656
  vertical-align: middle;
657
  /* display: table-cell; */
@@ -721,12 +857,15 @@ body.vjs-full-window {
721
  background-repeat: no-repeat;
722
  background-position: 50% 50%;
723
  background-size: contain;
 
724
  cursor: pointer;
725
- height: 100%;
726
  margin: 0;
727
  padding: 0;
728
- position: relative;
729
- width: 100%;
 
 
 
730
  }
731
  .vjs-poster img {
732
  display: block;
@@ -735,6 +874,19 @@ body.vjs-full-window {
735
  padding: 0;
736
  width: 100%;
737
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
738
  /* Hide the poster when native controls are used otherwise it covers them */
739
  .video-js.vjs-using-native-controls .vjs-poster {
740
  display: none;
@@ -742,43 +894,107 @@ body.vjs-full-window {
742
  /* Text Track Styles */
743
  /* Overall track holder for both captions and subtitles */
744
  .video-js .vjs-text-track-display {
745
- text-align: center;
746
  position: absolute;
747
- bottom: 4em;
748
- /* Leave padding on left and right */
749
- left: 1em;
750
- right: 1em;
 
751
  }
752
- /* Individual tracks */
753
- .video-js .vjs-text-track {
754
- display: none;
755
- font-size: 1.4em;
756
- text-align: center;
757
- margin-bottom: 0.1em;
758
- /* Transparent black background, or fallback to all black (oldIE) */
759
- /* background-color-with-alpha */
760
- background-color: #000000;
761
- background-color: rgba(0, 0, 0, 0.5);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
762
  }
763
- .video-js .vjs-subtitles {
764
- color: #ffffff /* Subtitles are white */;
 
 
765
  }
766
- .video-js .vjs-captions {
767
- color: #ffcc66 /* Captions are yellow */;
 
 
768
  }
769
- .vjs-tt-cue {
 
 
 
 
 
770
  display: block;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
771
  }
772
  /* Hide disabled or unsupported controls */
773
- .kg-video-js-skin .vjs-hidden {
774
- display: none;
775
  }
776
  .vjs-lock-showing {
777
  display: block !important;
778
  opacity: 1;
779
  visibility: visible;
780
  }
781
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
782
 
783
 
784
 
9
  @font-face {
10
  font-family: 'VideoJS';
11
  src: url('font/vjs.eot');
12
+ src: url('font/vjs.eot?#iefix') format('embedded-opentype'), url('font/vjs.woff') format('woff'), url('font/vjs.ttf') format('truetype'), url('font/vjs.svg#icomoon') format('svg');
13
  font-weight: normal;
14
  font-style: normal;
15
  }
18
  */
19
  /* Slider - used for Volume bar and Seek bar */
20
  .kg-video-js-skin .vjs-slider {
21
+ /* Replace browser focus highlight with handle highlight */
22
  outline: 0;
23
  position: relative;
24
  cursor: pointer;
107
  .kg-video-js-skin.vjs-using-native-controls .vjs-control-bar {
108
  display: none;
109
  }
110
+ /* The control bar shouldn't show after an error */
111
+ .kg-video-js-skin.vjs-error .vjs-control-bar {
112
+ display: none;
113
+ }
114
+ /* Don't hide the control bar if it's audio */
115
+ .vjs-audio.kg-video-js-skin.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {
116
+ opacity: 1;
117
+ visibility: visible;
118
+ }
119
  /* IE8 is flakey with fonts, and you have to change the actual content to force
120
  fonts to show/hide properly.
121
  - "\9" IE8 hack didn't work for this
137
  height: 3.0em;
138
  width: 4em;
139
  }
140
+ /* Font button icons */
141
  .kg-video-js-skin .vjs-control:before {
142
  font-family: VideoJS;
143
  font-size: 1.5em;
186
  .kg-video-js-skin.vjs-playing .vjs-play-control:before {
187
  content: "\e002";
188
  }
189
+ /* Playback toggle
190
+ --------------------------------------------------------------------------------
191
+ */
192
+ .kg-video-js-skin .vjs-playback-rate .vjs-playback-rate-value {
193
+ font-size: 1.5em;
194
+ line-height: 2;
195
+ position: absolute;
196
+ top: 0;
197
+ left: 0;
198
+ width: 100%;
199
+ height: 100%;
200
+ text-align: center;
201
+ text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
202
+ }
203
+ .kg-video-js-skin .vjs-playback-rate.vjs-menu-button .vjs-menu .vjs-menu-content {
204
+ width: 4em;
205
+ left: -2em;
206
+ list-style: none;
207
+ }
208
  /* Volume/Mute
209
  -------------------------------------------------------------------------------- */
210
  .kg-video-js-skin .vjs-mute-control,
266
  width: 1em;
267
  height: 1em;
268
  }
269
+ /* The volume menu button is like menu buttons (captions/subtitles) but works
270
+ a little differently. It needs to be possible to tab to the volume slider
271
+ without hitting space bar on the menu button. To do this we're not using
272
+ display:none to hide the slider menu by default, and instead setting the
273
+ width and height to zero. */
274
+ .kg-video-js-skin .vjs-volume-menu-button .vjs-menu {
275
+ display: block;
276
+ width: 0;
277
+ height: 0;
278
+ border-top-color: transparent;
279
+ }
280
  .kg-video-js-skin .vjs-volume-menu-button .vjs-menu .vjs-menu-content {
281
+ height: 0;
282
+ width: 0;
283
+ }
284
+ .kg-video-js-skin .vjs-volume-menu-button:hover .vjs-menu,
285
+ .kg-video-js-skin .vjs-volume-menu-button .vjs-menu.vjs-lock-showing {
286
+ border-top-color: rgba(7, 40, 50, 0.5);
287
+ /* Same as ul background */
288
+
289
+ }
290
+ .kg-video-js-skin .vjs-volume-menu-button:hover .vjs-menu .vjs-menu-content,
291
+ .kg-video-js-skin .vjs-volume-menu-button .vjs-menu.vjs-lock-showing .vjs-menu-content {
292
+ height: 2.9em;
293
+ width: 10em;
294
  }
295
  /* Progress
296
  --------------------------------------------------------------------------------
337
  height: 100%;
338
  margin: 0;
339
  padding: 0;
340
+ /* updated by javascript during playback */
341
+
342
+ width: 0;
343
  /* Needed for IE6 */
344
  left: 0;
345
  top: 0;
360
  background: #646464 /* IE8- Fallback */;
361
  background: rgba(255, 255, 255, 0.4);
362
  }
363
+ /* there are child elements of the load progress bar that represent the
364
+ specific time ranges that have been buffered */
365
+ .kg-video-js-skin .vjs-load-progress div {
366
+ background: #787878 /* IE8- Fallback */;
367
+ background: rgba(255, 255, 255, 0.1);
368
+ }
369
  .kg-video-js-skin .vjs-seek-handle {
370
  width: 1.5em;
371
  height: 100%;
522
  transition-property: color;
523
  transition-duration: 0.4s;
524
  }
525
+ /* Error Display
526
+ --------------------------------------------------------------------------------
527
+ */
528
+ .vjs-error-display {
529
+ display: none;
530
+ }
531
+ .vjs-error .vjs-error-display {
532
+ display: block;
533
+ position: absolute;
534
+ left: 0;
535
+ top: 0;
536
+ width: 100%;
537
+ height: 100%;
538
+ }
539
+ .vjs-error .vjs-error-display:before {
540
+ content: 'X';
541
+ font-family: Arial;
542
+ font-size: 4em;
543
+ color: #666666;
544
+ /* In order to center the play icon vertically we need to set the line height
545
+ to the same as the button height */
546
+
547
+ line-height: 1;
548
+ text-shadow: 0.05em 0.05em 0.1em #000;
549
+ text-align: center /* Needed for IE8 */;
550
+ vertical-align: middle;
551
+ position: absolute;
552
+ left: 0;
553
+ top: 50%;
554
+ margin-top: -0.5em;
555
+ width: 100%;
556
+ }
557
+ .vjs-error-display div {
558
+ position: absolute;
559
+ bottom: 1em;
560
+ right: 0;
561
+ left: 0;
562
+ font-size: 1.4em;
563
+ text-align: center;
564
+ padding: 3px;
565
+ background: #000000;
566
+ background: rgba(0, 0, 0, 0.5);
567
+ }
568
+ .vjs-error-display a,
569
+ .vjs-error-display a:visited {
570
+ color: #F4A460;
571
+ }
572
  /* Loading Spinner
573
  --------------------------------------------------------------------------------
574
  */
575
  .vjs-loading-spinner {
576
+ /* Should be hidden by default */
577
  display: none;
578
  position: absolute;
579
  top: 50%;
580
  left: 50%;
581
+ font-size: 4em;
582
  line-height: 1;
583
  width: 1em;
584
  height: 1em;
585
  margin-left: -0.5em;
586
  margin-top: -0.5em;
587
  opacity: 0.75;
588
+ }
589
+ /* Show the spinner when waiting for data and seeking to a new time */
590
+ .vjs-waiting .vjs-loading-spinner,
591
+ .vjs-seeking .vjs-loading-spinner {
592
+ display: block;
593
+ /* only animate when showing because it can be processor heavy */
594
  /* animation */
595
  -webkit-animation: spin 1.5s infinite linear;
596
  -moz-animation: spin 1.5s infinite linear;
597
  -o-animation: spin 1.5s infinite linear;
598
  animation: spin 1.5s infinite linear;
599
  }
600
+ /* Errors are unrecoverable without user interaction so hide the spinner */
601
+ .vjs-error .vjs-loading-spinner {
602
+ display: none;
603
+ /* ensure animation doesn't continue while hidden */
604
+ /* animation */
605
+ -webkit-animation: none;
606
+ -moz-animation: none;
607
+ -o-animation: none;
608
+ animation: none;
609
+ }
610
  .kg-video-js-skin .vjs-loading-spinner:before {
611
+ content: "\e01e";
612
  font-family: VideoJS;
613
  position: absolute;
614
  top: 0;
699
  -moz-box-shadow: -0.2em -0.2em 0.3em rgba(255, 255, 255, 0.2);
700
  box-shadow: -0.2em -0.2em 0.3em rgba(255, 255, 255, 0.2);
701
  }
702
+ .kg-video-js-skin .vjs-menu-button:hover .vjs-control-content .vjs-menu,
703
+ .kg-video-js-skin .vjs-control-content .vjs-menu.vjs-lock-showing {
704
  display: block;
705
  }
706
+ /* prevent menus from opening while scrubbing (FF, IE) */
707
+ .kg-video-js-skin.vjs-scrubbing .vjs-menu-button:hover .vjs-control-content .vjs-menu {
708
+ display: none;
709
+ }
710
  .kg-video-js-skin .vjs-menu-button ul li {
711
  list-style: none;
712
  margin: 0;
751
  .kg-video-js-skin .vjs-captions-button:before {
752
  content: "\e008";
753
  }
754
+ /* Chapters Button */
755
+ .kg-video-js-skin .vjs-chapters-button:before {
756
+ content: "\e00c";
757
+ }
758
+ .kg-video-js-skin .vjs-chapters-button.vjs-menu-button .vjs-menu .vjs-menu-content {
759
+ width: 24em;
760
+ left: -12em;
761
+ }
762
  /* Replacement for focus outline */
763
  .kg-video-js-skin .vjs-captions-button:focus .vjs-control-content:before,
764
  .kg-video-js-skin .vjs-captions-button:hover .vjs-control-content:before {
787
  easily calculable. */
788
 
789
  font-size: 10px;
790
+ /* Allow poster to be vertically aligned. */
791
 
792
  vertical-align: middle;
793
  /* display: table-cell; */
857
  background-repeat: no-repeat;
858
  background-position: 50% 50%;
859
  background-size: contain;
860
+ background-color: #000000;
861
  cursor: pointer;
 
862
  margin: 0;
863
  padding: 0;
864
+ position: absolute;
865
+ top: 0;
866
+ right: 0;
867
+ bottom: 0;
868
+ left: 0;
869
  }
870
  .vjs-poster img {
871
  display: block;
874
  padding: 0;
875
  width: 100%;
876
  }
877
+ /* Hide the poster after the video has started playing */
878
+ .video-js.vjs-has-started .vjs-poster {
879
+ display: none;
880
+ }
881
+ /* Don't hide the poster if we're playing audio */
882
+ .video-js.vjs-audio.vjs-has-started .vjs-poster {
883
+ display: block;
884
+ }
885
+ /* Hide the poster when controls are disabled because it's clickable
886
+ and the native poster can take over */
887
+ .video-js.vjs-controls-disabled .vjs-poster {
888
+ display: none;
889
+ }
890
  /* Hide the poster when native controls are used otherwise it covers them */
891
  .video-js.vjs-using-native-controls .vjs-poster {
892
  display: none;
894
  /* Text Track Styles */
895
  /* Overall track holder for both captions and subtitles */
896
  .video-js .vjs-text-track-display {
 
897
  position: absolute;
898
+ top: 0;
899
+ left: 0;
900
+ bottom: 3em;
901
+ right: 0;
902
+ pointer-events: none;
903
  }
904
+ /* Captions Settings Dialog */
905
+ .vjs-caption-settings {
906
+ position: relative;
907
+ top: 1em;
908
+ background-color: #000;
909
+ opacity: 0.75;
910
+ color: #FFF;
911
+ margin: 0 auto;
912
+ padding: 0.5em;
913
+ height: 15em;
914
+ font-family: Arial, Helvetica, sans-serif;
915
+ font-size: 12px;
916
+ width: 40em;
917
+ }
918
+ .vjs-caption-settings .vjs-tracksettings {
919
+ top: 0;
920
+ bottom: 2em;
921
+ left: 0;
922
+ right: 0;
923
+ position: absolute;
924
+ overflow: auto;
925
+ }
926
+ .vjs-caption-settings .vjs-tracksettings-colors,
927
+ .vjs-caption-settings .vjs-tracksettings-font {
928
+ float: left;
929
  }
930
+ .vjs-caption-settings .vjs-tracksettings-colors:after,
931
+ .vjs-caption-settings .vjs-tracksettings-font:after,
932
+ .vjs-caption-settings .vjs-tracksettings-controls:after {
933
+ clear: both;
934
  }
935
+ .vjs-caption-settings .vjs-tracksettings-controls {
936
+ position: absolute;
937
+ bottom: 1em;
938
+ right: 1em;
939
  }
940
+ .vjs-caption-settings .vjs-tracksetting {
941
+ margin: 5px;
942
+ padding: 3px;
943
+ min-height: 40px;
944
+ }
945
+ .vjs-caption-settings .vjs-tracksetting label {
946
  display: block;
947
+ width: 100px;
948
+ margin-bottom: 5px;
949
+ }
950
+ .vjs-caption-settings .vjs-tracksetting span {
951
+ display: inline;
952
+ margin-left: 5px;
953
+ }
954
+ .vjs-caption-settings .vjs-tracksetting > div {
955
+ margin-bottom: 5px;
956
+ min-height: 20px;
957
+ }
958
+ .vjs-caption-settings .vjs-tracksetting > div:last-child {
959
+ margin-bottom: 0;
960
+ padding-bottom: 0;
961
+ min-height: 0;
962
+ }
963
+ .vjs-caption-settings label > input {
964
+ margin-right: 10px;
965
+ }
966
+ .vjs-caption-settings input[type="button"] {
967
+ width: 40px;
968
+ height: 40px;
969
  }
970
  /* Hide disabled or unsupported controls */
971
+ .vjs-hidden {
972
+ display: none !important;
973
  }
974
  .vjs-lock-showing {
975
  display: block !important;
976
  opacity: 1;
977
  visibility: visible;
978
  }
979
+ /* In IE8 w/ no JavaScript (no HTML5 shim), the video tag doesn't register.
980
+ The .video-js classname on the video tag also isn't considered.
981
+ This optional paragraph inside the video tag can provide a message to users
982
+ about what's required to play video. */
983
+ .vjs-no-js {
984
+ padding: 2em;
985
+ color: #ccc;
986
+ background-color: #333;
987
+ font-size: 1.8em;
988
+ font-family: Arial, sans-serif;
989
+ text-align: center;
990
+ width: 30em;
991
+ height: 15em;
992
+ margin: 0 auto;
993
+ }
994
+ .vjs-no-js a,
995
+ .vjs-no-js a:visited {
996
+ color: #F4A460;
997
+ }
998
 
999
 
1000
 
video-js/lang/ar.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ videojs.addLanguage("ar",{
2
+ "Play": "تشغيل",
3
+ "Pause": "ايقاف",
4
+ "Current Time": "الوقت الحالي",
5
+ "Duration Time": "Dauer",
6
+ "Remaining Time": "الوقت المتبقي",
7
+ "Stream Type": "نوع التيار",
8
+ "LIVE": "مباشر",
9
+ "Loaded": "تم التحميل",
10
+ "Progress": "التقدم",
11
+ "Fullscreen": "ملء الشاشة",
12
+ "Non-Fullscreen": "غير ملء الشاشة",
13
+ "Mute": "صامت",
14
+ "Unmuted": "غير الصامت",
15
+ "Playback Rate": "معدل التشغيل",
16
+ "Subtitles": "الترجمة",
17
+ "subtitles off": "ايقاف الترجمة",
18
+ "Captions": "التعليقات",
19
+ "captions off": "ايقاف التعليقات",
20
+ "Chapters": "فصول",
21
+ "You aborted the video playback": "لقد ألغيت تشغيل الفيديو",
22
+ "A network error caused the video download to fail part-way.": "تسبب خطأ في الشبكة بفشل تحميل الفيديو بالكامل.",
23
+ "The video could not be loaded, either because the server or network failed or because the format is not supported.": "لا يمكن تحميل الفيديو بسبب فشل في الخادم أو الشبكة ، أو فشل بسبب عدم امكانية قراءة تنسيق الفيديو.",
24
+ "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "تم ايقاف تشغيل الفيديو بسبب مشكلة فساد أو لأن الفيديو المستخدم يستخدم ميزات غير مدعومة من متصفحك.",
25
+ "No compatible source was found for this video.": "فشل العثور على أي مصدر متوافق مع هذا الفيديو."
26
+ });
video-js/lang/bg.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ videojs.addLanguage("bg",{
2
+ "Play": "Възпроизвеждане",
3
+ "Pause": "Пауза",
4
+ "Current Time": "Текущо време",
5
+ "Duration Time": "Продължителност",
6
+ "Remaining Time": "Оставащо време",
7
+ "Stream Type": "Тип на потока",
8
+ "LIVE": "НА ЖИВО",
9
+ "Loaded": "Заредено",
10
+ "Progress": "Прогрес",
11
+ "Fullscreen": "Цял екран",
12
+ "Non-Fullscreen": "Спиране на цял екран",
13
+ "Mute": "Без звук",
14
+ "Unmuted": "Със звук",
15
+ "Playback Rate": "Скорост на възпроизвеждане",
16
+ "Subtitles": "Субтитри",
17
+ "subtitles off": "Спряни субтитри",
18
+ "Captions": "Аудио надписи",
19
+ "captions off": "Спряни аудио надписи",
20
+ "Chapters": "Глави",
21
+ "You aborted the video playback": "Спряхте възпроизвеждането на видеото",
22
+ "A network error caused the video download to fail part-way.": "Грешка в мрежата провали изтеглянето на видеото.",
23
+ "The video could not be loaded, either because the server or network failed or because the format is not supported.": "Видеото не може да бъде заредено заради проблем със сървъра или мрежата или защото този формат не е поддържан.",
24
+ "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "Възпроизвеждането на видеото беше прекъснато заради проблем с файла или защото видеото използва опции които браузърът Ви не поддържа.",
25
+ "No compatible source was found for this video.": "Не беше намерен съвместим източник за това видео."
26
+ });
video-js/lang/ca.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ videojs.addLanguage("ca",{
2
+ "Play": "Reproducció",
3
+ "Pause": "Pausa",
4
+ "Current Time": "Temps reproduït",
5
+ "Duration Time": "Durada total",
6
+ "Remaining Time": "Temps restant",
7
+ "Stream Type": "Tipus de seqüència",
8
+ "LIVE": "EN DIRECTE",
9
+ "Loaded": "Carregat",
10
+ "Progress": "Progrés",
11
+ "Fullscreen": "Pantalla completa",
12
+ "Non-Fullscreen": "Pantalla no completa",
13
+ "Mute": "Silencia",
14
+ "Unmuted": "Amb so",
15
+ "Playback Rate": "Velocitat de reproducció",
16
+ "Subtitles": "Subtítols",
17
+ "subtitles off": "Subtítols desactivats",
18
+ "Captions": "Llegendes",
19
+ "captions off": "Llegendes desactivades",
20
+ "Chapters": "Capítols",
21
+ "You aborted the video playback": "Heu interromput la reproducció del vídeo.",
22
+ "A network error caused the video download to fail part-way.": "Un error de la xarxa ha interromput la baixada del vídeo.",
23
+ "The video could not be loaded, either because the server or network failed or because the format is not supported.": "No s'ha pogut carregar el vídeo perquè el servidor o la xarxa han fallat, o bé perquè el seu format no és compatible.",
24
+ "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "La reproducció de vídeo s'ha interrumput per un problema de corrupció de dades o bé perquè el vídeo demanava funcions que el vostre navegador no ofereix.",
25
+ "No compatible source was found for this video.": "No s'ha trobat cap font compatible amb el vídeo."
26
+ });
video-js/lang/cs.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ videojs.addLanguage("cs",{
2
+ "Play": "Přehrát",
3
+ "Pause": "Pauza",
4
+ "Current Time": "Aktuální čas",
5
+ "Duration Time": "Doba trvání",
6
+ "Remaining Time": "Zbývající čas",
7
+ "Stream Type": "Stream Type",
8
+ "LIVE": "ŽIVĚ",
9
+ "Loaded": "Načteno",
10
+ "Progress": "Stav",
11
+ "Fullscreen": "Celá obrazovka",
12
+ "Non-Fullscreen": "Zmenšená obrazovka",
13
+ "Mute": "Ztlumit zvuk",
14
+ "Unmuted": "Přehrát zvuk",
15
+ "Playback Rate": "Rychlost přehrávání",
16
+ "Subtitles": "Titulky",
17
+ "subtitles off": "Titulky vypnuty",
18
+ "Captions": "Popisky",
19
+ "captions off": "Popisky vypnuty",
20
+ "Chapters": "Kapitoly",
21
+ "You aborted the video playback": "Přehrávání videa je přerušeno.",
22
+ "A network error caused the video download to fail part-way.": "Video nemohlo být načteno, kvůli chybě v síti.",
23
+ "The video could not be loaded, either because the server or network failed or because the format is not supported.": "Video nemohlo být načteno, buď kvůli chybě serveru nebo sítě nebo proto, že daný formát není podporován.",
24
+ "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "Váš prohlížeč nepodporuje formát videa.",
25
+ "No compatible source was found for this video.": "Špatně zadaný zdroj videa."
26
+ });
video-js/lang/hu.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ videojs.addLanguage("hu",{
2
+ "Play": "Lejátszás",
3
+ "Pause": "Szünet",
4
+ "Current Time": "Aktuális időpont",
5
+ "Duration Time": "Hossz",
6
+ "Remaining Time": "Hátralévő idő",
7
+ "Stream Type": "Adatfolyam típusa",
8
+ "LIVE": "ÉLŐ",
9
+ "Loaded": "Betöltve",
10
+ "Progress": "Állapot",
11
+ "Fullscreen": "Teljes képernyő",
12
+ "Non-Fullscreen": "Normál méret",
13
+ "Mute": "Némítás",
14
+ "Unmuted": "Némítás kikapcsolva",
15
+ "Playback Rate": "Lejátszási sebesség",
16
+ "Subtitles": "Feliratok",
17
+ "subtitles off": "Feliratok kikapcsolva",
18
+ "Captions": "Magyarázó szöveg",
19
+ "captions off": "Magyarázó szöveg kikapcsolva",
20
+ "Chapters": "Fejezetek",
21
+ "You aborted the video playback": "Leállította a lejátszást",
22
+ "A network error caused the video download to fail part-way.": "Hálózati hiba miatt a videó részlegesen töltődött le.",
23
+ "The video could not be loaded, either because the server or network failed or because the format is not supported.": "A videó nem tölthető be hálózati vagy kiszolgálói hiba miatt, vagy a formátuma nem támogatott.",
24
+ "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "A lejátszás adatsérülés miatt leállt, vagy a videó egyes tulajdonságait a böngészője nem támogatja.",
25
+ "No compatible source was found for this video.": "Nincs kompatibilis forrás ehhez a videóhoz."
26
+ });
video-js/lang/tr.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ videojs.addLanguage("tr",{
2
+ "Play": "Oynat",
3
+ "Pause": "Duraklat",
4
+ "Current Time": "Süre",
5
+ "Duration Time": "Toplam Süre",
6
+ "Remaining Time": "Kalan Süre",
7
+ "Stream Type": "Yayın Tipi",
8
+ "LIVE": "CANLI",
9
+ "Loaded": "Yüklendi",
10
+ "Progress": "Yükleniyor",
11
+ "Fullscreen": "Tam Ekran",
12
+ "Non-Fullscreen": "Küçük Ekran",
13
+ "Mute": "Ses Kapa",
14
+ "Unmuted": "Ses Aç",
15
+ "Playback Rate": "Oynatma Hızı",
16
+ "Subtitles": "Altyazı",
17
+ "subtitles off": "Altyazı Kapat",
18
+ "Captions": "Ek Açıklamalar",
19
+ "captions off": "Ek Açıklamalar Kapalı",
20
+ "Chapters": "Bölümler",
21
+ "You aborted the video playback": "Video oynatmayı iptal ettiniz",
22
+ "A network error caused the video download to fail part-way.": "Video indirilirken bağlantı sorunu oluştu.",
23
+ "The video could not be loaded, either because the server or network failed or because the format is not supported.": "Video oynatılamadı, Ağ yada sunucu hattası veya belirtilen format desteklenmiyor.",
24
+ "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "Tarayıcınız desteklemediği için videoda hata oluştu.",
25
+ "No compatible source was found for this video.": "Video için kaynak bulunamadı."
26
+ });
video-js/lang/vi.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ videojs.addLanguage("vi",{
2
+ "Play": "Phát",
3
+ "Pause": "Tạm dừng",
4
+ "Current Time": "Thời gian hiện tại",
5
+ "Duration Time": "Độ dài",
6
+ "Remaining Time": "Thời gian còn lại",
7
+ "Stream Type": "Kiểu Stream",
8
+ "LIVE": "TRỰC TIẾP",
9
+ "Loaded": "Đã tải",
10
+ "Progress": "Tiến trình",
11
+ "Fullscreen": "Toàn màn hình",
12
+ "Non-Fullscreen": "Thoát toàn màn hình",
13
+ "Mute": "Tắt tiếng",
14
+ "Unmuted": "Bật âm thanh",
15
+ "Playback Rate": "Tốc độ phát",
16
+ "Subtitles": "Phụ đề",
17
+ "subtitles off": "Tắt phụ đề",
18
+ "Captions": "Chú thích",
19
+ "captions off": "Tắt chú thích",
20
+ "Chapters": "Chương",
21
+ "You aborted the video playback": "Bạn đã hủy việc phát video.",
22
+ "A network error caused the video download to fail part-way.": "Một lỗi mạng dẫn đến việc tải video bị lỗi.",
23
+ "The video could not be loaded, either because the server or network failed or because the format is not supported.": "Video không tải được, mạng hay server có lỗi hoặc định dạng không được hỗ trợ.",
24
+ "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "Phát video đã bị hủy do một sai lỗi hoặc video sử dụng những tính năng trình duyệt không hỗ trợ.",
25
+ "No compatible source was found for this video.": "Không có nguồn tương thích cho video này."
26
+ });
video-js/lang/{zh.js → zh-CN.js} RENAMED
@@ -1,4 +1,4 @@
1
- videojs.addLanguage("zh",{
2
  "Play": "播放",
3
  "Pause": "暂停",
4
  "Current Time": "当前时间",
1
+ videojs.addLanguage("zh-CN",{
2
  "Play": "播放",
3
  "Pause": "暂停",
4
  "Current Time": "当前时间",
video-js/lang/zh-TW.js ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ videojs.addLanguage("zh-TW",{
2
+ "Play": "播放",
3
+ "Pause": "暫停",
4
+ "Current Time": "目前時間",
5
+ "Duration Time": "總共時間",
6
+ "Remaining Time": "剩餘時間",
7
+ "Stream Type": "串流類型",
8
+ "LIVE": "直播",
9
+ "Loaded": "載入完畢",
10
+ "Progress": "進度",
11
+ "Fullscreen": "全螢幕",
12
+ "Non-Fullscreen": "退出全螢幕",
13
+ "Mute": "靜音",
14
+ "Unmuted": "取消靜音",
15
+ "Playback Rate": " 播放速率",
16
+ "Subtitles": "字幕",
17
+ "subtitles off": "關閉字幕",
18
+ "Captions": "內嵌字幕",
19
+ "captions off": "關閉內嵌字幕",
20
+ "Chapters": "章節",
21
+ "You aborted the video playback": "影片播放已終止",
22
+ "A network error caused the video download to fail part-way.": "網路錯誤導致影片下載失敗。",
23
+ "The video could not be loaded, either because the server or network failed or because the format is not supported.": "影片因格式不支援或者伺服器或網路的問題無法載入。",
24
+ "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "由於影片檔案損毀或是該影片使用了您的瀏覽器不支援的功能,播放終止。",
25
+ "No compatible source was found for this video.": "無法找到相容此影片的來源。",
26
+ "The video is encrypted and we do not have the keys to decrypt it.": "影片已加密,無法解密。"
27
+ });
video-js/video-js.css CHANGED
@@ -1,5 +1,5 @@
1
  /*!
2
  Video.js Default Styles (http://videojs.com)
3
- Version 4.10.2
4
  Create your own skin at http://designer.videojs.com
5
- */.vjs-default-skin{color:#ccc}@font-face{font-family:VideoJS;src:url(font/vjs.eot);src:url(font/vjs.eot?#iefix) format('embedded-opentype'),url(font/vjs.woff) format('woff'),url(font/vjs.ttf) format('truetype'),url(font/vjs.svg#icomoon) format('svg');font-weight:400;font-style:normal}.vjs-default-skin .vjs-slider{outline:0;position:relative;cursor:pointer;padding:0;background-color:#333;background-color:rgba(51,51,51,.9)}.vjs-default-skin .vjs-slider:focus{-webkit-box-shadow:0 0 2em #fff;-moz-box-shadow:0 0 2em #fff;box-shadow:0 0 2em #fff}.vjs-default-skin .vjs-slider-handle{position:absolute;left:0;top:0}.vjs-default-skin .vjs-slider-handle:before{content:"\e009";font-family:VideoJS;font-size:1em;line-height:1;text-align:center;text-shadow:0 0 1em #fff;position:absolute;top:0;left:0;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.vjs-default-skin .vjs-control-bar{display:none;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#07141e;background-color:rgba(7,20,30,.7)}.vjs-default-skin.vjs-has-started .vjs-control-bar{display:block;visibility:visible;opacity:1;-webkit-transition:visibility .1s,opacity .1s;-moz-transition:visibility .1s,opacity .1s;-o-transition:visibility .1s,opacity .1s;transition:visibility .1s,opacity .1s}.vjs-default-skin.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{display:block;visibility:hidden;opacity:0;-webkit-transition:visibility 1s,opacity 1s;-moz-transition:visibility 1s,opacity 1s;-o-transition:visibility 1s,opacity 1s;transition:visibility 1s,opacity 1s}.vjs-default-skin.vjs-controls-disabled .vjs-control-bar{display:none}.vjs-default-skin.vjs-using-native-controls .vjs-control-bar{display:none}.vjs-default-skin.vjs-error .vjs-control-bar{display:none}.vjs-audio.vjs-default-skin.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible}@media \0screen{.vjs-default-skin.vjs-user-inactive.vjs-playing .vjs-control-bar :before{content:""}}.vjs-default-skin .vjs-control{outline:0;position:relative;float:left;text-align:center;margin:0;padding:0;height:3em;width:4em}.vjs-default-skin .vjs-control:before{font-family:VideoJS;font-size:1.5em;line-height:2;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;text-shadow:1px 1px 1px rgba(0,0,0,.5)}.vjs-default-skin .vjs-control:focus:before,.vjs-default-skin .vjs-control:hover:before{text-shadow:0 0 1em #fff}.vjs-default-skin .vjs-control:focus{}.vjs-default-skin .vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.vjs-default-skin .vjs-play-control{width:5em;cursor:pointer}.vjs-default-skin .vjs-play-control:before{content:"\e001"}.vjs-default-skin.vjs-playing .vjs-play-control:before{content:"\e002"}.vjs-default-skin .vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;text-shadow:1px 1px 1px rgba(0,0,0,.5)}.vjs-default-skin .vjs-playback-rate.vjs-menu-button .vjs-menu .vjs-menu-content{width:4em;left:-2em;list-style:none}.vjs-default-skin .vjs-mute-control,.vjs-default-skin .vjs-volume-menu-button{cursor:pointer;float:right}.vjs-default-skin .vjs-mute-control:before,.vjs-default-skin .vjs-volume-menu-button:before{content:"\e006"}.vjs-default-skin .vjs-mute-control.vjs-vol-0:before,.vjs-default-skin .vjs-volume-menu-button.vjs-vol-0:before{content:"\e003"}.vjs-default-skin .vjs-mute-control.vjs-vol-1:before,.vjs-default-skin .vjs-volume-menu-button.vjs-vol-1:before{content:"\e004"}.vjs-default-skin .vjs-mute-control.vjs-vol-2:before,.vjs-default-skin .vjs-volume-menu-button.vjs-vol-2:before{content:"\e005"}.vjs-default-skin .vjs-volume-control{width:5em;float:right}.vjs-default-skin .vjs-volume-bar{width:5em;height:.6em;margin:1.1em auto 0}.vjs-default-skin .vjs-volume-level{position:absolute;top:0;left:0;height:.5em;width:100%;background:#66a8cc url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC) -50% 0 repeat}.vjs-default-skin .vjs-volume-bar .vjs-volume-handle{width:.5em;height:.5em;left:4.5em}.vjs-default-skin .vjs-volume-handle:before{font-size:.9em;top:-.2em;left:-.2em;width:1em;height:1em}.vjs-default-skin .vjs-volume-menu-button .vjs-menu{display:block;width:0;height:0;border-top-color:transparent}.vjs-default-skin .vjs-volume-menu-button .vjs-menu .vjs-menu-content{height:0;width:0}.vjs-default-skin .vjs-volume-menu-button:hover .vjs-menu,.vjs-default-skin .vjs-volume-menu-button .vjs-menu.vjs-lock-showing{border-top-color:rgba(7,40,50,.5)}.vjs-default-skin .vjs-volume-menu-button:hover .vjs-menu .vjs-menu-content,.vjs-default-skin .vjs-volume-menu-button .vjs-menu.vjs-lock-showing .vjs-menu-content{height:2.9em;width:10em}.vjs-default-skin .vjs-progress-control{position:absolute;left:0;right:0;width:auto;font-size:.3em;height:1em;top:-1em;-webkit-transition:all .4s;-moz-transition:all .4s;-o-transition:all .4s;transition:all .4s}.vjs-default-skin:hover .vjs-progress-control{font-size:.9em;-webkit-transition:all .2s;-moz-transition:all .2s;-o-transition:all .2s;transition:all .2s}.vjs-default-skin .vjs-progress-holder{height:100%}.vjs-default-skin .vjs-progress-holder .vjs-play-progress,.vjs-default-skin .vjs-progress-holder .vjs-load-progress,.vjs-default-skin .vjs-progress-holder .vjs-load-progress div{position:absolute;display:block;height:100%;margin:0;padding:0;width:0;left:0;top:0}.vjs-default-skin .vjs-play-progress{background:#66a8cc url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC) -50% 0 repeat}.vjs-default-skin .vjs-load-progress{background:#646464;background:rgba(255,255,255,.2)}.vjs-default-skin .vjs-load-progress div{background:#787878;background:rgba(255,255,255,.1)}.vjs-default-skin .vjs-seek-handle{width:1.5em;height:100%}.vjs-default-skin .vjs-seek-handle:before{padding-top:.1em}.vjs-default-skin.vjs-live .vjs-time-controls,.vjs-default-skin.vjs-live .vjs-time-divider,.vjs-default-skin.vjs-live .vjs-progress-control{display:none}.vjs-default-skin.vjs-live .vjs-live-display{display:block}.vjs-default-skin .vjs-live-display{display:none;font-size:1em;line-height:3em}.vjs-default-skin .vjs-time-controls{font-size:1em;line-height:3em}.vjs-default-skin .vjs-current-time{float:left}.vjs-default-skin .vjs-duration{float:left}.vjs-default-skin .vjs-remaining-time{display:none;float:left}.vjs-time-divider{float:left;line-height:3em}.vjs-default-skin .vjs-fullscreen-control{width:3.8em;cursor:pointer;float:right}.vjs-default-skin .vjs-fullscreen-control:before{content:"\e000"}.vjs-default-skin.vjs-fullscreen .vjs-fullscreen-control:before{content:"\e00b"}.vjs-default-skin .vjs-big-play-button{left:.5em;top:.5em;font-size:3em;display:block;z-index:2;position:absolute;width:4em;height:2.6em;text-align:center;vertical-align:middle;cursor:pointer;opacity:1;background-color:#07141e;background-color:rgba(7,20,30,.7);border:.1em solid #3b4249;-webkit-border-radius:.8em;-moz-border-radius:.8em;border-radius:.8em;-webkit-box-shadow:0 0 1em rgba(255,255,255,.25);-moz-box-shadow:0 0 1em rgba(255,255,255,.25);box-shadow:0 0 1em rgba(255,255,255,.25);-webkit-transition:all .4s;-moz-transition:all .4s;-o-transition:all .4s;transition:all .4s}.vjs-default-skin.vjs-big-play-centered .vjs-big-play-button{left:50%;margin-left:-2.1em;top:50%;margin-top:-1.4000000000000001em}.vjs-default-skin.vjs-controls-disabled .vjs-big-play-button{display:none}.vjs-default-skin.vjs-has-started .vjs-big-play-button{display:none}.vjs-default-skin.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-default-skin:hover .vjs-big-play-button,.vjs-default-skin .vjs-big-play-button:focus{outline:0;border-color:#fff;background-color:#505050;background-color:rgba(50,50,50,.75);-webkit-box-shadow:0 0 3em #fff;-moz-box-shadow:0 0 3em #fff;box-shadow:0 0 3em #fff;-webkit-transition:all 0s;-moz-transition:all 0s;-o-transition:all 0s;transition:all 0s}.vjs-default-skin .vjs-big-play-button:before{content:"\e001";font-family:VideoJS;line-height:2.6em;text-shadow:.05em .05em .1em #000;text-align:center;position:absolute;left:0;width:100%;height:100%}.vjs-error .vjs-big-play-button{display:none}.vjs-error-display{display:none}.vjs-error .vjs-error-display{display:block;position:absolute;left:0;top:0;width:100%;height:100%}.vjs-error .vjs-error-display:before{content:'X';font-family:Arial;font-size:4em;color:#666;line-height:1;text-shadow:.05em .05em .1em #000;text-align:center;vertical-align:middle;position:absolute;left:0;top:50%;margin-top:-.5em;width:100%}.vjs-error-display div{position:absolute;bottom:1em;right:0;left:0;font-size:1.4em;text-align:center;padding:3px;background:#000;background:rgba(0,0,0,.5)}.vjs-error-display a,.vjs-error-display a:visited{color:#F4A460}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;font-size:4em;line-height:1;width:1em;height:1em;margin-left:-.5em;margin-top:-.5em;opacity:.75}.vjs-waiting .vjs-loading-spinner,.vjs-seeking .vjs-loading-spinner{display:block;-webkit-animation:spin 1.5s infinite linear;-moz-animation:spin 1.5s infinite linear;-o-animation:spin 1.5s infinite linear;animation:spin 1.5s infinite linear}.vjs-error .vjs-loading-spinner{display:none;-webkit-animation:none;-moz-animation:none;-o-animation:none;animation:none}.vjs-default-skin .vjs-loading-spinner:before{content:"\e01e";font-family:VideoJS;position:absolute;top:0;left:0;width:1em;height:1em;text-align:center;text-shadow:0 0 .1em #000}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.vjs-default-skin .vjs-menu-button{float:right;cursor:pointer}.vjs-default-skin .vjs-menu{display:none;position:absolute;bottom:0;left:0;width:0;height:0;margin-bottom:3em;border-left:2em solid transparent;border-right:2em solid transparent;border-top:1.55em solid #000;border-top-color:rgba(7,40,50,.5)}.vjs-default-skin .vjs-menu-button .vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;position:absolute;width:10em;bottom:1.5em;max-height:15em;overflow:auto;left:-5em;background-color:#07141e;background-color:rgba(7,20,30,.7);-webkit-box-shadow:-.2em -.2em .3em rgba(255,255,255,.2);-moz-box-shadow:-.2em -.2em .3em rgba(255,255,255,.2);box-shadow:-.2em -.2em .3em rgba(255,255,255,.2)}.vjs-default-skin .vjs-menu-button:hover .vjs-control-content .vjs-menu,.vjs-default-skin .vjs-control-content .vjs-menu.vjs-lock-showing{display:block}.vjs-default-skin .vjs-menu-button ul li{list-style:none;margin:0;padding:.3em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.vjs-default-skin .vjs-menu-button ul li.vjs-selected{background-color:#000}.vjs-default-skin .vjs-menu-button ul li:focus,.vjs-default-skin .vjs-menu-button ul li:hover,.vjs-default-skin .vjs-menu-button ul li.vjs-selected:focus,.vjs-default-skin .vjs-menu-button ul li.vjs-selected:hover{outline:0;color:#111;background-color:#fff;background-color:rgba(255,255,255,.75);-webkit-box-shadow:0 0 1em #fff;-moz-box-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.vjs-default-skin .vjs-menu-button ul li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em;font-weight:700;cursor:default}.vjs-default-skin .vjs-subtitles-button:before{content:"\e00c"}.vjs-default-skin .vjs-captions-button:before{content:"\e008"}.vjs-default-skin .vjs-chapters-button:before{content:"\e00c"}.vjs-default-skin .vjs-chapters-button.vjs-menu-button .vjs-menu .vjs-menu-content{width:24em;left:-12em}.vjs-default-skin .vjs-captions-button:focus .vjs-control-content:before,.vjs-default-skin .vjs-captions-button:hover .vjs-control-content:before{-webkit-box-shadow:0 0 1em #fff;-moz-box-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.video-js{background-color:#000;position:relative;padding:0;font-size:10px;vertical-align:middle;font-weight:400;font-style:normal;font-family:Arial,sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}.video-js:-moz-full-screen{position:absolute}body.vjs-full-window{padding:0;margin:0;height:100%;overflow-y:auto}.video-js.vjs-fullscreen{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0;width:100%!important;height:100%!important;_position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-poster{background-repeat:no-repeat;background-position:50% 50%;background-size:contain;cursor:pointer;margin:0;padding:0;position:absolute;top:0;right:0;bottom:0;left:0}.vjs-poster img{display:block;margin:0 auto;max-height:100%;padding:0;width:100%}.video-js.vjs-has-started .vjs-poster{display:none}.video-js.vjs-audio.vjs-has-started .vjs-poster{display:block}.video-js.vjs-controls-disabled .vjs-poster{display:none}.video-js.vjs-using-native-controls .vjs-poster{display:none}.video-js .vjs-text-track-display{text-align:center;position:absolute;bottom:4em;left:1em;right:1em}.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{display:none;font-size:1.4em;text-align:center;margin-bottom:.1em;background-color:#000;background-color:rgba(0,0,0,.5)}.video-js .vjs-subtitles{color:#fff}.video-js .vjs-captions{color:#fc6}.vjs-tt-cue{display:block}.video-js.vjs-fullscreen .vjs-text-track{font-size:3em}.vjs-default-skin .vjs-hidden{display:none}.vjs-lock-showing{display:block!important;opacity:1;visibility:visible}.vjs-no-js{padding:20px;color:#ccc;background-color:#333;font-size:18px;font-family:Arial,sans-serif;text-align:center;width:300px;height:150px;margin:0 auto}.vjs-no-js a,.vjs-no-js a:visited{color:#F4A460}
1
  /*!
2
  Video.js Default Styles (http://videojs.com)
3
+ Version 4.12.7
4
  Create your own skin at http://designer.videojs.com
5
+ */.vjs-default-skin{color:#ccc}@font-face{font-family:VideoJS;src:url(font/vjs.eot);src:url(font/vjs.eot?#iefix) format('embedded-opentype'),url(font/vjs.woff) format('woff'),url(font/vjs.ttf) format('truetype'),url(font/vjs.svg#icomoon) format('svg');font-weight:400;font-style:normal}.vjs-default-skin .vjs-slider{outline:0;position:relative;cursor:pointer;padding:0;background-color:#333;background-color:rgba(51,51,51,.9)}.vjs-default-skin .vjs-slider:focus{-webkit-box-shadow:0 0 2em #fff;-moz-box-shadow:0 0 2em #fff;box-shadow:0 0 2em #fff}.vjs-default-skin .vjs-slider-handle{position:absolute;left:0;top:0}.vjs-default-skin .vjs-slider-handle:before{content:"\e009";font-family:VideoJS;font-size:1em;line-height:1;text-align:center;text-shadow:0 0 1em #fff;position:absolute;top:0;left:0;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.vjs-default-skin .vjs-control-bar{display:none;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#07141e;background-color:rgba(7,20,30,.7)}.vjs-default-skin.vjs-has-started .vjs-control-bar{display:block;visibility:visible;opacity:1;-webkit-transition:visibility .1s,opacity .1s;-moz-transition:visibility .1s,opacity .1s;-o-transition:visibility .1s,opacity .1s;transition:visibility .1s,opacity .1s}.vjs-default-skin.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{display:block;visibility:hidden;opacity:0;-webkit-transition:visibility 1s,opacity 1s;-moz-transition:visibility 1s,opacity 1s;-o-transition:visibility 1s,opacity 1s;transition:visibility 1s,opacity 1s}.vjs-default-skin.vjs-controls-disabled .vjs-control-bar{display:none}.vjs-default-skin.vjs-using-native-controls .vjs-control-bar{display:none}.vjs-default-skin.vjs-error .vjs-control-bar{display:none}.vjs-audio.vjs-default-skin.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible}@media \0screen{.vjs-default-skin.vjs-user-inactive.vjs-playing .vjs-control-bar :before{content:""}}.vjs-default-skin .vjs-control{outline:0;position:relative;float:left;text-align:center;margin:0;padding:0;height:3em;width:4em}.vjs-default-skin .vjs-control:before{font-family:VideoJS;font-size:1.5em;line-height:2;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;text-shadow:1px 1px 1px rgba(0,0,0,.5)}.vjs-default-skin .vjs-control:focus:before,.vjs-default-skin .vjs-control:hover:before{text-shadow:0 0 1em #fff}.vjs-default-skin .vjs-control:focus{}.vjs-default-skin .vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.vjs-default-skin .vjs-play-control{width:5em;cursor:pointer}.vjs-default-skin .vjs-play-control:before{content:"\e001"}.vjs-default-skin.vjs-playing .vjs-play-control:before{content:"\e002"}.vjs-default-skin .vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;text-shadow:1px 1px 1px rgba(0,0,0,.5)}.vjs-default-skin .vjs-playback-rate.vjs-menu-button .vjs-menu .vjs-menu-content{width:4em;left:-2em;list-style:none}.vjs-default-skin .vjs-mute-control,.vjs-default-skin .vjs-volume-menu-button{cursor:pointer;float:right}.vjs-default-skin .vjs-mute-control:before,.vjs-default-skin .vjs-volume-menu-button:before{content:"\e006"}.vjs-default-skin .vjs-mute-control.vjs-vol-0:before,.vjs-default-skin .vjs-volume-menu-button.vjs-vol-0:before{content:"\e003"}.vjs-default-skin .vjs-mute-control.vjs-vol-1:before,.vjs-default-skin .vjs-volume-menu-button.vjs-vol-1:before{content:"\e004"}.vjs-default-skin .vjs-mute-control.vjs-vol-2:before,.vjs-default-skin .vjs-volume-menu-button.vjs-vol-2:before{content:"\e005"}.vjs-default-skin .vjs-volume-control{width:5em;float:right}.vjs-default-skin .vjs-volume-bar{width:5em;height:.6em;margin:1.1em auto 0}.vjs-default-skin .vjs-volume-level{position:absolute;top:0;left:0;height:.5em;width:100%;background:#66a8cc url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC) -50% 0 repeat}.vjs-default-skin .vjs-volume-bar .vjs-volume-handle{width:.5em;height:.5em;left:4.5em}.vjs-default-skin .vjs-volume-handle:before{font-size:.9em;top:-.2em;left:-.2em;width:1em;height:1em}.vjs-default-skin .vjs-volume-menu-button .vjs-menu{display:block;width:0;height:0;border-top-color:transparent}.vjs-default-skin .vjs-volume-menu-button .vjs-menu .vjs-menu-content{height:0;width:0}.vjs-default-skin .vjs-volume-menu-button:hover .vjs-menu,.vjs-default-skin .vjs-volume-menu-button .vjs-menu.vjs-lock-showing{border-top-color:rgba(7,40,50,.5)}.vjs-default-skin .vjs-volume-menu-button:hover .vjs-menu .vjs-menu-content,.vjs-default-skin .vjs-volume-menu-button .vjs-menu.vjs-lock-showing .vjs-menu-content{height:2.9em;width:10em}.vjs-default-skin .vjs-progress-control{position:absolute;left:0;right:0;width:auto;font-size:.3em;height:1em;top:-1em;-webkit-transition:all .4s;-moz-transition:all .4s;-o-transition:all .4s;transition:all .4s}.vjs-default-skin:hover .vjs-progress-control{font-size:.9em;-webkit-transition:all .2s;-moz-transition:all .2s;-o-transition:all .2s;transition:all .2s}.vjs-default-skin .vjs-progress-holder{height:100%}.vjs-default-skin .vjs-progress-holder .vjs-play-progress,.vjs-default-skin .vjs-progress-holder .vjs-load-progress,.vjs-default-skin .vjs-progress-holder .vjs-load-progress div{position:absolute;display:block;height:100%;margin:0;padding:0;width:0;left:0;top:0}.vjs-default-skin .vjs-play-progress{background:#66a8cc url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC) -50% 0 repeat}.vjs-default-skin .vjs-load-progress{background:#646464;background:rgba(255,255,255,.2)}.vjs-default-skin .vjs-load-progress div{background:#787878;background:rgba(255,255,255,.1)}.vjs-default-skin .vjs-seek-handle{width:1.5em;height:100%}.vjs-default-skin .vjs-seek-handle:before{padding-top:.1em}.vjs-default-skin.vjs-live .vjs-time-controls,.vjs-default-skin.vjs-live .vjs-time-divider,.vjs-default-skin.vjs-live .vjs-progress-control{display:none}.vjs-default-skin.vjs-live .vjs-live-display{display:block}.vjs-default-skin .vjs-live-display{display:none;font-size:1em;line-height:3em}.vjs-default-skin .vjs-time-controls{font-size:1em;line-height:3em}.vjs-default-skin .vjs-current-time{float:left}.vjs-default-skin .vjs-duration{float:left}.vjs-default-skin .vjs-remaining-time{display:none;float:left}.vjs-time-divider{float:left;line-height:3em}.vjs-default-skin .vjs-fullscreen-control{width:3.8em;cursor:pointer;float:right}.vjs-default-skin .vjs-fullscreen-control:before{content:"\e000"}.vjs-default-skin.vjs-fullscreen .vjs-fullscreen-control:before{content:"\e00b"}.vjs-default-skin .vjs-big-play-button{left:.5em;top:.5em;font-size:3em;display:block;z-index:2;position:absolute;width:4em;height:2.6em;text-align:center;vertical-align:middle;cursor:pointer;opacity:1;background-color:#07141e;background-color:rgba(7,20,30,.7);border:.1em solid #3b4249;-webkit-border-radius:.8em;-moz-border-radius:.8em;border-radius:.8em;-webkit-box-shadow:0 0 1em rgba(255,255,255,.25);-moz-box-shadow:0 0 1em rgba(255,255,255,.25);box-shadow:0 0 1em rgba(255,255,255,.25);-webkit-transition:all .4s;-moz-transition:all .4s;-o-transition:all .4s;transition:all .4s}.vjs-default-skin.vjs-big-play-centered .vjs-big-play-button{left:50%;margin-left:-2.1em;top:50%;margin-top:-1.4000000000000001em}.vjs-default-skin.vjs-controls-disabled .vjs-big-play-button{display:none}.vjs-default-skin.vjs-has-started .vjs-big-play-button{display:none}.vjs-default-skin.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-default-skin:hover .vjs-big-play-button,.vjs-default-skin .vjs-big-play-button:focus{outline:0;border-color:#fff;background-color:#505050;background-color:rgba(50,50,50,.75);-webkit-box-shadow:0 0 3em #fff;-moz-box-shadow:0 0 3em #fff;box-shadow:0 0 3em #fff;-webkit-transition:all 0s;-moz-transition:all 0s;-o-transition:all 0s;transition:all 0s}.vjs-default-skin .vjs-big-play-button:before{content:"\e001";font-family:VideoJS;line-height:2.6em;text-shadow:.05em .05em .1em #000;text-align:center;position:absolute;left:0;width:100%;height:100%}.vjs-error .vjs-big-play-button{display:none}.vjs-error-display{display:none}.vjs-error .vjs-error-display{display:block;position:absolute;left:0;top:0;width:100%;height:100%}.vjs-error .vjs-error-display:before{content:'X';font-family:Arial;font-size:4em;color:#666;line-height:1;text-shadow:.05em .05em .1em #000;text-align:center;vertical-align:middle;position:absolute;left:0;top:50%;margin-top:-.5em;width:100%}.vjs-error-display div{position:absolute;bottom:1em;right:0;left:0;font-size:1.4em;text-align:center;padding:3px;background:#000;background:rgba(0,0,0,.5)}.vjs-error-display a,.vjs-error-display a:visited{color:#F4A460}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;font-size:4em;line-height:1;width:1em;height:1em;margin-left:-.5em;margin-top:-.5em;opacity:.75}.vjs-waiting .vjs-loading-spinner,.vjs-seeking .vjs-loading-spinner{display:block;-webkit-animation:spin 1.5s infinite linear;-moz-animation:spin 1.5s infinite linear;-o-animation:spin 1.5s infinite linear;animation:spin 1.5s infinite linear}.vjs-error .vjs-loading-spinner{display:none;-webkit-animation:none;-moz-animation:none;-o-animation:none;animation:none}.vjs-default-skin .vjs-loading-spinner:before{content:"\e01e";font-family:VideoJS;position:absolute;top:0;left:0;width:1em;height:1em;text-align:center;text-shadow:0 0 .1em #000}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.vjs-default-skin .vjs-menu-button{float:right;cursor:pointer}.vjs-default-skin .vjs-menu{display:none;position:absolute;bottom:0;left:0;width:0;height:0;margin-bottom:3em;border-left:2em solid transparent;border-right:2em solid transparent;border-top:1.55em solid #000;border-top-color:rgba(7,40,50,.5)}.vjs-default-skin .vjs-menu-button .vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;position:absolute;width:10em;bottom:1.5em;max-height:15em;overflow:auto;left:-5em;background-color:#07141e;background-color:rgba(7,20,30,.7);-webkit-box-shadow:-.2em -.2em .3em rgba(255,255,255,.2);-moz-box-shadow:-.2em -.2em .3em rgba(255,255,255,.2);box-shadow:-.2em -.2em .3em rgba(255,255,255,.2)}.vjs-default-skin .vjs-menu-button:hover .vjs-control-content .vjs-menu,.vjs-default-skin .vjs-control-content .vjs-menu.vjs-lock-showing{display:block}.vjs-default-skin.vjs-scrubbing .vjs-menu-button:hover .vjs-control-content .vjs-menu{display:none}.vjs-default-skin .vjs-menu-button ul li{list-style:none;margin:0;padding:.3em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.vjs-default-skin .vjs-menu-button ul li.vjs-selected{background-color:#000}.vjs-default-skin .vjs-menu-button ul li:focus,.vjs-default-skin .vjs-menu-button ul li:hover,.vjs-default-skin .vjs-menu-button ul li.vjs-selected:focus,.vjs-default-skin .vjs-menu-button ul li.vjs-selected:hover{outline:0;color:#111;background-color:#fff;background-color:rgba(255,255,255,.75);-webkit-box-shadow:0 0 1em #fff;-moz-box-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.vjs-default-skin .vjs-menu-button ul li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em;font-weight:700;cursor:default}.vjs-default-skin .vjs-subtitles-button:before{content:"\e00c"}.vjs-default-skin .vjs-captions-button:before{content:"\e008"}.vjs-default-skin .vjs-chapters-button:before{content:"\e00c"}.vjs-default-skin .vjs-chapters-button.vjs-menu-button .vjs-menu .vjs-menu-content{width:24em;left:-12em}.vjs-default-skin .vjs-captions-button:focus .vjs-control-content:before,.vjs-default-skin .vjs-captions-button:hover .vjs-control-content:before{-webkit-box-shadow:0 0 1em #fff;-moz-box-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.video-js{background-color:#000;position:relative;padding:0;font-size:10px;vertical-align:middle;font-weight:400;font-style:normal;font-family:Arial,sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}.video-js:-moz-full-screen{position:absolute}body.vjs-full-window{padding:0;margin:0;height:100%;overflow-y:auto}.video-js.vjs-fullscreen{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0;width:100%!important;height:100%!important;_position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-poster{background-repeat:no-repeat;background-position:50% 50%;background-size:contain;background-color:#000;cursor:pointer;margin:0;padding:0;position:absolute;top:0;right:0;bottom:0;left:0}.vjs-poster img{display:block;margin:0 auto;max-height:100%;padding:0;width:100%}.video-js.vjs-has-started .vjs-poster{display:none}.video-js.vjs-audio.vjs-has-started .vjs-poster{display:block}.video-js.vjs-controls-disabled .vjs-poster{display:none}.video-js.vjs-using-native-controls .vjs-poster{display:none}.video-js .vjs-text-track-display{position:absolute;top:0;left:0;bottom:3em;right:0;pointer-events:none}.vjs-caption-settings{position:relative;top:1em;background-color:#000;opacity:.75;color:#FFF;margin:0 auto;padding:.5em;height:15em;font-family:Arial,Helvetica,sans-serif;font-size:12px;width:40em}.vjs-caption-settings .vjs-tracksettings{top:0;bottom:2em;left:0;right:0;position:absolute;overflow:auto}.vjs-caption-settings .vjs-tracksettings-colors,.vjs-caption-settings .vjs-tracksettings-font{float:left}.vjs-caption-settings .vjs-tracksettings-colors:after,.vjs-caption-settings .vjs-tracksettings-font:after,.vjs-caption-settings .vjs-tracksettings-controls:after{clear:both}.vjs-caption-settings .vjs-tracksettings-controls{position:absolute;bottom:1em;right:1em}.vjs-caption-settings .vjs-tracksetting{margin:5px;padding:3px;min-height:40px}.vjs-caption-settings .vjs-tracksetting label{display:block;width:100px;margin-bottom:5px}.vjs-caption-settings .vjs-tracksetting span{display:inline;margin-left:5px}.vjs-caption-settings .vjs-tracksetting>div{margin-bottom:5px;min-height:20px}.vjs-caption-settings .vjs-tracksetting>div:last-child{margin-bottom:0;padding-bottom:0;min-height:0}.vjs-caption-settings label>input{margin-right:10px}.vjs-caption-settings input[type=button]{width:40px;height:40px}.vjs-hidden{display:none!important}.vjs-lock-showing{display:block!important;opacity:1;visibility:visible}.vjs-no-js{padding:2em;color:#ccc;background-color:#333;font-size:1.8em;font-family:Arial,sans-serif;text-align:center;width:30em;height:15em;margin:0 auto}.vjs-no-js a,.vjs-no-js a:visited{color:#F4A460}
video-js/video-js.swf CHANGED
Binary file
video-js/video.js CHANGED
@@ -1,167 +1,200 @@
1
- /*! Video.js v4.10.2 Copyright 2014 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE */
2
- (function() {var b=void 0,f=!0,k=null,l=!1;function m(){return function(){}}function p(a){return function(){return this[a]}}function q(a){return function(){return a}}var s;document.createElement("video");document.createElement("audio");document.createElement("track");function t(a,c,d){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(t.Ca[a])return t.Ca[a];a=t.w(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.player||new t.Player(a,c,d)}
3
- var videojs=window.videojs=t;t.Vb="4.10";t.Vc="https:"==document.location.protocol?"https://":"http://";
4
- t.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,playbackRates:[],inactivityTimeout:2E3,children:{mediaLoader:{},posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{},errorDisplay:{}},language:document.getElementsByTagName("html")[0].getAttribute("lang")||navigator.languages&&navigator.languages[0]||navigator.ze||navigator.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this video."};
5
- "GENERATED_CDN_VSN"!==t.Vb&&(videojs.options.flash.swf=t.Vc+"vjs.zencdn.net/"+t.Vb+"/video-js.swf");t.hd=function(a,c){t.options.languages[a]=t.options.languages[a]!==b?t.ga.Va(t.options.languages[a],c):c;return t.options.languages};t.Ca={};"function"===typeof define&&define.amd?define([],function(){return videojs}):"object"===typeof exports&&"object"===typeof module&&(module.exports=videojs);t.qa=t.CoreObject=m();
6
- t.qa.extend=function(a){var c,d;a=a||{};c=a.init||a.i||this.prototype.init||this.prototype.i||m();d=function(){c.apply(this,arguments)};d.prototype=t.g.create(this.prototype);d.prototype.constructor=d;d.extend=t.qa.extend;d.create=t.qa.create;for(var e in a)a.hasOwnProperty(e)&&(d.prototype[e]=a[e]);return d};t.qa.create=function(){var a=t.g.create(this.prototype);this.apply(a,arguments);return a};
7
- t.c=function(a,c,d){if(t.g.isArray(c))return u(t.c,a,c,d);var e=t.getData(a);e.C||(e.C={});e.C[c]||(e.C[c]=[]);d.r||(d.r=t.r++);e.C[c].push(d);e.W||(e.disabled=l,e.W=function(c){if(!e.disabled){c=t.rc(c);var d=e.C[c.type];if(d)for(var d=d.slice(0),j=0,n=d.length;j<n&&!c.zc();j++)d[j].call(a,c)}});1==e.C[c].length&&(a.addEventListener?a.addEventListener(c,e.W,l):a.attachEvent&&a.attachEvent("on"+c,e.W))};
8
- t.j=function(a,c,d){if(t.uc(a)){var e=t.getData(a);if(e.C){if(t.g.isArray(c))return u(t.j,a,c,d);if(c){var g=e.C[c];if(g){if(d){if(d.r)for(e=0;e<g.length;e++)g[e].r===d.r&&g.splice(e--,1)}else e.C[c]=[];t.kc(a,c)}}else for(g in e.C)c=g,e.C[c]=[],t.kc(a,c)}}};t.kc=function(a,c){var d=t.getData(a);0===d.C[c].length&&(delete d.C[c],a.removeEventListener?a.removeEventListener(c,d.W,l):a.detachEvent&&a.detachEvent("on"+c,d.W));t.Ib(d.C)&&(delete d.C,delete d.W,delete d.disabled);t.Ib(d)&&t.Ic(a)};
9
- t.rc=function(a){function c(){return f}function d(){return l}if(!a||!a.Jb){var e=a||window.event;a={};for(var g in e)"layerX"!==g&&("layerY"!==g&&"keyLocation"!==g)&&("returnValue"==g&&e.preventDefault||(a[g]=e[g]));a.target||(a.target=a.srcElement||document);a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;a.preventDefault=function(){e.preventDefault&&e.preventDefault();a.returnValue=l;a.Cd=c;a.defaultPrevented=f};a.Cd=d;a.defaultPrevented=l;a.stopPropagation=function(){e.stopPropagation&&
10
- e.stopPropagation();a.cancelBubble=f;a.Jb=c};a.Jb=d;a.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation();a.zc=c;a.stopPropagation()};a.zc=d;if(a.clientX!=k){g=document.documentElement;var h=document.body;a.pageX=a.clientX+(g&&g.scrollLeft||h&&h.scrollLeft||0)-(g&&g.clientLeft||h&&h.clientLeft||0);a.pageY=a.clientY+(g&&g.scrollTop||h&&h.scrollTop||0)-(g&&g.clientTop||h&&h.clientTop||0)}a.which=a.charCode||a.keyCode;a.button!=k&&(a.button=a.button&1?0:a.button&
11
- 4?1:a.button&2?2:0)}return a};t.l=function(a,c){var d=t.uc(a)?t.getData(a):{},e=a.parentNode||a.ownerDocument;"string"===typeof c&&(c={type:c,target:a});c=t.rc(c);d.W&&d.W.call(a,c);if(e&&!c.Jb()&&c.bubbles!==l)t.l(e,c);else if(!e&&!c.defaultPrevented&&(d=t.getData(c.target),c.target[c.type])){d.disabled=f;if("function"===typeof c.target[c.type])c.target[c.type]();d.disabled=l}return!c.defaultPrevented};
12
- t.R=function(a,c,d){function e(){t.j(a,c,e);d.apply(this,arguments)}if(t.g.isArray(c))return u(t.R,a,c,d);e.r=d.r=d.r||t.r++;t.c(a,c,e)};function u(a,c,d,e){t.ic.forEach(d,function(d){a(c,d,e)})}var v=Object.prototype.hasOwnProperty;t.e=function(a,c){var d;c=c||{};d=document.createElement(a||"div");t.g.X(c,function(a,c){-1!==a.indexOf("aria-")||"role"==a?d.setAttribute(a,c):d[a]=c});return d};t.ba=function(a){return a.charAt(0).toUpperCase()+a.slice(1)};t.g={};
13
- t.g.create=Object.create||function(a){function c(){}c.prototype=a;return new c};t.g.X=function(a,c,d){for(var e in a)v.call(a,e)&&c.call(d||this,e,a[e])};t.g.z=function(a,c){if(!c)return a;for(var d in c)v.call(c,d)&&(a[d]=c[d]);return a};t.g.qd=function(a,c){var d,e,g;a=t.g.copy(a);for(d in c)v.call(c,d)&&(e=a[d],g=c[d],a[d]=t.g.Ta(e)&&t.g.Ta(g)?t.g.qd(e,g):c[d]);return a};t.g.copy=function(a){return t.g.z({},a)};
14
- t.g.Ta=function(a){return!!a&&"object"===typeof a&&"[object Object]"===a.toString()&&a.constructor===Object};t.g.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};t.Ed=function(a){return a!==a};t.bind=function(a,c,d){function e(){return c.apply(a,arguments)}c.r||(c.r=t.r++);e.r=d?d+"_"+c.r:c.r;return e};t.va={};t.r=1;t.expando="vdata"+(new Date).getTime();t.getData=function(a){var c=a[t.expando];c||(c=a[t.expando]=t.r++,t.va[c]={});return t.va[c]};
15
- t.uc=function(a){a=a[t.expando];return!(!a||t.Ib(t.va[a]))};t.Ic=function(a){var c=a[t.expando];if(c){delete t.va[c];try{delete a[t.expando]}catch(d){a.removeAttribute?a.removeAttribute(t.expando):a[t.expando]=k}}};t.Ib=function(a){for(var c in a)if(a[c]!==k)return l;return f};t.Sa=function(a,c){return-1!==(" "+a.className+" ").indexOf(" "+c+" ")};t.n=function(a,c){t.Sa(a,c)||(a.className=""===a.className?c:a.className+" "+c)};
16
- t.p=function(a,c){var d,e;if(t.Sa(a,c)){d=a.className.split(" ");for(e=d.length-1;0<=e;e--)d[e]===c&&d.splice(e,1);a.className=d.join(" ")}};t.A=t.e("video");t.O=navigator.userAgent;t.bd=/iPhone/i.test(t.O);t.ad=/iPad/i.test(t.O);t.cd=/iPod/i.test(t.O);t.$c=t.bd||t.ad||t.cd;var aa=t,x;var y=t.O.match(/OS (\d+)_/i);x=y&&y[1]?y[1]:b;aa.oe=x;t.Yc=/Android/i.test(t.O);var ba=t,z;var A=t.O.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i),B,C;
17
- A?(B=A[1]&&parseFloat(A[1]),C=A[2]&&parseFloat(A[2]),z=B&&C?parseFloat(A[1]+"."+A[2]):B?B:k):z=k;ba.Ub=z;t.dd=t.Yc&&/webkit/i.test(t.O)&&2.3>t.Ub;t.Zc=/Firefox/i.test(t.O);t.pe=/Chrome/i.test(t.O);t.ec=!!("ontouchstart"in window||window.Xc&&document instanceof window.Xc);t.Wc="backgroundSize"in t.A.style;t.Kc=function(a,c){t.g.X(c,function(c,e){e===k||"undefined"===typeof e||e===l?a.removeAttribute(c):a.setAttribute(c,e===f?"":e)})};
18
- t.Aa=function(a){var c,d,e,g;c={};if(a&&a.attributes&&0<a.attributes.length){d=a.attributes;for(var h=d.length-1;0<=h;h--){e=d[h].name;g=d[h].value;if("boolean"===typeof a[e]||-1!==",autoplay,controls,loop,muted,default,".indexOf(","+e+","))g=g!==k?f:l;c[e]=g}}return c};
19
- t.ve=function(a,c){var d="";document.defaultView&&document.defaultView.getComputedStyle?d=document.defaultView.getComputedStyle(a,"").getPropertyValue(c):a.currentStyle&&(d=a["client"+c.substr(0,1).toUpperCase()+c.substr(1)]+"px");return d};t.Hb=function(a,c){c.firstChild?c.insertBefore(a,c.firstChild):c.appendChild(a)};t.Oa={};t.w=function(a){0===a.indexOf("#")&&(a=a.slice(1));return document.getElementById(a)};
20
- t.za=function(a,c){c=c||a;var d=Math.floor(a%60),e=Math.floor(a/60%60),g=Math.floor(a/3600),h=Math.floor(c/60%60),j=Math.floor(c/3600);if(isNaN(a)||Infinity===a)g=e=d="-";g=0<g||0<j?g+":":"";return g+(((g||10<=h)&&10>e?"0"+e:e)+":")+(10>d?"0"+d:d)};t.kd=function(){document.body.focus();document.onselectstart=q(l)};t.ke=function(){document.onselectstart=q(f)};t.trim=function(a){return(a+"").replace(/^\s+|\s+$/g,"")};t.round=function(a,c){c||(c=0);return Math.round(a*Math.pow(10,c))/Math.pow(10,c)};
21
- t.zb=function(a,c){return{length:1,start:function(){return a},end:function(){return c}}};
22
- t.get=function(a,c,d,e){var g,h,j,n;d=d||m();"undefined"===typeof XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");});h=new XMLHttpRequest;j=t.Xd(a);n=window.location;j.protocol+j.host!==n.protocol+n.host&&window.XDomainRequest&&!("withCredentials"in
23
- h)?(h=new window.XDomainRequest,h.onload=function(){c(h.responseText)},h.onerror=d,h.onprogress=m(),h.ontimeout=d):(g="file:"==j.protocol||"file:"==n.protocol,h.onreadystatechange=function(){4===h.readyState&&(200===h.status||g&&0===h.status?c(h.responseText):d(h.responseText))});try{h.open("GET",a,f),e&&(h.withCredentials=f)}catch(r){d(r);return}try{h.send()}catch(w){d(w)}};
24
- t.ae=function(a){try{var c=window.localStorage||l;c&&(c.volume=a)}catch(d){22==d.code||1014==d.code?t.log("LocalStorage Full (VideoJS)",d):18==d.code?t.log("LocalStorage not allowed (VideoJS)",d):t.log("LocalStorage Error (VideoJS)",d)}};t.tc=function(a){a.match(/^https?:\/\//)||(a=t.e("div",{innerHTML:'<a href="'+a+'">x</a>'}).firstChild.href);return a};
25
- t.Xd=function(a){var c,d,e,g;g="protocol hostname port pathname search hash host".split(" ");d=t.e("a",{href:a});if(e=""===d.host&&"file:"!==d.protocol)c=t.e("div"),c.innerHTML='<a href="'+a+'"></a>',d=c.firstChild,c.setAttribute("style","display:none; position:absolute;"),document.body.appendChild(c);a={};for(var h=0;h<g.length;h++)a[g[h]]=d[g[h]];e&&document.body.removeChild(c);return a};
26
- function D(a,c){var d,e;d=Array.prototype.slice.call(c);e=m();e=window.console||{log:e,warn:e,error:e};a?d.unshift(a.toUpperCase()+":"):a="log";t.log.history.push(d);d.unshift("VIDEOJS:");if(e[a].apply)e[a].apply(e,d);else e[a](d.join(" "))}t.log=function(){D(k,arguments)};t.log.history=[];t.log.error=function(){D("error",arguments)};t.log.warn=function(){D("warn",arguments)};
27
- t.xd=function(a){var c,d;a.getBoundingClientRect&&a.parentNode&&(c=a.getBoundingClientRect());if(!c)return{left:0,top:0};a=document.documentElement;d=document.body;return{left:t.round(c.left+(window.pageXOffset||d.scrollLeft)-(a.clientLeft||d.clientLeft||0)),top:t.round(c.top+(window.pageYOffset||d.scrollTop)-(a.clientTop||d.clientTop||0))}};t.ic={};t.ic.forEach=function(a,c,d){if(t.g.isArray(a)&&c instanceof Function)for(var e=0,g=a.length;e<g;++e)c.call(d||t,a[e],e,a);return a};t.ga={};
28
- t.ga.Va=function(a,c){var d,e,g;a=t.g.copy(a);for(d in c)c.hasOwnProperty(d)&&(e=a[d],g=c[d],a[d]=t.g.Ta(e)&&t.g.Ta(g)?t.ga.Va(e,g):c[d]);return a};
29
- t.a=t.qa.extend({i:function(a,c,d){this.d=a;this.m=t.g.copy(this.m);c=this.options(c);this.L=c.id||c.el&&c.el.id;this.L||(this.L=(a.id&&a.id()||"no_player")+"_component_"+t.r++);this.Kd=c.name||k;this.b=c.el||this.e();this.P=[];this.Pa={};this.Qa={};this.wc();this.K(d);if(c.Jc!==l){var e,g;this.k().reportUserActivity&&(e=t.bind(this.k(),this.k().reportUserActivity),this.c("touchstart",function(){e();clearInterval(g);g=setInterval(e,250)}),a=function(){e();clearInterval(g)},this.c("touchmove",e),this.c("touchend",
30
- a),this.c("touchcancel",a))}}});s=t.a.prototype;s.dispose=function(){this.l({type:"dispose",bubbles:l});if(this.P)for(var a=this.P.length-1;0<=a;a--)this.P[a].dispose&&this.P[a].dispose();this.Qa=this.Pa=this.P=k;this.j();this.b.parentNode&&this.b.parentNode.removeChild(this.b);t.Ic(this.b);this.b=k};s.d=f;s.k=p("d");s.options=function(a){return a===b?this.m:this.m=t.ga.Va(this.m,a)};s.e=function(a,c){return t.e(a,c)};
31
- s.t=function(a){var c=this.d.language(),d=this.d.languages();return d&&d[c]&&d[c][a]?d[c][a]:a};s.w=p("b");s.ja=function(){return this.v||this.b};s.id=p("L");s.name=p("Kd");s.children=p("P");s.zd=function(a){return this.Pa[a]};s.ka=function(a){return this.Qa[a]};
32
- s.V=function(a,c){var d,e;"string"===typeof a?(e=a,c=c||{},d=c.componentClass||t.ba(e),c.name=e,d=new window.videojs[d](this.d||this,c)):d=a;this.P.push(d);"function"===typeof d.id&&(this.Pa[d.id()]=d);(e=e||d.name&&d.name())&&(this.Qa[e]=d);"function"===typeof d.el&&d.el()&&this.ja().appendChild(d.el());return d};
33
- s.removeChild=function(a){"string"===typeof a&&(a=this.ka(a));if(a&&this.P){for(var c=l,d=this.P.length-1;0<=d;d--)if(this.P[d]===a){c=f;this.P.splice(d,1);break}c&&(this.Pa[a.id]=k,this.Qa[a.name]=k,(c=a.w())&&c.parentNode===this.ja()&&this.ja().removeChild(a.w()))}};
34
- s.wc=function(){var a,c,d,e,g,h;a=this;c=a.options();if(d=c.children)if(h=function(d,e){c[d]!==b&&(e=c[d]);e!==l&&(a[d]=a.V(d,e))},t.g.isArray(d))for(var j=0;j<d.length;j++)e=d[j],"string"==typeof e?(g=e,e={}):g=e.name,h(g,e);else t.g.X(d,h)};s.T=q("");
35
- s.c=function(a,c,d){var e,g,h;"string"===typeof a||t.g.isArray(a)?t.c(this.b,a,t.bind(this,c)):(e=t.bind(this,d),h=this,g=function(){h.j(a,c,e)},g.r=e.r,this.c("dispose",g),d=function(){h.j("dispose",g)},d.r=e.r,a.nodeName?(t.c(a,c,e),t.c(a,"dispose",d)):"function"===typeof a.c&&(a.c(c,e),a.c("dispose",d)));return this};
36
- s.j=function(a,c,d){!a||"string"===typeof a||t.g.isArray(a)?t.j(this.b,a,c):(d=t.bind(this,d),this.j("dispose",d),a.nodeName?(t.j(a,c,d),t.j(a,"dispose",d)):(a.j(c,d),a.j("dispose",d)));return this};s.R=function(a,c,d){var e,g,h;"string"===typeof a||t.g.isArray(a)?t.R(this.b,a,t.bind(this,c)):(e=t.bind(this,d),g=this,h=function(){g.j(a,c,h);e.apply(this,arguments)},h.r=e.r,this.c(a,c,h));return this};s.l=function(a){t.l(this.b,a);return this};
37
- s.K=function(a){a&&(this.la?a.call(this):(this.ab===b&&(this.ab=[]),this.ab.push(a)));return this};s.Ga=function(){this.la=f;var a=this.ab;if(a&&0<a.length){for(var c=0,d=a.length;c<d;c++)a[c].call(this);this.ab=[];this.l("ready")}};s.Sa=function(a){return t.Sa(this.b,a)};s.n=function(a){t.n(this.b,a);return this};s.p=function(a){t.p(this.b,a);return this};s.show=function(){this.b.style.display="block";return this};s.Y=function(){this.b.style.display="none";return this};
38
- function E(a){a.p("vjs-lock-showing")}s.disable=function(){this.Y();this.show=m()};s.width=function(a,c){return F(this,"width",a,c)};s.height=function(a,c){return F(this,"height",a,c)};s.td=function(a,c){return this.width(a,f).height(c)};
39
- function F(a,c,d,e){if(d!==b){if(d===k||t.Ed(d))d=0;a.b.style[c]=-1!==(""+d).indexOf("%")||-1!==(""+d).indexOf("px")?d:"auto"===d?"":d+"px";e||a.l("resize");return a}if(!a.b)return 0;d=a.b.style[c];e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(a.b["offset"+t.ba(c)],10)}
40
- function G(a){var c,d,e,g,h,j,n,r;c=0;d=k;a.c("touchstart",function(a){1===a.touches.length&&(d=a.touches[0],c=(new Date).getTime(),g=f)});a.c("touchmove",function(a){1<a.touches.length?g=l:d&&(j=a.touches[0].pageX-d.pageX,n=a.touches[0].pageY-d.pageY,r=Math.sqrt(j*j+n*n),22<r&&(g=l))});h=function(){g=l};a.c("touchleave",h);a.c("touchcancel",h);a.c("touchend",function(a){d=k;g===f&&(e=(new Date).getTime()-c,250>e&&(a.preventDefault(),this.l("tap")))})}
41
- t.u=t.a.extend({i:function(a,c){t.a.call(this,a,c);G(this);this.c("tap",this.s);this.c("click",this.s);this.c("focus",this.Ya);this.c("blur",this.Xa)}});s=t.u.prototype;
42
- s.e=function(a,c){var d;c=t.g.z({className:this.T(),role:"button","aria-live":"polite",tabIndex:0},c);d=t.a.prototype.e.call(this,a,c);c.innerHTML||(this.v=t.e("div",{className:"vjs-control-content"}),this.xb=t.e("span",{className:"vjs-control-text",innerHTML:this.t(this.ua)||"Need Text"}),this.v.appendChild(this.xb),d.appendChild(this.v));return d};s.T=function(){return"vjs-control "+t.a.prototype.T.call(this)};s.s=m();s.Ya=function(){t.c(document,"keydown",t.bind(this,this.Z))};
43
- s.Z=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.s()};s.Xa=function(){t.j(document,"keydown",t.bind(this,this.Z))};
44
- t.S=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.jd=this.ka(this.m.barName);this.handle=this.ka(this.m.handleName);this.c("mousedown",this.Za);this.c("touchstart",this.Za);this.c("focus",this.Ya);this.c("blur",this.Xa);this.c("click",this.s);this.c(a,"controlsvisible",this.update);this.c(a,this.Ec,this.update);this.F={};this.F.move=t.bind(this,this.$a);this.F.end=t.bind(this,this.Mb)}});s=t.S.prototype;
45
- s.dispose=function(){t.j(document,"mousemove",this.F.move,l);t.j(document,"mouseup",this.F.end,l);t.j(document,"touchmove",this.F.move,l);t.j(document,"touchend",this.F.end,l);t.j(document,"keyup",t.bind(this,this.Z));t.a.prototype.dispose.call(this)};s.e=function(a,c){c=c||{};c.className+=" vjs-slider";c=t.g.z({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},c);return t.a.prototype.e.call(this,a,c)};
46
- s.Za=function(a){a.preventDefault();t.kd();this.n("vjs-sliding");t.c(document,"mousemove",this.F.move);t.c(document,"mouseup",this.F.end);t.c(document,"touchmove",this.F.move);t.c(document,"touchend",this.F.end);this.$a(a)};s.$a=m();s.Mb=function(){t.ke();this.p("vjs-sliding");t.j(document,"mousemove",this.F.move,l);t.j(document,"mouseup",this.F.end,l);t.j(document,"touchmove",this.F.move,l);t.j(document,"touchend",this.F.end,l);this.update()};
47
- s.update=function(){if(this.b){var a,c=this.Gb(),d=this.handle,e=this.jd;isNaN(c)&&(c=0);a=c;if(d){a=this.b.offsetWidth;var g=d.w().offsetWidth;a=g?g/a:0;c*=1-a;a=c+a/2;d.w().style.left=t.round(100*c,2)+"%"}e&&(e.w().style.width=t.round(100*a,2)+"%")}};
48
- function H(a,c){var d,e,g,h;d=a.b;e=t.xd(d);h=g=d.offsetWidth;d=a.handle;if(a.options().vertical)return h=e.top,e=c.changedTouches?c.changedTouches[0].pageY:c.pageY,d&&(d=d.w().offsetHeight,h+=d/2,g-=d),Math.max(0,Math.min(1,(h-e+g)/g));g=e.left;e=c.changedTouches?c.changedTouches[0].pageX:c.pageX;d&&(d=d.w().offsetWidth,g+=d/2,h-=d);return Math.max(0,Math.min(1,(e-g)/h))}s.Ya=function(){t.c(document,"keyup",t.bind(this,this.Z))};
49
- s.Z=function(a){if(37==a.which||40==a.which)a.preventDefault(),this.Nc();else if(38==a.which||39==a.which)a.preventDefault(),this.Oc()};s.Xa=function(){t.j(document,"keyup",t.bind(this,this.Z))};s.s=function(a){a.stopImmediatePropagation();a.preventDefault()};t.$=t.a.extend();t.$.prototype.defaultValue=0;
50
- t.$.prototype.e=function(a,c){c=c||{};c.className+=" vjs-slider-handle";c=t.g.z({innerHTML:'<span class="vjs-control-text">'+this.defaultValue+"</span>"},c);return t.a.prototype.e.call(this,"div",c)};t.ha=t.a.extend();function ca(a,c){a.V(c);c.c("click",t.bind(a,function(){E(this)}))}
51
- t.ha.prototype.e=function(){var a=this.options().lc||"ul";this.v=t.e(a,{className:"vjs-menu-content"});a=t.a.prototype.e.call(this,"div",{append:this.v,className:"vjs-menu"});a.appendChild(this.v);t.c(a,"click",function(a){a.preventDefault();a.stopImmediatePropagation()});return a};t.J=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.selected(c.selected)}});t.J.prototype.e=function(a,c){return t.u.prototype.e.call(this,"li",t.g.z({className:"vjs-menu-item",innerHTML:this.t(this.m.label)},c))};
52
- t.J.prototype.s=function(){this.selected(f)};t.J.prototype.selected=function(a){a?(this.n("vjs-selected"),this.b.setAttribute("aria-selected",f)):(this.p("vjs-selected"),this.b.setAttribute("aria-selected",l))};t.N=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.Ba=this.xa();this.V(this.Ba);this.Q&&0===this.Q.length&&this.Y();this.c("keyup",this.Z);this.b.setAttribute("aria-haspopup",f);this.b.setAttribute("role","button")}});s=t.N.prototype;s.ta=l;
53
- s.xa=function(){var a=new t.ha(this.d);this.options().title&&a.ja().appendChild(t.e("li",{className:"vjs-menu-title",innerHTML:t.ba(this.options().title),he:-1}));if(this.Q=this.createItems())for(var c=0;c<this.Q.length;c++)ca(a,this.Q[c]);return a};s.wa=m();s.T=function(){return this.className+" vjs-menu-button "+t.u.prototype.T.call(this)};s.Ya=m();s.Xa=m();s.s=function(){this.R("mouseout",t.bind(this,function(){E(this.Ba);this.b.blur()}));this.ta?I(this):J(this)};
54
- s.Z=function(a){a.preventDefault();32==a.which||13==a.which?this.ta?I(this):J(this):27==a.which&&this.ta&&I(this)};function J(a){a.ta=f;a.Ba.n("vjs-lock-showing");a.b.setAttribute("aria-pressed",f);a.Q&&0<a.Q.length&&a.Q[0].w().focus()}function I(a){a.ta=l;E(a.Ba);a.b.setAttribute("aria-pressed",l)}t.D=function(a){"number"===typeof a?this.code=a:"string"===typeof a?this.message=a:"object"===typeof a&&t.g.z(this,a);this.message||(this.message=t.D.rd[this.code]||"")};t.D.prototype.code=0;
55
- t.D.prototype.message="";t.D.prototype.status=k;t.D.Ra="MEDIA_ERR_CUSTOM MEDIA_ERR_ABORTED MEDIA_ERR_NETWORK MEDIA_ERR_DECODE MEDIA_ERR_SRC_NOT_SUPPORTED MEDIA_ERR_ENCRYPTED".split(" ");
56
- t.D.rd={1:"You aborted the video playback",2:"A network error caused the video download to fail part-way.",3:"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.",4:"The video could not be loaded, either because the server or network failed or because the format is not supported.",5:"The video is encrypted and we do not have the keys to decrypt it."};for(var K=0;K<t.D.Ra.length;K++)t.D[t.D.Ra[K]]=K,t.D.prototype[t.D.Ra[K]]=K;
57
- var L,M,N,O;
58
- L=["requestFullscreen exitFullscreen fullscreenElement fullscreenEnabled fullscreenchange fullscreenerror".split(" "),"webkitRequestFullscreen webkitExitFullscreen webkitFullscreenElement webkitFullscreenEnabled webkitfullscreenchange webkitfullscreenerror".split(" "),"webkitRequestFullScreen webkitCancelFullScreen webkitCurrentFullScreenElement webkitCancelFullScreen webkitfullscreenchange webkitfullscreenerror".split(" "),"mozRequestFullScreen mozCancelFullScreen mozFullScreenElement mozFullScreenEnabled mozfullscreenchange mozfullscreenerror".split(" "),"msRequestFullscreen msExitFullscreen msFullscreenElement msFullscreenEnabled MSFullscreenChange MSFullscreenError".split(" ")];
59
- M=L[0];for(O=0;O<L.length;O++)if(L[O][1]in document){N=L[O];break}if(N){t.Oa.Fb={};for(O=0;O<N.length;O++)t.Oa.Fb[M[O]]=N[O]}
60
- t.Player=t.a.extend({i:function(a,c,d){this.I=a;a.id=a.id||"vjs_video_"+t.r++;this.ie=a&&t.Aa(a);c=t.g.z(da(a),c);this.Ua=c.language||t.options.language;this.Id=c.languages||t.options.languages;this.G={};this.Fc=c.poster||"";this.yb=!!c.controls;a.controls=l;c.Jc=l;P(this,"audio"===this.I.nodeName.toLowerCase());t.a.call(this,this,c,d);this.controls()?this.n("vjs-controls-enabled"):this.n("vjs-controls-disabled");P(this)&&this.n("vjs-audio");t.Ca[this.L]=this;c.plugins&&t.g.X(c.plugins,function(a,
61
- c){this[a](c)},this);var e,g,h,j,n,r;e=t.bind(this,this.reportUserActivity);this.c("mousedown",function(){e();clearInterval(g);g=setInterval(e,250)});this.c("mousemove",function(a){if(a.screenX!=n||a.screenY!=r)n=a.screenX,r=a.screenY,e()});this.c("mouseup",function(){e();clearInterval(g)});this.c("keydown",e);this.c("keyup",e);h=setInterval(t.bind(this,function(){if(this.pa){this.pa=l;this.userActive(f);clearTimeout(j);var a=this.options().inactivityTimeout;0<a&&(j=setTimeout(t.bind(this,function(){this.pa||
62
- this.userActive(l)}),a))}}),250);this.c("dispose",function(){clearInterval(h);clearTimeout(j)})}});s=t.Player.prototype;s.language=function(a){if(a===b)return this.Ua;this.Ua=a;return this};s.languages=p("Id");s.m=t.options;s.dispose=function(){this.l("dispose");this.j("dispose");t.Ca[this.L]=k;this.I&&this.I.player&&(this.I.player=k);this.b&&this.b.player&&(this.b.player=k);this.o&&this.o.dispose();t.a.prototype.dispose.call(this)};
63
- function da(a){var c,d,e={sources:[],tracks:[]};c=t.Aa(a);d=c["data-setup"];d!==k&&t.g.z(c,t.JSON.parse(d||"{}"));t.g.z(e,c);if(a.hasChildNodes()){var g,h;a=a.childNodes;g=0;for(h=a.length;g<h;g++)c=a[g],d=c.nodeName.toLowerCase(),"source"===d?e.sources.push(t.Aa(c)):"track"===d&&e.tracks.push(t.Aa(c))}return e}
64
- s.e=function(){var a=this.b=t.a.prototype.e.call(this,"div"),c=this.I,d;c.removeAttribute("width");c.removeAttribute("height");if(c.hasChildNodes()){var e,g,h,j,n;e=c.childNodes;g=e.length;for(n=[];g--;)h=e[g],j=h.nodeName.toLowerCase(),"track"===j&&n.push(h);for(e=0;e<n.length;e++)c.removeChild(n[e])}d=t.Aa(c);t.g.X(d,function(c){"class"==c?a.className=d[c]:a.setAttribute(c,d[c])});c.id+="_html5_api";c.className="vjs-tech";c.player=a.player=this;this.n("vjs-paused");this.width(this.m.width,f);this.height(this.m.height,
65
- f);c.Bd=c.networkState;c.parentNode&&c.parentNode.insertBefore(a,c);t.Hb(c,a);this.b=a;this.c("loadstart",this.Pd);this.c("waiting",this.Vd);this.c(["canplay","canplaythrough","playing","ended"],this.Ud);this.c("seeking",this.Sd);this.c("seeked",this.Rd);this.c("ended",this.Ld);this.c("play",this.Ob);this.c("firstplay",this.Nd);this.c("pause",this.Nb);this.c("progress",this.Qd);this.c("durationchange",this.Cc);this.c("fullscreenchange",this.Od);return a};
66
- function Q(a,c,d){a.o&&(a.la=l,a.o.dispose(),a.o=l);"Html5"!==c&&a.I&&(t.h.Bb(a.I),a.I=k);a.eb=c;a.la=l;var e=t.g.z({source:d,parentEl:a.b},a.m[c.toLowerCase()]);d&&(a.nc=d.type,d.src==a.G.src&&0<a.G.currentTime&&(e.startTime=a.G.currentTime),a.G.src=d.src);a.o=new window.videojs[c](a,e);a.o.K(function(){this.d.Ga()})}s.Pd=function(){this.error(k);this.paused()?(R(this,l),this.R("play",function(){R(this,f)})):this.l("firstplay")};s.vc=l;
67
- function R(a,c){c!==b&&a.vc!==c&&((a.vc=c)?(a.n("vjs-has-started"),a.l("firstplay")):a.p("vjs-has-started"))}s.Ob=function(){this.p("vjs-paused");this.n("vjs-playing")};s.Vd=function(){this.n("vjs-waiting")};s.Ud=function(){this.p("vjs-waiting")};s.Sd=function(){this.n("vjs-seeking")};s.Rd=function(){this.p("vjs-seeking")};s.Nd=function(){this.m.starttime&&this.currentTime(this.m.starttime);this.n("vjs-has-started")};s.Nb=function(){this.p("vjs-playing");this.n("vjs-paused")};
68
- s.Qd=function(){1==this.bufferedPercent()&&this.l("loadedalldata")};s.Ld=function(){this.m.loop?(this.currentTime(0),this.play()):this.paused()||this.pause()};s.Cc=function(){var a=S(this,"duration");a&&(0>a&&(a=Infinity),this.duration(a),Infinity===a?this.n("vjs-live"):this.p("vjs-live"))};s.Od=function(){this.isFullscreen()?this.n("vjs-fullscreen"):this.p("vjs-fullscreen")};function T(a,c,d){if(a.o&&!a.o.la)a.o.K(function(){this[c](d)});else try{a.o[c](d)}catch(e){throw t.log(e),e;}}
69
- function S(a,c){if(a.o&&a.o.la)try{return a.o[c]()}catch(d){throw a.o[c]===b?t.log("Video.js: "+c+" method not defined for "+a.eb+" playback technology.",d):"TypeError"==d.name?(t.log("Video.js: "+c+" unavailable on "+a.eb+" playback technology element.",d),a.o.la=l):t.log(d),d;}}s.play=function(){T(this,"play");return this};s.pause=function(){T(this,"pause");return this};s.paused=function(){return S(this,"paused")===l?l:f};
70
- s.currentTime=function(a){return a!==b?(T(this,"setCurrentTime",a),this):this.G.currentTime=S(this,"currentTime")||0};s.duration=function(a){if(a!==b)return this.G.duration=parseFloat(a),this;this.G.duration===b&&this.Cc();return this.G.duration||0};s.remainingTime=function(){return this.duration()-this.currentTime()};s.buffered=function(){var a=S(this,"buffered");if(!a||!a.length)a=t.zb(0,0);return a};
71
- s.bufferedPercent=function(){var a=this.duration(),c=this.buffered(),d=0,e,g;if(!a)return 0;for(var h=0;h<c.length;h++)e=c.start(h),g=c.end(h),g>a&&(g=a),d+=g-e;return d/a};s.volume=function(a){if(a!==b)return a=Math.max(0,Math.min(1,parseFloat(a))),this.G.volume=a,T(this,"setVolume",a),t.ae(a),this;a=parseFloat(S(this,"volume"));return isNaN(a)?1:a};s.muted=function(a){return a!==b?(T(this,"setMuted",a),this):S(this,"muted")||l};s.Ea=function(){return S(this,"supportsFullScreen")||l};s.yc=l;
72
- s.isFullscreen=function(a){return a!==b?(this.yc=!!a,this):this.yc};s.isFullScreen=function(a){t.log.warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase "s")');return this.isFullscreen(a)};
73
- s.requestFullscreen=function(){var a=t.Oa.Fb;this.isFullscreen(f);a?(t.c(document,a.fullscreenchange,t.bind(this,function(c){this.isFullscreen(document[a.fullscreenElement]);this.isFullscreen()===l&&t.j(document,a.fullscreenchange,arguments.callee);this.l("fullscreenchange")})),this.b[a.requestFullscreen]()):this.o.Ea()?T(this,"enterFullScreen"):(this.qc(),this.l("fullscreenchange"));return this};
74
- s.requestFullScreen=function(){t.log.warn('player.requestFullScreen() has been deprecated, use player.requestFullscreen() with a lowercase "s")');return this.requestFullscreen()};s.exitFullscreen=function(){var a=t.Oa.Fb;this.isFullscreen(l);if(a)document[a.exitFullscreen]();else this.o.Ea()?T(this,"exitFullScreen"):(this.Cb(),this.l("fullscreenchange"));return this};s.cancelFullScreen=function(){t.log.warn("player.cancelFullScreen() has been deprecated, use player.exitFullscreen()");return this.exitFullscreen()};
75
- s.qc=function(){this.Dd=f;this.ud=document.documentElement.style.overflow;t.c(document,"keydown",t.bind(this,this.sc));document.documentElement.style.overflow="hidden";t.n(document.body,"vjs-full-window");this.l("enterFullWindow")};s.sc=function(a){27===a.keyCode&&(this.isFullscreen()===f?this.exitFullscreen():this.Cb())};s.Cb=function(){this.Dd=l;t.j(document,"keydown",this.sc);document.documentElement.style.overflow=this.ud;t.p(document.body,"vjs-full-window");this.l("exitFullWindow")};
76
- s.selectSource=function(a){for(var c=0,d=this.m.techOrder;c<d.length;c++){var e=t.ba(d[c]),g=window.videojs[e];if(g){if(g.isSupported())for(var h=0,j=a;h<j.length;h++){var n=j[h];if(g.canPlaySource(n))return{source:n,o:e}}}else t.log.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.')}return l};
77
- s.src=function(a){if(a===b)return S(this,"src");t.g.isArray(a)?U(this,a):"string"===typeof a?this.src({src:a}):a instanceof Object&&(a.type&&!window.videojs[this.eb].canPlaySource(a)?U(this,[a]):(this.G.src=a.src,this.nc=a.type||"",this.K(function(){T(this,"src",a.src);"auto"==this.m.preload&&this.load();this.m.autoplay&&this.play()})));return this};
78
- function U(a,c){var d=a.selectSource(c),e;d?d.o===a.eb?a.src(d.source):Q(a,d.o,d.source):(e=setTimeout(t.bind(a,function(){this.error({code:4,message:this.t(this.options().notSupportedMessage)})}),0),a.Ga(),a.c("dispose",function(){clearTimeout(e)}))}s.load=function(){T(this,"load");return this};s.currentSrc=function(){return S(this,"currentSrc")||this.G.src||""};s.pd=function(){return this.nc||""};s.Da=function(a){return a!==b?(T(this,"setPreload",a),this.m.preload=a,this):S(this,"preload")};
79
- s.autoplay=function(a){return a!==b?(T(this,"setAutoplay",a),this.m.autoplay=a,this):S(this,"autoplay")};s.loop=function(a){return a!==b?(T(this,"setLoop",a),this.m.loop=a,this):S(this,"loop")};s.poster=function(a){if(a===b)return this.Fc;a||(a="");this.Fc=a;T(this,"setPoster",a);this.l("posterchange");return this};
80
- s.controls=function(a){return a!==b?(a=!!a,this.yb!==a&&((this.yb=a)?(this.p("vjs-controls-disabled"),this.n("vjs-controls-enabled"),this.l("controlsenabled")):(this.p("vjs-controls-enabled"),this.n("vjs-controls-disabled"),this.l("controlsdisabled"))),this):this.yb};t.Player.prototype.Tb;s=t.Player.prototype;
81
- s.usingNativeControls=function(a){return a!==b?(a=!!a,this.Tb!==a&&((this.Tb=a)?(this.n("vjs-using-native-controls"),this.l("usingnativecontrols")):(this.p("vjs-using-native-controls"),this.l("usingcustomcontrols"))),this):this.Tb};s.da=k;s.error=function(a){if(a===b)return this.da;if(a===k)return this.da=a,this.p("vjs-error"),this;this.da=a instanceof t.D?a:new t.D(a);this.l("error");this.n("vjs-error");t.log.error("(CODE:"+this.da.code+" "+t.D.Ra[this.da.code]+")",this.da.message,this.da);return this};
82
- s.ended=function(){return S(this,"ended")};s.seeking=function(){return S(this,"seeking")};s.pa=f;s.reportUserActivity=function(){this.pa=f};s.Sb=f;s.userActive=function(a){return a!==b?(a=!!a,a!==this.Sb&&((this.Sb=a)?(this.pa=f,this.p("vjs-user-inactive"),this.n("vjs-user-active"),this.l("useractive")):(this.pa=l,this.o&&this.o.R("mousemove",function(a){a.stopPropagation();a.preventDefault()}),this.p("vjs-user-active"),this.n("vjs-user-inactive"),this.l("userinactive"))),this):this.Sb};
83
- s.playbackRate=function(a){return a!==b?(T(this,"setPlaybackRate",a),this):this.o&&this.o.featuresPlaybackRate?S(this,"playbackRate"):1};s.xc=l;function P(a,c){return c!==b?(a.xc=!!c,a):a.xc}t.Ja=t.a.extend();t.Ja.prototype.m={we:"play",children:{playToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},liveDisplay:{},progressControl:{},fullscreenToggle:{},volumeControl:{},muteToggle:{},playbackRateMenuButton:{}}};t.Ja.prototype.e=function(){return t.e("div",{className:"vjs-control-bar"})};
84
- t.Yb=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.Yb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-live-controls vjs-control"});this.v=t.e("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.t("Stream Type")+"</span>"+this.t("LIVE"),"aria-live":"off"});a.appendChild(this.v);return a};t.ac=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.c(a,"play",this.Ob);this.c(a,"pause",this.Nb)}});s=t.ac.prototype;s.ua="Play";
85
- s.T=function(){return"vjs-play-control "+t.u.prototype.T.call(this)};s.s=function(){this.d.paused()?this.d.play():this.d.pause()};s.Ob=function(){this.p("vjs-paused");this.n("vjs-playing");this.b.children[0].children[0].innerHTML=this.t("Pause")};s.Nb=function(){this.p("vjs-playing");this.n("vjs-paused");this.b.children[0].children[0].innerHTML=this.t("Play")};t.hb=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.c(a,"timeupdate",this.fa)}});
86
- t.hb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});this.v=t.e("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00',"aria-live":"off"});a.appendChild(this.v);return a};t.hb.prototype.fa=function(){var a=this.d.bb?this.d.G.currentTime:this.d.currentTime();this.v.innerHTML='<span class="vjs-control-text">'+this.t("Current Time")+"</span> "+t.za(a,this.d.duration())};
87
- t.ib=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.c(a,"timeupdate",this.fa)}});t.ib.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});this.v=t.e("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.t("Duration Time")+"</span> 0:00","aria-live":"off"});a.appendChild(this.v);return a};
88
- t.ib.prototype.fa=function(){var a=this.d.duration();a&&(this.v.innerHTML='<span class="vjs-control-text">'+this.t("Duration Time")+"</span> "+t.za(a))};t.gc=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.gc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-time-divider",innerHTML:"<div><span>/</span></div>"})};t.pb=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.c(a,"timeupdate",this.fa)}});
89
- t.pb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.v=t.e("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.t("Remaining Time")+"</span> -0:00","aria-live":"off"});a.appendChild(this.v);return a};t.pb.prototype.fa=function(){this.d.duration()&&(this.v.innerHTML='<span class="vjs-control-text">'+this.t("Remaining Time")+"</span> -"+t.za(this.d.remainingTime()))};
90
- t.Ka=t.u.extend({i:function(a,c){t.u.call(this,a,c)}});t.Ka.prototype.ua="Fullscreen";t.Ka.prototype.T=function(){return"vjs-fullscreen-control "+t.u.prototype.T.call(this)};t.Ka.prototype.s=function(){this.d.isFullscreen()?(this.d.exitFullscreen(),this.xb.innerHTML=this.t("Fullscreen")):(this.d.requestFullscreen(),this.xb.innerHTML=this.t("Non-Fullscreen"))};t.ob=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.ob.prototype.m={children:{seekBar:{}}};
91
- t.ob.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-progress-control vjs-control"})};t.cc=t.S.extend({i:function(a,c){t.S.call(this,a,c);this.c(a,"timeupdate",this.oa);a.K(t.bind(this,this.oa))}});s=t.cc.prototype;s.m={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};s.Ec="timeupdate";s.e=function(){return t.S.prototype.e.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})};
92
- s.oa=function(){var a=this.d.bb?this.d.G.currentTime:this.d.currentTime();this.b.setAttribute("aria-valuenow",t.round(100*this.Gb(),2));this.b.setAttribute("aria-valuetext",t.za(a,this.d.duration()))};s.Gb=function(){return this.d.currentTime()/this.d.duration()};s.Za=function(a){t.S.prototype.Za.call(this,a);this.d.bb=f;this.me=!this.d.paused();this.d.pause()};s.$a=function(a){a=H(this,a)*this.d.duration();a==this.d.duration()&&(a-=0.1);this.d.currentTime(a)};
93
- s.Mb=function(a){t.S.prototype.Mb.call(this,a);this.d.bb=l;this.me&&this.d.play()};s.Oc=function(){this.d.currentTime(this.d.currentTime()+5)};s.Nc=function(){this.d.currentTime(this.d.currentTime()-5)};t.lb=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.c(a,"progress",this.update)}});t.lb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.t("Loaded")+"</span>: 0%</span>"})};
94
- t.lb.prototype.update=function(){var a,c,d,e,g=this.d.buffered();a=this.d.duration();var h,j=this.d;h=j.buffered();j=j.duration();h=h.end(h.length-1);h>j&&(h=j);j=this.b.children;this.b.style.width=100*(h/a||0)+"%";for(a=0;a<g.length;a++)c=g.start(a),d=g.end(a),(e=j[a])||(e=this.b.appendChild(t.e())),e.style.left=100*(c/h||0)+"%",e.style.width=100*((d-c)/h||0)+"%";for(a=j.length;a>g.length;a--)this.b.removeChild(j[a-1])};t.$b=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});
95
- t.$b.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-play-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.t("Progress")+"</span>: 0%</span>"})};t.La=t.$.extend({i:function(a,c){t.$.call(this,a,c);this.c(a,"timeupdate",this.fa)}});t.La.prototype.defaultValue="00:00";t.La.prototype.e=function(){return t.$.prototype.e.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})};
96
- t.La.prototype.fa=function(){var a=this.d.bb?this.d.G.currentTime:this.d.currentTime();this.b.innerHTML='<span class="vjs-control-text">'+t.za(a,this.d.duration())+"</span>"};t.rb=t.a.extend({i:function(a,c){t.a.call(this,a,c);a.o&&a.o.featuresVolumeControl===l&&this.n("vjs-hidden");this.c(a,"loadstart",function(){a.o.featuresVolumeControl===l?this.n("vjs-hidden"):this.p("vjs-hidden")})}});t.rb.prototype.m={children:{volumeBar:{}}};
97
- t.rb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-volume-control vjs-control"})};t.qb=t.S.extend({i:function(a,c){t.S.call(this,a,c);this.c(a,"volumechange",this.oa);a.K(t.bind(this,this.oa))}});s=t.qb.prototype;s.oa=function(){this.b.setAttribute("aria-valuenow",t.round(100*this.d.volume(),2));this.b.setAttribute("aria-valuetext",t.round(100*this.d.volume(),2)+"%")};s.m={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"};
98
- s.Ec="volumechange";s.e=function(){return t.S.prototype.e.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})};s.$a=function(a){this.d.muted()&&this.d.muted(l);this.d.volume(H(this,a))};s.Gb=function(){return this.d.muted()?0:this.d.volume()};s.Oc=function(){this.d.volume(this.d.volume()+0.1)};s.Nc=function(){this.d.volume(this.d.volume()-0.1)};t.hc=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});
99
- t.hc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})};t.sb=t.$.extend();t.sb.prototype.defaultValue="00:00";t.sb.prototype.e=function(){return t.$.prototype.e.call(this,"div",{className:"vjs-volume-handle"})};
100
- t.ia=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.c(a,"volumechange",this.update);a.o&&a.o.featuresVolumeControl===l&&this.n("vjs-hidden");this.c(a,"loadstart",function(){a.o.featuresVolumeControl===l?this.n("vjs-hidden"):this.p("vjs-hidden")})}});t.ia.prototype.e=function(){return t.u.prototype.e.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.t("Mute")+"</span></div>"})};
101
- t.ia.prototype.s=function(){this.d.muted(this.d.muted()?l:f)};t.ia.prototype.update=function(){var a=this.d.volume(),c=3;0===a||this.d.muted()?c=0:0.33>a?c=1:0.67>a&&(c=2);this.d.muted()?this.b.children[0].children[0].innerHTML!=this.t("Unmute")&&(this.b.children[0].children[0].innerHTML=this.t("Unmute")):this.b.children[0].children[0].innerHTML!=this.t("Mute")&&(this.b.children[0].children[0].innerHTML=this.t("Mute"));for(a=0;4>a;a++)t.p(this.b,"vjs-vol-"+a);t.n(this.b,"vjs-vol-"+c)};
102
- t.sa=t.N.extend({i:function(a,c){t.N.call(this,a,c);this.c(a,"volumechange",this.update);a.o&&a.o.featuresVolumeControl===l&&this.n("vjs-hidden");this.c(a,"loadstart",function(){a.o.featuresVolumeControl===l?this.n("vjs-hidden"):this.p("vjs-hidden")});this.n("vjs-menu-button")}});t.sa.prototype.xa=function(){var a=new t.ha(this.d,{lc:"div"}),c=new t.qb(this.d,this.m.volumeBar);c.c("focus",function(){a.n("vjs-lock-showing")});c.c("blur",function(){E(a)});a.V(c);return a};
103
- t.sa.prototype.s=function(){t.ia.prototype.s.call(this);t.N.prototype.s.call(this)};t.sa.prototype.e=function(){return t.u.prototype.e.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.t("Mute")+"</span></div>"})};t.sa.prototype.update=t.ia.prototype.update;t.bc=t.N.extend({i:function(a,c){t.N.call(this,a,c);this.Tc();this.Sc();this.c(a,"loadstart",this.Tc);this.c(a,"ratechange",this.Sc)}});s=t.bc.prototype;
104
- s.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-playback-rate vjs-menu-button vjs-control",innerHTML:'<div class="vjs-control-content"><span class="vjs-control-text">'+this.t("Playback Rate")+"</span></div>"});this.Ac=t.e("div",{className:"vjs-playback-rate-value",innerHTML:1});a.appendChild(this.Ac);return a};s.xa=function(){var a=new t.ha(this.k()),c=this.k().options().playbackRates;if(c)for(var d=c.length-1;0<=d;d--)a.V(new t.nb(this.k(),{rate:c[d]+"x"}));return a};
105
- s.oa=function(){this.w().setAttribute("aria-valuenow",this.k().playbackRate())};s.s=function(){for(var a=this.k().playbackRate(),c=this.k().options().playbackRates,d=c[0],e=0;e<c.length;e++)if(c[e]>a){d=c[e];break}this.k().playbackRate(d)};function ea(a){return a.k().o&&a.k().o.featuresPlaybackRate&&a.k().options().playbackRates&&0<a.k().options().playbackRates.length}s.Tc=function(){ea(this)?this.p("vjs-hidden"):this.n("vjs-hidden")};
106
- s.Sc=function(){ea(this)&&(this.Ac.innerHTML=this.k().playbackRate()+"x")};t.nb=t.J.extend({lc:"button",i:function(a,c){var d=this.label=c.rate,e=this.Hc=parseFloat(d,10);c.label=d;c.selected=1===e;t.J.call(this,a,c);this.c(a,"ratechange",this.update)}});t.nb.prototype.s=function(){t.J.prototype.s.call(this);this.k().playbackRate(this.Hc)};t.nb.prototype.update=function(){this.selected(this.k().playbackRate()==this.Hc)};
107
- t.ra=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.update();a.c("posterchange",t.bind(this,this.update))}});t.ra.prototype.dispose=function(){this.k().j("posterchange",this.update);t.u.prototype.dispose.call(this)};t.ra.prototype.e=function(){var a=t.e("div",{className:"vjs-poster",tabIndex:-1});t.Wc||(this.Db=t.e("img"),a.appendChild(this.Db));return a};
108
- t.ra.prototype.update=function(){var a=this.k().poster(),c;this.Db?this.Db.src=a:(c="",a&&(c='url("'+a+'")'),this.b.style.backgroundImage=c);a?this.b.style.display="":this.Y()};t.ra.prototype.s=function(){this.d.play()};t.Zb=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.Zb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-loading-spinner"})};t.fb=t.u.extend();
109
- t.fb.prototype.e=function(){return t.u.prototype.e.call(this,"div",{className:"vjs-big-play-button",innerHTML:'<span aria-hidden="true"></span>',"aria-label":"play video"})};t.fb.prototype.s=function(){this.d.play()};t.jb=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.update();this.c(a,"error",this.update)}});t.jb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-error-display"});this.v=t.e("div");a.appendChild(this.v);return a};
110
- t.jb.prototype.update=function(){this.k().error()&&(this.v.innerHTML=this.t(this.k().error().message))};
111
- t.q=t.a.extend({i:function(a,c,d){c=c||{};c.Jc=l;t.a.call(this,a,c,d);this.featuresProgressEvents||(this.Bc=f,this.Gc=setInterval(t.bind(this,function(){var a=this.k().bufferedPercent();this.ld!=a&&this.k().l("progress");this.ld=a;1===a&&clearInterval(this.Gc)}),500));this.featuresTimeupdateEvents||(a=this.d,this.Lb=f,this.c(a,"play",this.Rc),this.c(a,"pause",this.cb),this.R("timeupdate",function(){this.featuresTimeupdateEvents=f;fa(this)}));var e;e=this.k();a=function(){if(e.controls()&&!e.usingNativeControls()){var a;
112
- this.c("mousedown",this.s);this.c("touchstart",function(){a=this.d.userActive()});this.c("touchmove",function(){a&&this.k().reportUserActivity()});this.c("touchend",function(a){a.preventDefault()});G(this);this.c("tap",this.Td)}};this.K(a);this.c(e,"controlsenabled",a);this.c(e,"controlsdisabled",this.Zd);this.K(function(){this.networkState&&0<this.networkState()&&this.k().l("loadstart")})}});s=t.q.prototype;
113
- s.Zd=function(){this.j("tap");this.j("touchstart");this.j("touchmove");this.j("touchleave");this.j("touchcancel");this.j("touchend");this.j("click");this.j("mousedown")};s.s=function(a){0===a.button&&this.k().controls()&&(this.k().paused()?this.k().play():this.k().pause())};s.Td=function(){this.k().userActive(!this.k().userActive())};function fa(a){a.Lb=l;a.cb();a.j("play",a.Rc);a.j("pause",a.cb)}
114
- s.Rc=function(){this.mc&&this.cb();this.mc=setInterval(t.bind(this,function(){this.k().l("timeupdate")}),250)};s.cb=function(){clearInterval(this.mc);this.k().l("timeupdate")};s.dispose=function(){this.Bc&&(this.Bc=l,clearInterval(this.Gc));this.Lb&&fa(this);t.a.prototype.dispose.call(this)};s.Qb=function(){this.Lb&&this.k().l("timeupdate")};s.Lc=m();t.q.prototype.featuresVolumeControl=f;t.q.prototype.featuresFullscreenResize=l;t.q.prototype.featuresPlaybackRate=l;
115
- t.q.prototype.featuresProgressEvents=l;t.q.prototype.featuresTimeupdateEvents=l;t.media={};
116
- t.h=t.q.extend({i:function(a,c,d){this.featuresVolumeControl=t.h.nd();this.featuresPlaybackRate=t.h.md();this.movingMediaElementInDOM=!t.$c;this.featuresProgressEvents=this.featuresFullscreenResize=f;t.q.call(this,a,c,d);for(d=t.h.kb.length-1;0<=d;d--)this.c(t.h.kb[d],this.vd);if((c=c.source)&&this.b.currentSrc!==c.src||a.I&&3===a.I.Bd)this.b.src=c.src;if(t.ec&&a.options().nativeControlsForTouch===f){var e,g,h,j;e=this;g=this.k();c=g.controls();e.b.controls=!!c;h=function(){e.b.controls=f};j=function(){e.b.controls=
117
- l};g.c("controlsenabled",h);g.c("controlsdisabled",j);c=function(){g.j("controlsenabled",h);g.j("controlsdisabled",j)};e.c("dispose",c);g.c("usingcustomcontrols",c);g.usingNativeControls(f)}a.K(function(){this.I&&(this.m.autoplay&&this.paused())&&(delete this.I.poster,this.play())});this.Ga()}});s=t.h.prototype;s.dispose=function(){t.h.Bb(this.b);t.q.prototype.dispose.call(this)};
118
- s.e=function(){var a=this.d,c=a.I,d;if(!c||this.movingMediaElementInDOM===l)c?(d=c.cloneNode(l),t.h.Bb(c),c=d,a.I=k):(c=t.e("video"),t.Kc(c,t.g.z(a.ie||{},{id:a.id()+"_html5_api","class":"vjs-tech"}))),c.player=a,t.Hb(c,a.w());d=["autoplay","preload","loop","muted"];for(var e=d.length-1;0<=e;e--){var g=d[e],h={};"undefined"!==typeof a.m[g]&&(h[g]=a.m[g]);t.Kc(c,h)}return c};s.vd=function(a){"error"==a.type&&this.error()?this.k().error(this.error().code):(a.bubbles=l,this.k().l(a))};s.play=function(){this.b.play()};
119
- s.pause=function(){this.b.pause()};s.paused=function(){return this.b.paused};s.currentTime=function(){return this.b.currentTime};s.Qb=function(a){try{this.b.currentTime=a}catch(c){t.log(c,"Video is not ready. (Video.js)")}};s.duration=function(){return this.b.duration||0};s.buffered=function(){return this.b.buffered};s.volume=function(){return this.b.volume};s.fe=function(a){this.b.volume=a};s.muted=function(){return this.b.muted};s.ce=function(a){this.b.muted=a};s.width=function(){return this.b.offsetWidth};
120
- s.height=function(){return this.b.offsetHeight};s.Ea=function(){return"function"==typeof this.b.webkitEnterFullScreen&&(/Android/.test(t.O)||!/Chrome|Mac OS X 10.5/.test(t.O))?f:l};
121
- s.pc=function(){var a=this.b;"webkitDisplayingFullscreen"in a&&this.R("webkitbeginfullscreen",function(){this.d.isFullscreen(f);this.R("webkitendfullscreen",function(){this.d.isFullscreen(l);this.d.l("fullscreenchange")});this.d.l("fullscreenchange")});a.paused&&a.networkState<=a.ne?(this.b.play(),setTimeout(function(){a.pause();a.webkitEnterFullScreen()},0)):a.webkitEnterFullScreen()};s.wd=function(){this.b.webkitExitFullScreen()};s.src=function(a){if(a===b)return this.b.src;this.b.src=a};
122
- s.load=function(){this.b.load()};s.currentSrc=function(){return this.b.currentSrc};s.poster=function(){return this.b.poster};s.Lc=function(a){this.b.poster=a};s.Da=function(){return this.b.Da};s.ee=function(a){this.b.Da=a};s.autoplay=function(){return this.b.autoplay};s.$d=function(a){this.b.autoplay=a};s.controls=function(){return this.b.controls};s.loop=function(){return this.b.loop};s.be=function(a){this.b.loop=a};s.error=function(){return this.b.error};s.seeking=function(){return this.b.seeking};
123
- s.ended=function(){return this.b.ended};s.playbackRate=function(){return this.b.playbackRate};s.de=function(a){this.b.playbackRate=a};s.networkState=function(){return this.b.networkState};t.h.isSupported=function(){try{t.A.volume=0.5}catch(a){return l}return!!t.A.canPlayType};t.h.vb=function(a){try{return!!t.A.canPlayType(a.type)}catch(c){return""}};t.h.nd=function(){var a=t.A.volume;t.A.volume=a/2+0.1;return a!==t.A.volume};
124
- t.h.md=function(){var a=t.A.playbackRate;t.A.playbackRate=a/2+0.1;return a!==t.A.playbackRate};var V,ga=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,ha=/^video\/mp4/i;t.h.Dc=function(){4<=t.Ub&&(V||(V=t.A.constructor.prototype.canPlayType),t.A.constructor.prototype.canPlayType=function(a){return a&&ga.test(a)?"maybe":V.call(this,a)});t.dd&&(V||(V=t.A.constructor.prototype.canPlayType),t.A.constructor.prototype.canPlayType=function(a){return a&&ha.test(a)?"maybe":V.call(this,a)})};
125
- t.h.le=function(){var a=t.A.constructor.prototype.canPlayType;t.A.constructor.prototype.canPlayType=V;V=k;return a};t.h.Dc();t.h.kb="loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange volumechange".split(" ");
126
- t.h.Bb=function(a){if(a){a.player=k;for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src");if("function"===typeof a.load)try{a.load()}catch(c){}}};
127
- t.f=t.q.extend({i:function(a,c,d){t.q.call(this,a,c,d);var e=c.source;d=c.parentEl;var g=this.b=t.e("div",{id:a.id()+"_temp_flash"}),h=a.id()+"_flash_api",j=a.m,j=t.g.z({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:j.autoplay,preload:j.Da,loop:j.loop,muted:j.muted},c.flashVars),n=t.g.z({wmode:"opaque",bgcolor:"#000000"},c.params),h=t.g.z({id:h,name:h,"class":"vjs-tech"},c.attributes);e&&(e.type&&t.f.Gd(e.type)?
128
- (e=t.f.Pc(e.src),j.rtmpConnection=encodeURIComponent(e.wb),j.rtmpStream=encodeURIComponent(e.Rb)):j.src=encodeURIComponent(t.tc(e.src)));t.Hb(g,d);c.startTime&&this.K(function(){this.load();this.play();this.currentTime(c.startTime)});t.Zc&&this.K(function(){this.c("mousemove",function(){this.k().l({type:"mousemove",bubbles:l})})});a.c("stageclick",a.reportUserActivity);this.b=t.f.oc(c.swf,g,j,n,h)}});t.f.prototype.dispose=function(){t.q.prototype.dispose.call(this)};t.f.prototype.play=function(){this.b.vjs_play()};
129
- t.f.prototype.pause=function(){this.b.vjs_pause()};t.f.prototype.src=function(a){if(a===b)return this.currentSrc();t.f.Fd(a)?(a=t.f.Pc(a),this.xe(a.wb),this.ye(a.Rb)):(a=t.tc(a),this.b.vjs_src(a));if(this.d.autoplay()){var c=this;setTimeout(function(){c.play()},0)}};t.f.prototype.setCurrentTime=function(a){this.Jd=a;this.b.vjs_setProperty("currentTime",a);t.q.prototype.Qb.call(this)};t.f.prototype.currentTime=function(){return this.seeking()?this.Jd||0:this.b.vjs_getProperty("currentTime")};
130
- t.f.prototype.currentSrc=function(){var a=this.b.vjs_getProperty("currentSrc");if(a==k){var c=this.rtmpConnection(),d=this.rtmpStream();c&&d&&(a=t.f.ge(c,d))}return a};t.f.prototype.load=function(){this.b.vjs_load()};t.f.prototype.poster=function(){this.b.vjs_getProperty("poster")};t.f.prototype.setPoster=m();t.f.prototype.buffered=function(){return t.zb(0,this.b.vjs_getProperty("buffered"))};t.f.prototype.Ea=q(l);t.f.prototype.pc=q(l);
131
- function ia(){var a=W[X],c=a.charAt(0).toUpperCase()+a.slice(1);ja["set"+c]=function(c){return this.b.vjs_setProperty(a,c)}}function ka(a){ja[a]=function(){return this.b.vjs_getProperty(a)}}
132
- var ja=t.f.prototype,W="rtmpConnection rtmpStream preload defaultPlaybackRate playbackRate autoplay loop mediaGroup controller controls volume muted defaultMuted".split(" "),la="error networkState readyState seeking initialTime duration startOffsetTime paused played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks".split(" "),X;for(X=0;X<W.length;X++)ka(W[X]),ia();for(X=0;X<la.length;X++)ka(la[X]);t.f.isSupported=function(){return 10<=t.f.version()[0]};
133
- t.f.vb=function(a){if(!a.type)return"";a=a.type.replace(/;.*/,"").toLowerCase();if(a in t.f.yd||a in t.f.Qc)return"maybe"};t.f.yd={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};t.f.Qc={"rtmp/mp4":"MP4","rtmp/flv":"FLV"};t.f.onReady=function(a){var c;if(c=(a=t.w(a))&&a.parentNode&&a.parentNode.player)a.player=c,t.f.checkReady(c.o)};t.f.checkReady=function(a){a.w()&&(a.w().vjs_getProperty?a.Ga():setTimeout(function(){t.f.checkReady(a)},50))};t.f.onEvent=function(a,c){t.w(a).player.l(c)};
134
- t.f.onError=function(a,c){var d=t.w(a).player,e="FLASH: "+c;"srcnotfound"==c?d.error({code:4,message:e}):d.error(e)};t.f.version=function(){var a="0,0,0";try{a=(new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(c){try{navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(a=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(d){}}return a.split(",")};
135
- t.f.oc=function(a,c,d,e,g){a=t.f.Ad(a,d,e,g);a=t.e("div",{innerHTML:a}).childNodes[0];d=c.parentNode;c.parentNode.replaceChild(a,c);var h=d.childNodes[0];setTimeout(function(){h.style.display="block"},1E3);return a};
136
- t.f.Ad=function(a,c,d,e){var g="",h="",j="";c&&t.g.X(c,function(a,c){g+=a+"="+c+"&amp;"});d=t.g.z({movie:a,flashvars:g,allowScriptAccess:"always",allowNetworking:"all"},d);t.g.X(d,function(a,c){h+='<param name="'+a+'" value="'+c+'" />'});e=t.g.z({data:a,width:"100%",height:"100%"},e);t.g.X(e,function(a,c){j+=a+'="'+c+'" '});return'<object type="application/x-shockwave-flash"'+j+">"+h+"</object>"};t.f.ge=function(a,c){return a+"&"+c};
137
- t.f.Pc=function(a){var c={wb:"",Rb:""};if(!a)return c;var d=a.indexOf("&"),e;-1!==d?e=d+1:(d=e=a.lastIndexOf("/")+1,0===d&&(d=e=a.length));c.wb=a.substring(0,d);c.Rb=a.substring(e,a.length);return c};t.f.Gd=function(a){return a in t.f.Qc};t.f.fd=/^rtmp[set]?:\/\//i;t.f.Fd=function(a){return t.f.fd.test(a)};
138
- t.ed=t.a.extend({i:function(a,c,d){t.a.call(this,a,c,d);if(!a.m.sources||0===a.m.sources.length){c=0;for(d=a.m.techOrder;c<d.length;c++){var e=t.ba(d[c]),g=window.videojs[e];if(g&&g.isSupported()){Q(a,e);break}}}else a.src(a.m.sources)}});t.Player.prototype.textTracks=function(){return this.Fa=this.Fa||[]};
139
- function ma(a,c,d,e,g){var h=a.Fa=a.Fa||[];g=g||{};g.kind=c;g.label=d;g.language=e;c=t.ba(c||"subtitles");var j=new window.videojs[c+"Track"](a,g);h.push(j);j.Ab()&&a.K(function(){setTimeout(function(){Y(j.k(),j.id())},0)})}function Y(a,c,d){for(var e=a.Fa,g=0,h=e.length,j,n;g<h;g++)j=e[g],j.id()===c?(j.show(),n=j):d&&(j.M()==d&&0<j.mode())&&j.disable();(c=n?n.M():d?d:l)&&a.l(c+"trackchange")}
140
- t.B=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.L=c.id||"vjs_"+c.kind+"_"+c.language+"_"+t.r++;this.Mc=c.src;this.sd=c["default"]||c.dflt;this.je=c.title;this.Ua=c.srclang;this.Hd=c.label;this.ca=[];this.tb=[];this.ma=this.na=0}});s=t.B.prototype;s.M=p("H");s.src=p("Mc");s.Ab=p("sd");s.title=p("je");s.language=p("Ua");s.label=p("Hd");s.od=p("ca");s.gd=p("tb");s.readyState=p("na");s.mode=p("ma");s.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-"+this.H+" vjs-text-track"})};
141
- s.show=function(){na(this);this.ma=2;t.a.prototype.show.call(this)};s.Y=function(){na(this);this.ma=1;t.a.prototype.Y.call(this)};s.disable=function(){2==this.ma&&this.Y();this.d.j("timeupdate",t.bind(this,this.update,this.L));this.d.j("ended",t.bind(this,this.reset,this.L));this.reset();this.d.ka("textTrackDisplay").removeChild(this);this.ma=0};
142
- function na(a){0===a.na&&a.load();0===a.ma&&(a.d.c("timeupdate",t.bind(a,a.update,a.L)),a.d.c("ended",t.bind(a,a.reset,a.L)),("captions"===a.H||"subtitles"===a.H)&&a.d.ka("textTrackDisplay").V(a))}s.load=function(){0===this.na&&(this.na=1,t.get(this.Mc,t.bind(this,this.Wd),t.bind(this,this.Md)))};s.Md=function(a){this.error=a;this.na=3;this.l("error")};
143
- s.Wd=function(a){var c,d;a=a.split("\n");for(var e="",g=1,h=a.length;g<h;g++)if(e=t.trim(a[g])){-1==e.indexOf("--\x3e")?(c=e,e=t.trim(a[++g])):c=this.ca.length;c={id:c,index:this.ca.length};d=e.split(/[\t ]+/);c.startTime=oa(d[0]);c.ya=oa(d[2]);for(d=[];a[++g]&&(e=t.trim(a[g]));)d.push(e);c.text=d.join("<br/>");this.ca.push(c)}this.na=2;this.l("loaded")};
144
- function oa(a){var c=a.split(":");a=0;var d,e,g;3==c.length?(d=c[0],e=c[1],c=c[2]):(d=0,e=c[0],c=c[1]);c=c.split(/\s+/);c=c.splice(0,1)[0];c=c.split(/\.|,/);g=parseFloat(c[1]);c=c[0];a+=3600*parseFloat(d);a+=60*parseFloat(e);a+=parseFloat(c);g&&(a+=g/1E3);return a}
145
- s.update=function(){if(0<this.ca.length){var a=this.d.options().trackTimeOffset||0,a=this.d.currentTime()+a;if(this.Pb===b||a<this.Pb||this.Wa<=a){var c=this.ca,d=this.d.duration(),e=0,g=l,h=[],j,n,r,w;a>=this.Wa||this.Wa===b?w=this.Eb!==b?this.Eb:0:(g=f,w=this.Kb!==b?this.Kb:c.length-1);for(;;){r=c[w];if(r.ya<=a)e=Math.max(e,r.ya),r.Na&&(r.Na=l);else if(a<r.startTime){if(d=Math.min(d,r.startTime),r.Na&&(r.Na=l),!g)break}else g?(h.splice(0,0,r),n===b&&(n=w),j=w):(h.push(r),j===b&&(j=w),n=w),d=Math.min(d,
146
- r.ya),e=Math.max(e,r.startTime),r.Na=f;if(g)if(0===w)break;else w--;else if(w===c.length-1)break;else w++}this.tb=h;this.Wa=d;this.Pb=e;this.Eb=j;this.Kb=n;j=this.tb;n="";a=0;for(c=j.length;a<c;a++)n+='<span class="vjs-tt-cue">'+j[a].text+"</span>";this.b.innerHTML=n;this.l("cuechange")}}};s.reset=function(){this.Wa=0;this.Pb=this.d.duration();this.Kb=this.Eb=0};t.Wb=t.B.extend();t.Wb.prototype.H="captions";t.dc=t.B.extend();t.dc.prototype.H="subtitles";t.Xb=t.B.extend();t.Xb.prototype.H="chapters";
147
- t.fc=t.a.extend({i:function(a,c,d){t.a.call(this,a,c,d);if(a.m.tracks&&0<a.m.tracks.length){c=this.d;a=a.m.tracks;for(var e=0;e<a.length;e++)d=a[e],ma(c,d.kind,d.label,d.language,d)}}});t.fc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-text-track-display"})};t.aa=t.J.extend({i:function(a,c){var d=this.ea=c.track;c.label=d.label();c.selected=d.Ab();t.J.call(this,a,c);this.c(a,d.M()+"trackchange",this.update)}});
148
- t.aa.prototype.s=function(){t.J.prototype.s.call(this);Y(this.d,this.ea.L,this.ea.M())};t.aa.prototype.update=function(){this.selected(2==this.ea.mode())};t.mb=t.aa.extend({i:function(a,c){c.track={M:function(){return c.kind},k:a,label:function(){return c.kind+" off"},Ab:q(l),mode:q(l)};t.aa.call(this,a,c);this.selected(f)}});t.mb.prototype.s=function(){t.aa.prototype.s.call(this);Y(this.d,this.ea.L,this.ea.M())};
149
- t.mb.prototype.update=function(){for(var a=this.d.textTracks(),c=0,d=a.length,e,g=f;c<d;c++)e=a[c],e.M()==this.ea.M()&&2==e.mode()&&(g=l);this.selected(g)};t.U=t.N.extend({i:function(a,c){t.N.call(this,a,c);1>=this.Q.length&&this.Y()}});t.U.prototype.wa=function(){var a=[],c;a.push(new t.mb(this.d,{kind:this.H}));for(var d=0;d<this.d.textTracks().length;d++)c=this.d.textTracks()[d],c.M()===this.H&&a.push(new t.aa(this.d,{track:c}));return a};
150
- t.Ha=t.U.extend({i:function(a,c,d){t.U.call(this,a,c,d);this.b.setAttribute("aria-label","Captions Menu")}});t.Ha.prototype.H="captions";t.Ha.prototype.ua="Captions";t.Ha.prototype.className="vjs-captions-button";t.Ma=t.U.extend({i:function(a,c,d){t.U.call(this,a,c,d);this.b.setAttribute("aria-label","Subtitles Menu")}});t.Ma.prototype.H="subtitles";t.Ma.prototype.ua="Subtitles";t.Ma.prototype.className="vjs-subtitles-button";
151
- t.Ia=t.U.extend({i:function(a,c,d){t.U.call(this,a,c,d);this.b.setAttribute("aria-label","Chapters Menu")}});s=t.Ia.prototype;s.H="chapters";s.ua="Chapters";s.className="vjs-chapters-button";s.wa=function(){for(var a=[],c,d=0;d<this.d.textTracks().length;d++)c=this.d.textTracks()[d],c.M()===this.H&&a.push(new t.aa(this.d,{track:c}));return a};
152
- s.xa=function(){for(var a=this.d.textTracks(),c=0,d=a.length,e,g,h=this.Q=[];c<d;c++)if(e=a[c],e.M()==this.H)if(0===e.readyState())e.load(),e.c("loaded",t.bind(this,this.xa));else{g=e;break}a=this.Ba;a===b&&(a=new t.ha(this.d),a.ja().appendChild(t.e("li",{className:"vjs-menu-title",innerHTML:t.ba(this.H),he:-1})));if(g){e=g.ca;for(var j,c=0,d=e.length;c<d;c++)j=e[c],j=new t.gb(this.d,{track:g,cue:j}),h.push(j),a.V(j);this.V(a)}0<this.Q.length&&this.show();return a};
153
- t.gb=t.J.extend({i:function(a,c){var d=this.ea=c.track,e=this.cue=c.cue,g=a.currentTime();c.label=e.text;c.selected=e.startTime<=g&&g<e.ya;t.J.call(this,a,c);d.c("cuechange",t.bind(this,this.update))}});t.gb.prototype.s=function(){t.J.prototype.s.call(this);this.d.currentTime(this.cue.startTime);this.update(this.cue.startTime)};t.gb.prototype.update=function(){var a=this.cue,c=this.d.currentTime();this.selected(a.startTime<=c&&c<a.ya)};
154
- t.g.z(t.Ja.prototype.m.children,{subtitlesButton:{},captionsButton:{},chaptersButton:{}});
155
- if("undefined"!==typeof window.JSON&&"function"===typeof window.JSON.parse)t.JSON=window.JSON;else{t.JSON={};var Z=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;t.JSON.parse=function(a,c){function d(a,e){var j,n,r=a[e];if(r&&"object"===typeof r)for(j in r)Object.prototype.hasOwnProperty.call(r,j)&&(n=d(r,j),n!==b?r[j]=n:delete r[j]);return c.call(a,e,r)}var e;a=String(a);Z.lastIndex=0;Z.test(a)&&(a=a.replace(Z,function(a){return"\\u"+("0000"+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof c?d({"":e},""):e;throw new SyntaxError("JSON.parse(): invalid or malformed JSON data");}}
157
- t.jc=function(){var a,c,d,e;a=document.getElementsByTagName("video");c=document.getElementsByTagName("audio");var g=[];if(a&&0<a.length){d=0;for(e=a.length;d<e;d++)g.push(a[d])}if(c&&0<c.length){d=0;for(e=c.length;d<e;d++)g.push(c[d])}if(g&&0<g.length){d=0;for(e=g.length;d<e;d++)if((c=g[d])&&c.getAttribute)c.player===b&&(a=c.getAttribute("data-setup"),a!==k&&videojs(c));else{t.ub();break}}else t.Uc||t.ub()};t.ub=function(){setTimeout(t.jc,1)};
158
- "complete"===document.readyState?t.Uc=f:t.R(window,"load",function(){t.Uc=f});t.ub();t.Yd=function(a,c){t.Player.prototype[a]=c};var pa=this;function $(a,c){var d=a.split("."),e=pa;!(d[0]in e)&&e.execScript&&e.execScript("var "+d[0]);for(var g;d.length&&(g=d.shift());)!d.length&&c!==b?e[g]=c:e=e[g]?e[g]:e[g]={}};$("videojs",t);$("_V_",t);$("videojs.options",t.options);$("videojs.players",t.Ca);$("videojs.TOUCH_ENABLED",t.ec);$("videojs.cache",t.va);$("videojs.Component",t.a);t.a.prototype.player=t.a.prototype.k;t.a.prototype.options=t.a.prototype.options;t.a.prototype.init=t.a.prototype.i;t.a.prototype.dispose=t.a.prototype.dispose;t.a.prototype.createEl=t.a.prototype.e;t.a.prototype.contentEl=t.a.prototype.ja;t.a.prototype.el=t.a.prototype.w;t.a.prototype.addChild=t.a.prototype.V;
159
- t.a.prototype.getChild=t.a.prototype.ka;t.a.prototype.getChildById=t.a.prototype.zd;t.a.prototype.children=t.a.prototype.children;t.a.prototype.initChildren=t.a.prototype.wc;t.a.prototype.removeChild=t.a.prototype.removeChild;t.a.prototype.on=t.a.prototype.c;t.a.prototype.off=t.a.prototype.j;t.a.prototype.one=t.a.prototype.R;t.a.prototype.trigger=t.a.prototype.l;t.a.prototype.triggerReady=t.a.prototype.Ga;t.a.prototype.show=t.a.prototype.show;t.a.prototype.hide=t.a.prototype.Y;
160
- t.a.prototype.width=t.a.prototype.width;t.a.prototype.height=t.a.prototype.height;t.a.prototype.dimensions=t.a.prototype.td;t.a.prototype.ready=t.a.prototype.K;t.a.prototype.addClass=t.a.prototype.n;t.a.prototype.removeClass=t.a.prototype.p;t.a.prototype.buildCSSClass=t.a.prototype.T;t.a.prototype.localize=t.a.prototype.t;t.Player.prototype.ended=t.Player.prototype.ended;t.Player.prototype.enterFullWindow=t.Player.prototype.qc;t.Player.prototype.exitFullWindow=t.Player.prototype.Cb;
161
- t.Player.prototype.preload=t.Player.prototype.Da;t.Player.prototype.remainingTime=t.Player.prototype.remainingTime;t.Player.prototype.supportsFullScreen=t.Player.prototype.Ea;t.Player.prototype.currentType=t.Player.prototype.pd;t.Player.prototype.requestFullScreen=t.Player.prototype.requestFullScreen;t.Player.prototype.requestFullscreen=t.Player.prototype.requestFullscreen;t.Player.prototype.cancelFullScreen=t.Player.prototype.cancelFullScreen;t.Player.prototype.exitFullscreen=t.Player.prototype.exitFullscreen;
162
- t.Player.prototype.isFullScreen=t.Player.prototype.isFullScreen;t.Player.prototype.isFullscreen=t.Player.prototype.isFullscreen;$("videojs.MediaLoader",t.ed);$("videojs.TextTrackDisplay",t.fc);$("videojs.ControlBar",t.Ja);$("videojs.Button",t.u);$("videojs.PlayToggle",t.ac);$("videojs.FullscreenToggle",t.Ka);$("videojs.BigPlayButton",t.fb);$("videojs.LoadingSpinner",t.Zb);$("videojs.CurrentTimeDisplay",t.hb);$("videojs.DurationDisplay",t.ib);$("videojs.TimeDivider",t.gc);
163
- $("videojs.RemainingTimeDisplay",t.pb);$("videojs.LiveDisplay",t.Yb);$("videojs.ErrorDisplay",t.jb);$("videojs.Slider",t.S);$("videojs.ProgressControl",t.ob);$("videojs.SeekBar",t.cc);$("videojs.LoadProgressBar",t.lb);$("videojs.PlayProgressBar",t.$b);$("videojs.SeekHandle",t.La);$("videojs.VolumeControl",t.rb);$("videojs.VolumeBar",t.qb);$("videojs.VolumeLevel",t.hc);$("videojs.VolumeMenuButton",t.sa);$("videojs.VolumeHandle",t.sb);$("videojs.MuteToggle",t.ia);$("videojs.PosterImage",t.ra);
164
- $("videojs.Menu",t.ha);$("videojs.MenuItem",t.J);$("videojs.MenuButton",t.N);$("videojs.PlaybackRateMenuButton",t.bc);t.N.prototype.createItems=t.N.prototype.wa;t.U.prototype.createItems=t.U.prototype.wa;t.Ia.prototype.createItems=t.Ia.prototype.wa;$("videojs.SubtitlesButton",t.Ma);$("videojs.CaptionsButton",t.Ha);$("videojs.ChaptersButton",t.Ia);$("videojs.MediaTechController",t.q);t.q.prototype.featuresVolumeControl=t.q.prototype.ue;t.q.prototype.featuresFullscreenResize=t.q.prototype.qe;
165
- t.q.prototype.featuresPlaybackRate=t.q.prototype.re;t.q.prototype.featuresProgressEvents=t.q.prototype.se;t.q.prototype.featuresTimeupdateEvents=t.q.prototype.te;t.q.prototype.setPoster=t.q.prototype.Lc;$("videojs.Html5",t.h);t.h.Events=t.h.kb;t.h.isSupported=t.h.isSupported;t.h.canPlaySource=t.h.vb;t.h.patchCanPlayType=t.h.Dc;t.h.unpatchCanPlayType=t.h.le;t.h.prototype.setCurrentTime=t.h.prototype.Qb;t.h.prototype.setVolume=t.h.prototype.fe;t.h.prototype.setMuted=t.h.prototype.ce;
166
- t.h.prototype.setPreload=t.h.prototype.ee;t.h.prototype.setAutoplay=t.h.prototype.$d;t.h.prototype.setLoop=t.h.prototype.be;t.h.prototype.enterFullScreen=t.h.prototype.pc;t.h.prototype.exitFullScreen=t.h.prototype.wd;t.h.prototype.playbackRate=t.h.prototype.playbackRate;t.h.prototype.setPlaybackRate=t.h.prototype.de;$("videojs.Flash",t.f);t.f.isSupported=t.f.isSupported;t.f.canPlaySource=t.f.vb;t.f.onReady=t.f.onReady;t.f.embed=t.f.oc;t.f.version=t.f.version;$("videojs.TextTrack",t.B);
167
- t.B.prototype.label=t.B.prototype.label;t.B.prototype.kind=t.B.prototype.M;t.B.prototype.mode=t.B.prototype.mode;t.B.prototype.cues=t.B.prototype.od;t.B.prototype.activeCues=t.B.prototype.gd;$("videojs.CaptionsTrack",t.Wb);$("videojs.SubtitlesTrack",t.dc);$("videojs.ChaptersTrack",t.Xb);$("videojs.autoSetup",t.jc);$("videojs.plugin",t.Yd);$("videojs.createTimeRange",t.zb);$("videojs.util",t.ga);t.ga.mergeOptions=t.ga.Va;t.addLanguage=t.hd;})();
 
 
 
 
 
 
 
 
1
+ /*! Video.js v4.12.7 Copyright 2014 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE */
2
+ (function() {var b=void 0,f=!0,j=null,l=!1;function m(){return function(){}}function n(a){return function(){return this[a]}}function q(a){return function(){return a}}var s;document.createElement("video");document.createElement("audio");document.createElement("track");
3
+ function t(a,c,d){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(t.Aa[a])return c&&t.log.warn('Player "'+a+'" is already initialised. Options will not be applied.'),d&&t.Aa[a].I(d),t.Aa[a];a=t.m(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.player||new t.Player(a,c,d)}var videojs=window.videojs=t;t.ic="4.12";t.vd="https:"==document.location.protocol?"https://":"http://";t.VERSION="4.12.7";
4
+ t.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,playbackRates:[],inactivityTimeout:2E3,children:{mediaLoader:{},posterImage:{},loadingSpinner:{},textTrackDisplay:{},bigPlayButton:{},controlBar:{},errorDisplay:{},textTrackSettings:{}},language:document.getElementsByTagName("html")[0].getAttribute("lang")||navigator.languages&&navigator.languages[0]||navigator.If||navigator.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this video."};
5
+ "GENERATED_CDN_VSN"!==t.ic&&(videojs.options.flash.swf=t.vd+"vjs.zencdn.net/"+t.ic+"/video-js.swf");t.Jd=function(a,c){t.options.languages[a]=t.options.languages[a]!==b?t.$.ya(t.options.languages[a],c):c;return t.options.languages};t.Aa={};"function"===typeof define&&define.amd?define("videojs",[],function(){return videojs}):"object"===typeof exports&&"object"===typeof module&&(module.exports=videojs);t.Ea=t.CoreObject=m();
6
+ t.Ea.extend=function(a){var c,d;a=a||{};c=a.init||a.l||this.prototype.init||this.prototype.l||m();d=function(){c.apply(this,arguments)};d.prototype=t.i.create(this.prototype);d.prototype.constructor=d;d.extend=t.Ea.extend;d.create=t.Ea.create;for(var e in a)a.hasOwnProperty(e)&&(d.prototype[e]=a[e]);return d};t.Ea.create=function(){var a=t.i.create(this.prototype);this.apply(a,arguments);return a};
7
+ t.b=function(a,c,d){if(t.i.isArray(c))return v(t.b,a,c,d);var e=t.getData(a);e.G||(e.G={});e.G[c]||(e.G[c]=[]);d.s||(d.s=t.s++);e.G[c].push(d);e.ca||(e.disabled=l,e.ca=function(c){if(!e.disabled){c=t.Pb(c);var d=e.G[c.type];if(d)for(var d=d.slice(0),k=0,p=d.length;k<p&&!c.Rc();k++)d[k].call(a,c)}});1==e.G[c].length&&(a.addEventListener?a.addEventListener(c,e.ca,l):a.attachEvent&&a.attachEvent("on"+c,e.ca))};
8
+ t.n=function(a,c,d){if(t.Mc(a)){var e=t.getData(a);if(e.G){if(t.i.isArray(c))return v(t.n,a,c,d);if(c){var g=e.G[c];if(g){if(d){if(d.s)for(e=0;e<g.length;e++)g[e].s===d.s&&g.splice(e--,1)}else e.G[c]=[];t.Ac(a,c)}}else for(g in e.G)c=g,e.G[c]=[],t.Ac(a,c)}}};t.Ac=function(a,c){var d=t.getData(a);0===d.G[c].length&&(delete d.G[c],a.removeEventListener?a.removeEventListener(c,d.ca,l):a.detachEvent&&a.detachEvent("on"+c,d.ca));t.ib(d.G)&&(delete d.G,delete d.ca,delete d.disabled);t.ib(d)&&t.cd(a)};
9
+ t.Pb=function(a){function c(){return f}function d(){return l}if(!a||!a.Vb){var e=a||window.event;a={};for(var g in e)"layerX"!==g&&("layerY"!==g&&"keyLocation"!==g)&&("returnValue"==g&&e.preventDefault||(a[g]=e[g]));a.target||(a.target=a.srcElement||document);a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;a.preventDefault=function(){e.preventDefault&&e.preventDefault();a.returnValue=l;a.ie=c;a.defaultPrevented=f};a.ie=d;a.defaultPrevented=l;a.stopPropagation=function(){e.stopPropagation&&
10
+ e.stopPropagation();a.cancelBubble=f;a.Vb=c};a.Vb=d;a.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation();a.Rc=c;a.stopPropagation()};a.Rc=d;if(a.clientX!=j){g=document.documentElement;var h=document.body;a.pageX=a.clientX+(g&&g.scrollLeft||h&&h.scrollLeft||0)-(g&&g.clientLeft||h&&h.clientLeft||0);a.pageY=a.clientY+(g&&g.scrollTop||h&&h.scrollTop||0)-(g&&g.clientTop||h&&h.clientTop||0)}a.which=a.charCode||a.keyCode;a.button!=j&&(a.button=a.button&1?0:a.button&
11
+ 4?1:a.button&2?2:0)}return a};t.o=function(a,c){var d=t.Mc(a)?t.getData(a):{},e=a.parentNode||a.ownerDocument;"string"===typeof c&&(c={type:c,target:a});c=t.Pb(c);d.ca&&d.ca.call(a,c);if(e&&!c.Vb()&&c.bubbles!==l)t.o(e,c);else if(!e&&!c.defaultPrevented&&(d=t.getData(c.target),c.target[c.type])){d.disabled=f;if("function"===typeof c.target[c.type])c.target[c.type]();d.disabled=l}return!c.defaultPrevented};
12
+ t.N=function(a,c,d){function e(){t.n(a,c,e);d.apply(this,arguments)}if(t.i.isArray(c))return v(t.N,a,c,d);e.s=d.s=d.s||t.s++;t.b(a,c,e)};function v(a,c,d,e){t.wc.forEach(d,function(d){a(c,d,e)})}var w=Object.prototype.hasOwnProperty;t.e=function(a,c){var d;c=c||{};d=document.createElement(a||"div");t.i.da(c,function(a,c){-1!==a.indexOf("aria-")||"role"==a?d.setAttribute(a,c):d[a]=c});return d};t.ua=function(a){return a.charAt(0).toUpperCase()+a.slice(1)};t.i={};
13
+ t.i.create=Object.create||function(a){function c(){}c.prototype=a;return new c};t.i.da=function(a,c,d){for(var e in a)w.call(a,e)&&c.call(d||this,e,a[e])};t.i.D=function(a,c){if(!c)return a;for(var d in c)w.call(c,d)&&(a[d]=c[d]);return a};t.i.Rd=function(a,c){var d,e,g;a=t.i.copy(a);for(d in c)w.call(c,d)&&(e=a[d],g=c[d],a[d]=t.i.jb(e)&&t.i.jb(g)?t.i.Rd(e,g):c[d]);return a};t.i.copy=function(a){return t.i.D({},a)};
14
+ t.i.jb=function(a){return!!a&&"object"===typeof a&&"[object Object]"===a.toString()&&a.constructor===Object};t.i.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};t.ke=function(a){return a!==a};t.bind=function(a,c,d){function e(){return c.apply(a,arguments)}c.s||(c.s=t.s++);e.s=d?d+"_"+c.s:c.s;return e};t.ta={};t.s=1;t.expando="vdata"+(new Date).getTime();t.getData=function(a){var c=a[t.expando];c||(c=a[t.expando]=t.s++);t.ta[c]||(t.ta[c]={});return t.ta[c]};
15
+ t.Mc=function(a){a=a[t.expando];return!(!a||t.ib(t.ta[a]))};t.cd=function(a){var c=a[t.expando];if(c){delete t.ta[c];try{delete a[t.expando]}catch(d){a.removeAttribute?a.removeAttribute(t.expando):a[t.expando]=j}}};t.ib=function(a){for(var c in a)if(a[c]!==j)return l;return f};t.Oa=function(a,c){return-1!==(" "+a.className+" ").indexOf(" "+c+" ")};t.p=function(a,c){t.Oa(a,c)||(a.className=""===a.className?c:a.className+" "+c)};
16
+ t.r=function(a,c){var d,e;if(t.Oa(a,c)){d=a.className.split(" ");for(e=d.length-1;0<=e;e--)d[e]===c&&d.splice(e,1);a.className=d.join(" ")}};t.A=t.e("video");var x=document.createElement("track");x.Wb="captions";x.hd="en";x.label="English";t.A.appendChild(x);t.P=navigator.userAgent;t.Cd=/iPhone/i.test(t.P);t.Bd=/iPad/i.test(t.P);t.Dd=/iPod/i.test(t.P);t.Ad=t.Cd||t.Bd||t.Dd;var aa=t,y;var z=t.P.match(/OS (\d+)_/i);y=z&&z[1]?z[1]:b;aa.kf=y;t.zd=/Android/i.test(t.P);var ba=t,B;
17
+ var C=t.P.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i),D,E;C?(D=C[1]&&parseFloat(C[1]),E=C[2]&&parseFloat(C[2]),B=D&&E?parseFloat(C[1]+"."+C[2]):D?D:j):B=j;ba.hc=B;t.Ed=t.zd&&/webkit/i.test(t.P)&&2.3>t.hc;t.jc=/Firefox/i.test(t.P);t.lf=/Chrome/i.test(t.P);t.oa=/MSIE\s8\.0/.test(t.P);t.Eb=!!("ontouchstart"in window||window.xd&&document instanceof window.xd);t.wd="backgroundSize"in t.A.style;
18
+ t.ed=function(a,c){t.i.da(c,function(c,e){e===j||"undefined"===typeof e||e===l?a.removeAttribute(c):a.setAttribute(c,e===f?"":e)})};t.Na=function(a){var c,d,e,g;c={};if(a&&a.attributes&&0<a.attributes.length){d=a.attributes;for(var h=d.length-1;0<=h;h--){e=d[h].name;g=d[h].value;if("boolean"===typeof a[e]||-1!==",autoplay,controls,loop,muted,default,".indexOf(","+e+","))g=g!==j?f:l;c[e]=g}}return c};
19
+ t.vf=function(a,c){var d="";document.defaultView&&document.defaultView.getComputedStyle?d=document.defaultView.getComputedStyle(a,"").getPropertyValue(c):a.currentStyle&&(d=a["client"+c.substr(0,1).toUpperCase()+c.substr(1)]+"px");return d};t.Ub=function(a,c){c.firstChild?c.insertBefore(a,c.firstChild):c.appendChild(a)};t.cb={};t.m=function(a){0===a.indexOf("#")&&(a=a.slice(1));return document.getElementById(a)};
20
+ t.Ma=function(a,c){c=c||a;var d=Math.floor(a%60),e=Math.floor(a/60%60),g=Math.floor(a/3600),h=Math.floor(c/60%60),k=Math.floor(c/3600);if(isNaN(a)||Infinity===a)g=e=d="-";g=0<g||0<k?g+":":"";return g+(((g||10<=h)&&10>e?"0"+e:e)+":")+(10>d?"0"+d:d)};t.Ld=function(){document.body.focus();document.onselectstart=q(l)};t.af=function(){document.onselectstart=q(f)};t.trim=function(a){return(a+"").replace(/^\s+|\s+$/g,"")};t.round=function(a,c){c||(c=0);return Math.round(a*Math.pow(10,c))/Math.pow(10,c)};
21
+ t.Lb=function(a,c){return{length:1,start:function(){return a},end:function(){return c}}};t.Me=function(a){try{var c=window.localStorage||l;c&&(c.volume=a)}catch(d){22==d.code||1014==d.code?t.log("LocalStorage Full (VideoJS)",d):18==d.code?t.log("LocalStorage not allowed (VideoJS)",d):t.log("LocalStorage Error (VideoJS)",d)}};t.$d=function(a){a.match(/^https?:\/\//)||(a=t.e("div",{innerHTML:'<a href="'+a+'">x</a>'}).firstChild.href);return a};
22
+ t.Ee=function(a){var c,d,e,g;g="protocol hostname port pathname search hash host".split(" ");d=t.e("a",{href:a});if(e=""===d.host&&"file:"!==d.protocol)c=t.e("div"),c.innerHTML='<a href="'+a+'"></a>',d=c.firstChild,c.setAttribute("style","display:none; position:absolute;"),document.body.appendChild(c);a={};for(var h=0;h<g.length;h++)a[g[h]]=d[g[h]];"http:"===a.protocol&&(a.host=a.host.replace(/:80$/,""));"https:"===a.protocol&&(a.host=a.host.replace(/:443$/,""));e&&document.body.removeChild(c);return a};
23
+ function F(a,c){var d,e;d=Array.prototype.slice.call(c);e=m();e=window.console||{log:e,warn:e,error:e};a?d.unshift(a.toUpperCase()+":"):a="log";t.log.history.push(d);d.unshift("VIDEOJS:");if(e[a].apply)e[a].apply(e,d);else e[a](d.join(" "))}t.log=function(){F(j,arguments)};t.log.history=[];t.log.error=function(){F("error",arguments)};t.log.warn=function(){F("warn",arguments)};
24
+ t.Yd=function(a){var c,d;a.getBoundingClientRect&&a.parentNode&&(c=a.getBoundingClientRect());if(!c)return{left:0,top:0};a=document.documentElement;d=document.body;return{left:t.round(c.left+(window.pageXOffset||d.scrollLeft)-(a.clientLeft||d.clientLeft||0)),top:t.round(c.top+(window.pageYOffset||d.scrollTop)-(a.clientTop||d.clientTop||0))}};t.wc={};t.wc.forEach=function(a,c,d){if(t.i.isArray(a)&&c instanceof Function)for(var e=0,g=a.length;e<g;++e)c.call(d||t,a[e],e,a);return a};
25
+ t.ff=function(a,c){var d,e,g,h,k,p,r;"string"===typeof a&&(a={uri:a});videojs.$.ya({method:"GET",timeout:45E3},a);c=c||m();p=function(){window.clearTimeout(k);c(j,e,e.response||e.responseText)};r=function(a){window.clearTimeout(k);if(!a||"string"===typeof a)a=Error(a);c(a,e)};d=window.XMLHttpRequest;"undefined"===typeof d&&(d=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");
26
+ });e=new d;e.uri=a.uri;d=t.Ee(a.uri);g=window.location;d.protocol+d.host!==g.protocol+g.host&&window.XDomainRequest&&!("withCredentials"in e)?(e=new window.XDomainRequest,e.onload=p,e.onerror=r,e.onprogress=m(),e.ontimeout=m()):(h="file:"==d.protocol||"file:"==g.protocol,e.onreadystatechange=function(){if(4===e.readyState){if(e.Ye)return r("timeout");200===e.status||h&&0===e.status?p():r()}},a.timeout&&(k=window.setTimeout(function(){4!==e.readyState&&(e.Ye=f,e.abort())},a.timeout)));try{e.open(a.method||
27
+ "GET",a.uri,f)}catch(u){r(u);return}a.withCredentials&&(e.withCredentials=f);a.responseType&&(e.responseType=a.responseType);try{e.send()}catch(A){r(A)}};t.$={};t.$.ya=function(a,c){var d,e,g;a=t.i.copy(a);for(d in c)c.hasOwnProperty(d)&&(e=a[d],g=c[d],a[d]=t.i.jb(e)&&t.i.jb(g)?t.$.ya(e,g):c[d]);return a};t.z=m();s=t.z.prototype;s.bb={};s.b=function(a,c){var d=this.addEventListener;this.addEventListener=Function.prototype;t.b(this,a,c);this.addEventListener=d};s.addEventListener=t.z.prototype.b;
28
+ s.n=function(a,c){t.n(this,a,c)};s.removeEventListener=t.z.prototype.n;s.N=function(a,c){t.N(this,a,c)};s.o=function(a){var c=a.type||a;"string"===typeof a&&(a={type:c});a=t.Pb(a);if(this.bb[c]&&this["on"+c])this["on"+c](a);t.o(this,a)};s.dispatchEvent=t.z.prototype.o;
29
+ t.a=t.Ea.extend({l:function(a,c,d){this.d=a;this.q=t.i.copy(this.q);c=this.options(c);this.Pa=c.id||c.el&&c.el.id;this.Pa||(this.Pa=(a.id&&a.id()||"no_player")+"_component_"+t.s++);this.te=c.name||j;this.c=c.el||this.e();this.R=[];this.fb={};this.gb={};this.Oc();this.I(d);if(c.dd!==l){var e,g;this.k().reportUserActivity&&(e=t.bind(this.k(),this.k().reportUserActivity),this.b("touchstart",function(){e();this.clearInterval(g);g=this.setInterval(e,250)}),a=function(){e();this.clearInterval(g)},this.b("touchmove",
30
+ e),this.b("touchend",a),this.b("touchcancel",a))}}});s=t.a.prototype;s.dispose=function(){this.o({type:"dispose",bubbles:l});if(this.R)for(var a=this.R.length-1;0<=a;a--)this.R[a].dispose&&this.R[a].dispose();this.gb=this.fb=this.R=j;this.n();this.c.parentNode&&this.c.parentNode.removeChild(this.c);t.cd(this.c);this.c=j};s.d=f;s.k=n("d");s.options=function(a){return a===b?this.q:this.q=t.$.ya(this.q,a)};s.e=function(a,c){return t.e(a,c)};
31
+ s.v=function(a){var c=this.d.language(),d=this.d.languages();return d&&d[c]&&d[c][a]?d[c][a]:a};s.m=n("c");s.va=function(){return this.B||this.c};s.id=n("Pa");s.name=n("te");s.children=n("R");s.ae=function(a){return this.fb[a]};s.ea=function(a){return this.gb[a]};
32
+ s.ba=function(a,c){var d,e;"string"===typeof a?(e=a,c=c||{},d=c.componentClass||t.ua(e),c.name=e,d=new window.videojs[d](this.d||this,c)):d=a;this.R.push(d);"function"===typeof d.id&&(this.fb[d.id()]=d);(e=e||d.name&&d.name())&&(this.gb[e]=d);"function"===typeof d.el&&d.el()&&this.va().appendChild(d.el());return d};
33
+ s.removeChild=function(a){"string"===typeof a&&(a=this.ea(a));if(a&&this.R){for(var c=l,d=this.R.length-1;0<=d;d--)if(this.R[d]===a){c=f;this.R.splice(d,1);break}c&&(this.fb[a.id()]=j,this.gb[a.name()]=j,(c=a.m())&&c.parentNode===this.va()&&this.va().removeChild(a.m()))}};
34
+ s.Oc=function(){var a,c,d,e,g,h;a=this;c=a.options();if(d=c.children)if(h=function(d,e){c[d]!==b&&(e=c[d]);e!==l&&(a[d]=a.ba(d,e))},t.i.isArray(d))for(var k=0;k<d.length;k++)e=d[k],"string"==typeof e?(g=e,e={}):g=e.name,h(g,e);else t.i.da(d,h)};s.V=q("");
35
+ s.b=function(a,c,d){var e,g,h;"string"===typeof a||t.i.isArray(a)?t.b(this.c,a,t.bind(this,c)):(e=t.bind(this,d),h=this,g=function(){h.n(a,c,e)},g.s=e.s,this.b("dispose",g),d=function(){h.n("dispose",g)},d.s=e.s,a.nodeName?(t.b(a,c,e),t.b(a,"dispose",d)):"function"===typeof a.b&&(a.b(c,e),a.b("dispose",d)));return this};
36
+ s.n=function(a,c,d){!a||"string"===typeof a||t.i.isArray(a)?t.n(this.c,a,c):(d=t.bind(this,d),this.n("dispose",d),a.nodeName?(t.n(a,c,d),t.n(a,"dispose",d)):(a.n(c,d),a.n("dispose",d)));return this};s.N=function(a,c,d){var e,g,h;"string"===typeof a||t.i.isArray(a)?t.N(this.c,a,t.bind(this,c)):(e=t.bind(this,d),g=this,h=function(){g.n(a,c,h);e.apply(this,arguments)},h.s=e.s,this.b(a,c,h));return this};s.o=function(a){t.o(this.c,a);return this};
37
+ s.I=function(a){a&&(this.wa?a.call(this):(this.nb===b&&(this.nb=[]),this.nb.push(a)));return this};s.Wa=function(){this.wa=f;var a=this.nb;if(a&&0<a.length){for(var c=0,d=a.length;c<d;c++)a[c].call(this);this.nb=[];this.o("ready")}};s.Oa=function(a){return t.Oa(this.c,a)};s.p=function(a){t.p(this.c,a);return this};s.r=function(a){t.r(this.c,a);return this};s.show=function(){this.r("vjs-hidden");return this};s.Y=function(){this.p("vjs-hidden");return this};function G(a){a.r("vjs-lock-showing")}
38
+ s.width=function(a,c){return ca(this,"width",a,c)};s.height=function(a,c){return ca(this,"height",a,c)};s.Td=function(a,c){return this.width(a,f).height(c)};function ca(a,c,d,e){if(d!==b){if(d===j||t.ke(d))d=0;a.c.style[c]=-1!==(""+d).indexOf("%")||-1!==(""+d).indexOf("px")?d:"auto"===d?"":d+"px";e||a.o("resize");return a}if(!a.c)return 0;d=a.c.style[c];e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(a.c["offset"+t.ua(c)],10)}
39
+ function da(a){var c,d,e,g,h,k,p,r;c=0;d=j;a.b("touchstart",function(a){1===a.touches.length&&(d=t.i.copy(a.touches[0]),c=(new Date).getTime(),g=f)});a.b("touchmove",function(a){1<a.touches.length?g=l:d&&(k=a.touches[0].pageX-d.pageX,p=a.touches[0].pageY-d.pageY,r=Math.sqrt(k*k+p*p),10<r&&(g=l))});h=function(){g=l};a.b("touchleave",h);a.b("touchcancel",h);a.b("touchend",function(a){d=j;g===f&&(e=(new Date).getTime()-c,200>e&&(a.preventDefault(),this.o("tap")))})}
40
+ s.setTimeout=function(a,c){function d(){this.clearTimeout(e)}a=t.bind(this,a);var e=setTimeout(a,c);d.s="vjs-timeout-"+e;this.b("dispose",d);return e};s.clearTimeout=function(a){function c(){}clearTimeout(a);c.s="vjs-timeout-"+a;this.n("dispose",c);return a};s.setInterval=function(a,c){function d(){this.clearInterval(e)}a=t.bind(this,a);var e=setInterval(a,c);d.s="vjs-interval-"+e;this.b("dispose",d);return e};
41
+ s.clearInterval=function(a){function c(){}clearInterval(a);c.s="vjs-interval-"+a;this.n("dispose",c);return a};t.w=t.a.extend({l:function(a,c){t.a.call(this,a,c);da(this);this.b("tap",this.u);this.b("click",this.u);this.b("focus",this.lb);this.b("blur",this.kb)}});s=t.w.prototype;
42
+ s.e=function(a,c){var d;c=t.i.D({className:this.V(),role:"button","aria-live":"polite",tabIndex:0},c);d=t.a.prototype.e.call(this,a,c);c.innerHTML||(this.B=t.e("div",{className:"vjs-control-content"}),this.Jb=t.e("span",{className:"vjs-control-text",innerHTML:this.v(this.sa)||"Need Text"}),this.B.appendChild(this.Jb),d.appendChild(this.B));return d};s.V=function(){return"vjs-control "+t.a.prototype.V.call(this)};s.u=m();s.lb=function(){t.b(document,"keydown",t.bind(this,this.ka))};
43
+ s.ka=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.u()};s.kb=function(){t.n(document,"keydown",t.bind(this,this.ka))};t.U=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.Kd=this.ea(this.q.barName);this.handle=this.ea(this.q.handleName);this.b("mousedown",this.mb);this.b("touchstart",this.mb);this.b("focus",this.lb);this.b("blur",this.kb);this.b("click",this.u);this.b(a,"controlsvisible",this.update);this.b(a,this.Yc,this.update)}});s=t.U.prototype;
44
+ s.e=function(a,c){c=c||{};c.className+=" vjs-slider";c=t.i.D({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},c);return t.a.prototype.e.call(this,a,c)};s.mb=function(a){a.preventDefault();t.Ld();this.p("vjs-sliding");this.b(document,"mousemove",this.la);this.b(document,"mouseup",this.za);this.b(document,"touchmove",this.la);this.b(document,"touchend",this.za);this.la(a)};s.la=m();
45
+ s.za=function(){t.af();this.r("vjs-sliding");this.n(document,"mousemove",this.la);this.n(document,"mouseup",this.za);this.n(document,"touchmove",this.la);this.n(document,"touchend",this.za);this.update()};s.update=function(){if(this.c){var a,c=this.Sb(),d=this.handle,e=this.Kd;if("number"!==typeof c||c!==c||0>c||Infinity===c)c=0;a=c;if(d){a=this.c.offsetWidth;var g=d.m().offsetWidth;a=g?g/a:0;c*=1-a;a=c+a/2;d.m().style.left=t.round(100*c,2)+"%"}e&&(e.m().style.width=t.round(100*a,2)+"%")}};
46
+ function ea(a,c){var d,e,g,h;d=a.c;e=t.Yd(d);h=g=d.offsetWidth;d=a.handle;if(a.options().vertical)return h=e.top,e=c.changedTouches?c.changedTouches[0].pageY:c.pageY,d&&(d=d.m().offsetHeight,h+=d/2,g-=d),Math.max(0,Math.min(1,(h-e+g)/g));g=e.left;e=c.changedTouches?c.changedTouches[0].pageX:c.pageX;d&&(d=d.m().offsetWidth,g+=d/2,h-=d);return Math.max(0,Math.min(1,(e-g)/h))}s.lb=function(){this.b(document,"keydown",this.ka)};
47
+ s.ka=function(a){if(37==a.which||40==a.which)a.preventDefault(),this.jd();else if(38==a.which||39==a.which)a.preventDefault(),this.kd()};s.kb=function(){this.n(document,"keydown",this.ka)};s.u=function(a){a.stopImmediatePropagation();a.preventDefault()};t.ha=t.a.extend();t.ha.prototype.defaultValue=0;t.ha.prototype.e=function(a,c){c=c||{};c.className+=" vjs-slider-handle";c=t.i.D({innerHTML:'<span class="vjs-control-text">'+this.defaultValue+"</span>"},c);return t.a.prototype.e.call(this,"div",c)};
48
+ t.pa=t.a.extend();function fa(a,c){a.ba(c);c.b("click",t.bind(a,function(){G(this)}))}t.pa.prototype.e=function(){var a=this.options().Cc||"ul";this.B=t.e(a,{className:"vjs-menu-content"});a=t.a.prototype.e.call(this,"div",{append:this.B,className:"vjs-menu"});a.appendChild(this.B);t.b(a,"click",function(a){a.preventDefault();a.stopImmediatePropagation()});return a};t.M=t.w.extend({l:function(a,c){t.w.call(this,a,c);this.selected(c.selected)}});
49
+ t.M.prototype.e=function(a,c){return t.w.prototype.e.call(this,"li",t.i.D({className:"vjs-menu-item",innerHTML:this.v(this.q.label)},c))};t.M.prototype.u=function(){this.selected(f)};t.M.prototype.selected=function(a){a?(this.p("vjs-selected"),this.c.setAttribute("aria-selected",f)):(this.r("vjs-selected"),this.c.setAttribute("aria-selected",l))};
50
+ t.O=t.w.extend({l:function(a,c){t.w.call(this,a,c);this.update();this.b("keydown",this.ka);this.c.setAttribute("aria-haspopup",f);this.c.setAttribute("role","button")}});s=t.O.prototype;s.update=function(){var a=this.Ja();this.xa&&this.removeChild(this.xa);this.xa=a;this.ba(a);this.H&&0===this.H.length?this.Y():this.H&&1<this.H.length&&this.show()};s.Ha=l;
51
+ s.Ja=function(){var a=new t.pa(this.d);this.options().title&&a.va().appendChild(t.e("li",{className:"vjs-menu-title",innerHTML:t.ua(this.options().title),We:-1}));if(this.H=this.createItems())for(var c=0;c<this.H.length;c++)fa(a,this.H[c]);return a};s.Ia=m();s.V=function(){return this.className+" vjs-menu-button "+t.w.prototype.V.call(this)};s.lb=m();s.kb=m();s.u=function(){this.N("mouseout",t.bind(this,function(){G(this.xa);this.c.blur()}));this.Ha?H(this):ga(this)};
52
+ s.ka=function(a){32==a.which||13==a.which?(this.Ha?H(this):ga(this),a.preventDefault()):27==a.which&&(this.Ha&&H(this),a.preventDefault())};function ga(a){a.Ha=f;a.xa.p("vjs-lock-showing");a.c.setAttribute("aria-pressed",f);a.H&&0<a.H.length&&a.H[0].m().focus()}function H(a){a.Ha=l;G(a.xa);a.c.setAttribute("aria-pressed",l)}t.J=function(a){"number"===typeof a?this.code=a:"string"===typeof a?this.message=a:"object"===typeof a&&t.i.D(this,a);this.message||(this.message=t.J.Sd[this.code]||"")};
53
+ t.J.prototype.code=0;t.J.prototype.message="";t.J.prototype.status=j;t.J.hb="MEDIA_ERR_CUSTOM MEDIA_ERR_ABORTED MEDIA_ERR_NETWORK MEDIA_ERR_DECODE MEDIA_ERR_SRC_NOT_SUPPORTED MEDIA_ERR_ENCRYPTED".split(" ");
54
+ t.J.Sd={1:"You aborted the video playback",2:"A network error caused the video download to fail part-way.",3:"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.",4:"The video could not be loaded, either because the server or network failed or because the format is not supported.",5:"The video is encrypted and we do not have the keys to decrypt it."};for(var I=0;I<t.J.hb.length;I++)t.J[t.J.hb[I]]=I,t.J.prototype[t.J.hb[I]]=I;
55
+ var J,ha,K,L;
56
+ J=["requestFullscreen exitFullscreen fullscreenElement fullscreenEnabled fullscreenchange fullscreenerror".split(" "),"webkitRequestFullscreen webkitExitFullscreen webkitFullscreenElement webkitFullscreenEnabled webkitfullscreenchange webkitfullscreenerror".split(" "),"webkitRequestFullScreen webkitCancelFullScreen webkitCurrentFullScreenElement webkitCancelFullScreen webkitfullscreenchange webkitfullscreenerror".split(" "),"mozRequestFullScreen mozCancelFullScreen mozFullScreenElement mozFullScreenEnabled mozfullscreenchange mozfullscreenerror".split(" "),"msRequestFullscreen msExitFullscreen msFullscreenElement msFullscreenEnabled MSFullscreenChange MSFullscreenError".split(" ")];
57
+ ha=J[0];for(L=0;L<J.length;L++)if(J[L][1]in document){K=J[L];break}if(K){t.cb.Rb={};for(L=0;L<K.length;L++)t.cb.Rb[ha[L]]=K[L]}
58
+ t.Player=t.a.extend({l:function(a,c,d){this.L=a;a.id=a.id||"vjs_video_"+t.s++;this.Xe=a&&t.Na(a);c=t.i.D(ia(a),c);this.Tc=c.language||t.options.language;this.ne=c.languages||t.options.languages;this.K={};this.Zc=c.poster||"";this.Kb=!!c.controls;a.controls=l;c.dd=l;ja(this,"audio"===this.L.nodeName.toLowerCase());t.a.call(this,this,c,d);this.controls()?this.p("vjs-controls-enabled"):this.p("vjs-controls-disabled");ja(this)&&this.p("vjs-audio");t.Aa[this.Pa]=this;c.plugins&&t.i.da(c.plugins,function(a,
59
+ c){this[a](c)},this);var e,g,h,k,p;e=t.bind(this,this.reportUserActivity);this.b("mousedown",function(){e();this.clearInterval(g);g=this.setInterval(e,250)});this.b("mousemove",function(a){if(a.screenX!=k||a.screenY!=p)k=a.screenX,p=a.screenY,e()});this.b("mouseup",function(){e();this.clearInterval(g)});this.b("keydown",e);this.b("keyup",e);this.setInterval(function(){if(this.Da){this.Da=l;this.userActive(f);this.clearTimeout(h);var a=this.options().inactivityTimeout;0<a&&(h=this.setTimeout(function(){this.Da||
60
+ this.userActive(l)},a))}},250)}});s=t.Player.prototype;s.language=function(a){if(a===b)return this.Tc;this.Tc=a;return this};s.languages=n("ne");s.q=t.options;s.dispose=function(){this.o("dispose");this.n("dispose");t.Aa[this.Pa]=j;this.L&&this.L.player&&(this.L.player=j);this.c&&this.c.player&&(this.c.player=j);this.h&&this.h.dispose();t.a.prototype.dispose.call(this)};
61
+ function ia(a){var c,d,e={sources:[],tracks:[]};c=t.Na(a);d=c["data-setup"];d!==j&&t.i.D(c,t.JSON.parse(d||"{}"));t.i.D(e,c);if(a.hasChildNodes()){var g,h;a=a.childNodes;g=0;for(h=a.length;g<h;g++)c=a[g],d=c.nodeName.toLowerCase(),"source"===d?e.sources.push(t.Na(c)):"track"===d&&e.tracks.push(t.Na(c))}return e}
62
+ s.e=function(){var a=this.c=t.a.prototype.e.call(this,"div"),c=this.L,d;c.removeAttribute("width");c.removeAttribute("height");d=t.Na(c);t.i.da(d,function(c){"class"==c?a.className=d[c]:a.setAttribute(c,d[c])});c.id+="_html5_api";c.className="vjs-tech";c.player=a.player=this;this.p("vjs-paused");this.width(this.q.width,f);this.height(this.q.height,f);c.ge=c.networkState;c.parentNode&&c.parentNode.insertBefore(a,c);t.Ub(c,a);this.c=a;this.b("loadstart",this.xe);this.b("waiting",this.De);this.b(["canplay",
63
+ "canplaythrough","playing","ended"],this.Ce);this.b("seeking",this.Ae);this.b("seeked",this.ze);this.b("ended",this.ue);this.b("play",this.$b);this.b("firstplay",this.ve);this.b("pause",this.Zb);this.b("progress",this.ye);this.b("durationchange",this.Wc);this.b("fullscreenchange",this.we);return a};
64
+ function ka(a,c,d){a.h&&(a.wa=l,a.h.dispose(),a.h=l);"Html5"!==c&&a.L&&(t.f.Mb(a.L),a.L=j);a.Ua=c;a.wa=l;var e=t.i.D({source:d,parentEl:a.c},a.q[c.toLowerCase()]);d&&(a.Gc=d.type,d.src==a.K.src&&0<a.K.currentTime&&(e.startTime=a.K.currentTime),a.K.src=d.src);a.h=new window.videojs[c](a,e);a.h.I(function(){this.d.Wa()})}s.xe=function(){this.r("vjs-ended");this.error(j);this.paused()?la(this,l):this.o("firstplay")};s.Nc=l;
65
+ function la(a,c){c!==b&&a.Nc!==c&&((a.Nc=c)?(a.p("vjs-has-started"),a.o("firstplay")):a.r("vjs-has-started"))}s.$b=function(){this.r("vjs-ended");this.r("vjs-paused");this.p("vjs-playing");la(this,f)};s.De=function(){this.p("vjs-waiting")};s.Ce=function(){this.r("vjs-waiting")};s.Ae=function(){this.p("vjs-seeking")};s.ze=function(){this.r("vjs-seeking")};s.ve=function(){this.q.starttime&&this.currentTime(this.q.starttime);this.p("vjs-has-started")};s.Zb=function(){this.r("vjs-playing");this.p("vjs-paused")};
66
+ s.ye=function(){1==this.bufferedPercent()&&this.o("loadedalldata")};s.ue=function(){this.p("vjs-ended");this.q.loop?(this.currentTime(0),this.play()):this.paused()||this.pause()};s.Wc=function(){var a=M(this,"duration");a&&(0>a&&(a=Infinity),this.duration(a),Infinity===a?this.p("vjs-live"):this.r("vjs-live"))};s.we=function(){this.isFullscreen()?this.p("vjs-fullscreen"):this.r("vjs-fullscreen")};
67
+ function N(a,c,d){if(a.h&&!a.h.wa)a.h.I(function(){this[c](d)});else try{a.h[c](d)}catch(e){throw t.log(e),e;}}function M(a,c){if(a.h&&a.h.wa)try{return a.h[c]()}catch(d){throw a.h[c]===b?t.log("Video.js: "+c+" method not defined for "+a.Ua+" playback technology.",d):"TypeError"==d.name?(t.log("Video.js: "+c+" unavailable on "+a.Ua+" playback technology element.",d),a.h.wa=l):t.log(d),d;}}s.play=function(){N(this,"play");return this};s.pause=function(){N(this,"pause");return this};
68
+ s.paused=function(){return M(this,"paused")===l?l:f};s.currentTime=function(a){return a!==b?(N(this,"setCurrentTime",a),this):this.K.currentTime=M(this,"currentTime")||0};s.duration=function(a){if(a!==b)return this.K.duration=parseFloat(a),this;this.K.duration===b&&this.Wc();return this.K.duration||0};s.remainingTime=function(){return this.duration()-this.currentTime()};s.buffered=function(){var a=M(this,"buffered");if(!a||!a.length)a=t.Lb(0,0);return a};
69
+ s.bufferedPercent=function(){var a=this.duration(),c=this.buffered(),d=0,e,g;if(!a)return 0;for(var h=0;h<c.length;h++)e=c.start(h),g=c.end(h),g>a&&(g=a),d+=g-e;return d/a};s.volume=function(a){if(a!==b)return a=Math.max(0,Math.min(1,parseFloat(a))),this.K.volume=a,N(this,"setVolume",a),t.Me(a),this;a=parseFloat(M(this,"volume"));return isNaN(a)?1:a};s.muted=function(a){return a!==b?(N(this,"setMuted",a),this):M(this,"muted")||l};s.Ta=function(){return M(this,"supportsFullScreen")||l};s.Qc=l;
70
+ s.isFullscreen=function(a){return a!==b?(this.Qc=!!a,this):this.Qc};s.isFullScreen=function(a){t.log.warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase "s")');return this.isFullscreen(a)};
71
+ s.requestFullscreen=function(){var a=t.cb.Rb;this.isFullscreen(f);a?(t.b(document,a.fullscreenchange,t.bind(this,function(c){this.isFullscreen(document[a.fullscreenElement]);this.isFullscreen()===l&&t.n(document,a.fullscreenchange,arguments.callee);this.o("fullscreenchange")})),this.c[a.requestFullscreen]()):this.h.Ta()?N(this,"enterFullScreen"):(this.Jc(),this.o("fullscreenchange"));return this};
72
+ s.requestFullScreen=function(){t.log.warn('player.requestFullScreen() has been deprecated, use player.requestFullscreen() with a lowercase "s")');return this.requestFullscreen()};s.exitFullscreen=function(){var a=t.cb.Rb;this.isFullscreen(l);if(a)document[a.exitFullscreen]();else this.h.Ta()?N(this,"exitFullScreen"):(this.Nb(),this.o("fullscreenchange"));return this};s.cancelFullScreen=function(){t.log.warn("player.cancelFullScreen() has been deprecated, use player.exitFullscreen()");return this.exitFullscreen()};
73
+ s.Jc=function(){this.je=f;this.Ud=document.documentElement.style.overflow;t.b(document,"keydown",t.bind(this,this.Kc));document.documentElement.style.overflow="hidden";t.p(document.body,"vjs-full-window");this.o("enterFullWindow")};s.Kc=function(a){27===a.keyCode&&(this.isFullscreen()===f?this.exitFullscreen():this.Nb())};s.Nb=function(){this.je=l;t.n(document,"keydown",this.Kc);document.documentElement.style.overflow=this.Ud;t.r(document.body,"vjs-full-window");this.o("exitFullWindow")};
74
+ s.selectSource=function(a){for(var c=0,d=this.q.techOrder;c<d.length;c++){var e=t.ua(d[c]),g=window.videojs[e];if(g){if(g.isSupported())for(var h=0,k=a;h<k.length;h++){var p=k[h];if(g.canPlaySource(p))return{source:p,h:e}}}else t.log.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.')}return l};
75
+ s.src=function(a){if(a===b)return M(this,"src");t.i.isArray(a)?ma(this,a):"string"===typeof a?this.src({src:a}):a instanceof Object&&(a.type&&!window.videojs[this.Ua].canPlaySource(a)?ma(this,[a]):(this.K.src=a.src,this.Gc=a.type||"",this.I(function(){window.videojs[this.Ua].prototype.hasOwnProperty("setSource")?N(this,"setSource",a):N(this,"src",a.src);"auto"==this.q.preload&&this.load();this.q.autoplay&&this.play()})));return this};
76
+ function ma(a,c){var d=a.selectSource(c);d?d.h===a.Ua?a.src(d.source):ka(a,d.h,d.source):(a.setTimeout(function(){this.error({code:4,message:this.v(this.options().notSupportedMessage)})},0),a.Wa())}s.load=function(){N(this,"load");return this};s.currentSrc=function(){return M(this,"currentSrc")||this.K.src||""};s.Qd=function(){return this.Gc||""};s.Qa=function(a){return a!==b?(N(this,"setPreload",a),this.q.preload=a,this):M(this,"preload")};
77
+ s.autoplay=function(a){return a!==b?(N(this,"setAutoplay",a),this.q.autoplay=a,this):M(this,"autoplay")};s.loop=function(a){return a!==b?(N(this,"setLoop",a),this.q.loop=a,this):M(this,"loop")};s.poster=function(a){if(a===b)return this.Zc;a||(a="");this.Zc=a;N(this,"setPoster",a);this.o("posterchange");return this};
78
+ s.controls=function(a){return a!==b?(a=!!a,this.Kb!==a&&((this.Kb=a)?(this.r("vjs-controls-disabled"),this.p("vjs-controls-enabled"),this.o("controlsenabled")):(this.r("vjs-controls-enabled"),this.p("vjs-controls-disabled"),this.o("controlsdisabled"))),this):this.Kb};t.Player.prototype.ec;s=t.Player.prototype;
79
+ s.usingNativeControls=function(a){return a!==b?(a=!!a,this.ec!==a&&((this.ec=a)?(this.p("vjs-using-native-controls"),this.o("usingnativecontrols")):(this.r("vjs-using-native-controls"),this.o("usingcustomcontrols"))),this):this.ec};s.ja=j;s.error=function(a){if(a===b)return this.ja;if(a===j)return this.ja=a,this.r("vjs-error"),this;this.ja=a instanceof t.J?a:new t.J(a);this.o("error");this.p("vjs-error");t.log.error("(CODE:"+this.ja.code+" "+t.J.hb[this.ja.code]+")",this.ja.message,this.ja);return this};
80
+ s.ended=function(){return M(this,"ended")};s.seeking=function(){return M(this,"seeking")};s.Da=f;s.reportUserActivity=function(){this.Da=f};s.dc=f;s.userActive=function(a){return a!==b?(a=!!a,a!==this.dc&&((this.dc=a)?(this.Da=f,this.r("vjs-user-inactive"),this.p("vjs-user-active"),this.o("useractive")):(this.Da=l,this.h&&this.h.N("mousemove",function(a){a.stopPropagation();a.preventDefault()}),this.r("vjs-user-active"),this.p("vjs-user-inactive"),this.o("userinactive"))),this):this.dc};
81
+ s.playbackRate=function(a){return a!==b?(N(this,"setPlaybackRate",a),this):this.h&&this.h.featuresPlaybackRate?M(this,"playbackRate"):1};s.Pc=l;function ja(a,c){return c!==b?(a.Pc=!!c,a):a.Pc}s.networkState=function(){return M(this,"networkState")};s.readyState=function(){return M(this,"readyState")};s.textTracks=function(){return this.h&&this.h.textTracks()};s.Z=function(){return this.h&&this.h.remoteTextTracks()};s.addTextTrack=function(a,c,d){return this.h&&this.h.addTextTrack(a,c,d)};
82
+ s.ia=function(a){return this.h&&this.h.addRemoteTextTrack(a)};s.Ba=function(a){this.h&&this.h.removeRemoteTextTrack(a)};t.ub=t.a.extend();t.ub.prototype.q={wf:"play",children:{playToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},liveDisplay:{},progressControl:{},fullscreenToggle:{},volumeControl:{},muteToggle:{},playbackRateMenuButton:{},subtitlesButton:{},captionsButton:{},chaptersButton:{}}};t.ub.prototype.e=function(){return t.e("div",{className:"vjs-control-bar"})};
83
+ t.kc=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});t.kc.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-live-controls vjs-control"});this.B=t.e("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.v("Stream Type")+"</span>"+this.v("LIVE"),"aria-live":"off"});a.appendChild(this.B);return a};t.nc=t.w.extend({l:function(a,c){t.w.call(this,a,c);this.b(a,"play",this.$b);this.b(a,"pause",this.Zb)}});s=t.nc.prototype;s.sa="Play";
84
+ s.V=function(){return"vjs-play-control "+t.w.prototype.V.call(this)};s.u=function(){this.d.paused()?this.d.play():this.d.pause()};s.$b=function(){this.r("vjs-paused");this.p("vjs-playing");this.c.children[0].children[0].innerHTML=this.v("Pause")};s.Zb=function(){this.r("vjs-playing");this.p("vjs-paused");this.c.children[0].children[0].innerHTML=this.v("Play")};t.vb=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.b(a,"timeupdate",this.ga)}});
85
+ t.vb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});this.B=t.e("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00',"aria-live":"off"});a.appendChild(this.B);return a};t.vb.prototype.ga=function(){var a=this.d.ob?this.d.K.currentTime:this.d.currentTime();this.B.innerHTML='<span class="vjs-control-text">'+this.v("Current Time")+"</span> "+t.Ma(a,this.d.duration())};
86
+ t.wb=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.b(a,"timeupdate",this.ga);this.b(a,"loadedmetadata",this.ga)}});t.wb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});this.B=t.e("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.v("Duration Time")+"</span> 0:00","aria-live":"off"});a.appendChild(this.B);return a};
87
+ t.wb.prototype.ga=function(){var a=this.d.duration();a&&(this.B.innerHTML='<span class="vjs-control-text">'+this.v("Duration Time")+"</span> "+t.Ma(a))};t.tc=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});t.tc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-time-divider",innerHTML:"<div><span>/</span></div>"})};t.Db=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.b(a,"timeupdate",this.ga)}});
88
+ t.Db.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.B=t.e("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.v("Remaining Time")+"</span> -0:00","aria-live":"off"});a.appendChild(this.B);return a};t.Db.prototype.ga=function(){this.d.duration()&&(this.B.innerHTML='<span class="vjs-control-text">'+this.v("Remaining Time")+"</span> -"+t.Ma(this.d.remainingTime()))};
89
+ t.Za=t.w.extend({l:function(a,c){t.w.call(this,a,c)}});t.Za.prototype.sa="Fullscreen";t.Za.prototype.V=function(){return"vjs-fullscreen-control "+t.w.prototype.V.call(this)};t.Za.prototype.u=function(){this.d.isFullscreen()?(this.d.exitFullscreen(),this.Jb.innerHTML=this.v("Fullscreen")):(this.d.requestFullscreen(),this.Jb.innerHTML=this.v("Non-Fullscreen"))};t.Cb=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});t.Cb.prototype.q={children:{seekBar:{}}};
90
+ t.Cb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-progress-control vjs-control"})};t.qc=t.U.extend({l:function(a,c){t.U.call(this,a,c);this.b(a,"timeupdate",this.Ca);a.I(t.bind(this,this.Ca))}});s=t.qc.prototype;s.q={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};s.Yc="timeupdate";s.e=function(){return t.U.prototype.e.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})};
91
+ s.Ca=function(){var a=this.d.ob?this.d.K.currentTime:this.d.currentTime();this.c.setAttribute("aria-valuenow",t.round(100*this.Sb(),2));this.c.setAttribute("aria-valuetext",t.Ma(a,this.d.duration()))};s.Sb=function(){return this.d.currentTime()/this.d.duration()};s.mb=function(a){t.U.prototype.mb.call(this,a);this.d.ob=f;this.d.p("vjs-scrubbing");this.df=!this.d.paused();this.d.pause()};s.la=function(a){a=ea(this,a)*this.d.duration();a==this.d.duration()&&(a-=0.1);this.d.currentTime(a)};
92
+ s.za=function(a){t.U.prototype.za.call(this,a);this.d.ob=l;this.d.r("vjs-scrubbing");this.df&&this.d.play()};s.kd=function(){this.d.currentTime(this.d.currentTime()+5)};s.jd=function(){this.d.currentTime(this.d.currentTime()-5)};t.zb=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.b(a,"progress",this.update)}});t.zb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.v("Loaded")+"</span>: 0%</span>"})};
93
+ t.zb.prototype.update=function(){var a,c,d,e,g=this.d.buffered();a=this.d.duration();var h,k=this.d;h=k.buffered();k=k.duration();h=h.end(h.length-1);h>k&&(h=k);k=this.c.children;this.c.style.width=100*(h/a||0)+"%";for(a=0;a<g.length;a++)c=g.start(a),d=g.end(a),(e=k[a])||(e=this.c.appendChild(t.e())),e.style.left=100*(c/h||0)+"%",e.style.width=100*((d-c)/h||0)+"%";for(a=k.length;a>g.length;a--)this.c.removeChild(k[a-1])};t.mc=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});
94
+ t.mc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-play-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.v("Progress")+"</span>: 0%</span>"})};t.$a=t.ha.extend({l:function(a,c){t.ha.call(this,a,c);this.b(a,"timeupdate",this.ga)}});t.$a.prototype.defaultValue="00:00";t.$a.prototype.e=function(){return t.ha.prototype.e.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})};
95
+ t.$a.prototype.ga=function(){var a=this.d.ob?this.d.K.currentTime:this.d.currentTime();this.c.innerHTML='<span class="vjs-control-text">'+t.Ma(a,this.d.duration())+"</span>"};t.Gb=t.a.extend({l:function(a,c){t.a.call(this,a,c);a.h&&a.h.featuresVolumeControl===l&&this.p("vjs-hidden");this.b(a,"loadstart",function(){a.h.featuresVolumeControl===l?this.p("vjs-hidden"):this.r("vjs-hidden")})}});t.Gb.prototype.q={children:{volumeBar:{}}};
96
+ t.Gb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-volume-control vjs-control"})};t.Fb=t.U.extend({l:function(a,c){t.U.call(this,a,c);this.b(a,"volumechange",this.Ca);a.I(t.bind(this,this.Ca))}});s=t.Fb.prototype;s.Ca=function(){this.c.setAttribute("aria-valuenow",t.round(100*this.d.volume(),2));this.c.setAttribute("aria-valuetext",t.round(100*this.d.volume(),2)+"%")};s.q={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"};
97
+ s.Yc="volumechange";s.e=function(){return t.U.prototype.e.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})};s.la=function(a){this.d.muted()&&this.d.muted(l);this.d.volume(ea(this,a))};s.Sb=function(){return this.d.muted()?0:this.d.volume()};s.kd=function(){this.d.volume(this.d.volume()+0.1)};s.jd=function(){this.d.volume(this.d.volume()-0.1)};t.uc=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});
98
+ t.uc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})};t.Hb=t.ha.extend();t.Hb.prototype.defaultValue="00:00";t.Hb.prototype.e=function(){return t.ha.prototype.e.call(this,"div",{className:"vjs-volume-handle"})};
99
+ t.qa=t.w.extend({l:function(a,c){t.w.call(this,a,c);this.b(a,"volumechange",this.update);a.h&&a.h.featuresVolumeControl===l&&this.p("vjs-hidden");this.b(a,"loadstart",function(){a.h.featuresVolumeControl===l?this.p("vjs-hidden"):this.r("vjs-hidden")})}});t.qa.prototype.e=function(){return t.w.prototype.e.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.v("Mute")+"</span></div>"})};
100
+ t.qa.prototype.u=function(){this.d.muted(this.d.muted()?l:f)};t.qa.prototype.update=function(){var a=this.d.volume(),c=3;0===a||this.d.muted()?c=0:0.33>a?c=1:0.67>a&&(c=2);this.d.muted()?this.c.children[0].children[0].innerHTML!=this.v("Unmute")&&(this.c.children[0].children[0].innerHTML=this.v("Unmute")):this.c.children[0].children[0].innerHTML!=this.v("Mute")&&(this.c.children[0].children[0].innerHTML=this.v("Mute"));for(a=0;4>a;a++)t.r(this.c,"vjs-vol-"+a);t.p(this.c,"vjs-vol-"+c)};
101
+ t.Fa=t.O.extend({l:function(a,c){t.O.call(this,a,c);this.b(a,"volumechange",this.ef);a.h&&a.h.featuresVolumeControl===l&&this.p("vjs-hidden");this.b(a,"loadstart",function(){a.h.featuresVolumeControl===l?this.p("vjs-hidden"):this.r("vjs-hidden")});this.p("vjs-menu-button")}});t.Fa.prototype.Ja=function(){var a=new t.pa(this.d,{Cc:"div"}),c=new t.Fb(this.d,this.q.volumeBar);c.b("focus",function(){a.p("vjs-lock-showing")});c.b("blur",function(){G(a)});a.ba(c);return a};
102
+ t.Fa.prototype.u=function(){t.qa.prototype.u.call(this);t.O.prototype.u.call(this)};t.Fa.prototype.e=function(){return t.w.prototype.e.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.v("Mute")+"</span></div>"})};t.Fa.prototype.ef=t.qa.prototype.update;t.oc=t.O.extend({l:function(a,c){t.O.call(this,a,c);this.sd();this.rd();this.b(a,"loadstart",this.sd);this.b(a,"ratechange",this.rd)}});s=t.oc.prototype;s.sa="Playback Rate";
103
+ s.className="vjs-playback-rate";s.e=function(){var a=t.O.prototype.e.call(this);this.Sc=t.e("div",{className:"vjs-playback-rate-value",innerHTML:1});a.appendChild(this.Sc);return a};s.Ja=function(){var a=new t.pa(this.k()),c=this.k().options().playbackRates;if(c)for(var d=c.length-1;0<=d;d--)a.ba(new t.Bb(this.k(),{rate:c[d]+"x"}));return a};s.Ca=function(){this.m().setAttribute("aria-valuenow",this.k().playbackRate())};
104
+ s.u=function(){for(var a=this.k().playbackRate(),c=this.k().options().playbackRates,d=c[0],e=0;e<c.length;e++)if(c[e]>a){d=c[e];break}this.k().playbackRate(d)};function na(a){return a.k().h&&a.k().h.featuresPlaybackRate&&a.k().options().playbackRates&&0<a.k().options().playbackRates.length}s.sd=function(){na(this)?this.r("vjs-hidden"):this.p("vjs-hidden")};s.rd=function(){na(this)&&(this.Sc.innerHTML=this.k().playbackRate()+"x")};
105
+ t.Bb=t.M.extend({Cc:"button",l:function(a,c){var d=this.label=c.rate,e=this.$c=parseFloat(d,10);c.label=d;c.selected=1===e;t.M.call(this,a,c);this.b(a,"ratechange",this.update)}});t.Bb.prototype.u=function(){t.M.prototype.u.call(this);this.k().playbackRate(this.$c)};t.Bb.prototype.update=function(){this.selected(this.k().playbackRate()==this.$c)};t.pc=t.w.extend({l:function(a,c){t.w.call(this,a,c);this.update();a.b("posterchange",t.bind(this,this.update))}});s=t.pc.prototype;
106
+ s.dispose=function(){this.k().n("posterchange",this.update);t.w.prototype.dispose.call(this)};s.e=function(){var a=t.e("div",{className:"vjs-poster",tabIndex:-1});t.wd||(this.Ob=t.e("img"),a.appendChild(this.Ob));return a};s.update=function(){var a=this.k().poster();this.ma(a);a?this.show():this.Y()};s.ma=function(a){var c;this.Ob?this.Ob.src=a:(c="",a&&(c='url("'+a+'")'),this.c.style.backgroundImage=c)};s.u=function(){this.d.play()};t.lc=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});
107
+ t.lc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-loading-spinner"})};t.sb=t.w.extend();t.sb.prototype.e=function(){return t.w.prototype.e.call(this,"div",{className:"vjs-big-play-button",innerHTML:'<span aria-hidden="true"></span>',"aria-label":"play video"})};t.sb.prototype.u=function(){this.d.play()};t.xb=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.update();this.b(a,"error",this.update)}});
108
+ t.xb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-error-display"});this.B=t.e("div");a.appendChild(this.B);return a};t.xb.prototype.update=function(){this.k().error()&&(this.B.innerHTML=this.v(this.k().error().message))};var O;t.j=t.a.extend({l:function(a,c,d){c=c||{};c.dd=l;t.a.call(this,a,c,d);this.featuresProgressEvents||this.re();this.featuresTimeupdateEvents||this.se();this.fe();this.featuresNativeTextTracks||this.Vd();this.he()}});s=t.j.prototype;
109
+ s.fe=function(){var a,c;a=this.k();c=function(){a.controls()&&!a.usingNativeControls()&&this.Id()};this.I(c);this.b(a,"controlsenabled",c);this.b(a,"controlsdisabled",this.He);this.I(function(){this.networkState&&0<this.networkState()&&this.k().o("loadstart")})};
110
+ s.Id=function(){var a;this.b("mousedown",this.u);this.b("touchstart",function(){a=this.d.userActive()});this.b("touchmove",function(){a&&this.k().reportUserActivity()});this.b("touchend",function(a){a.preventDefault()});da(this);this.b("tap",this.Be)};s.He=function(){this.n("tap");this.n("touchstart");this.n("touchmove");this.n("touchleave");this.n("touchcancel");this.n("touchend");this.n("click");this.n("mousedown")};
111
+ s.u=function(a){0===a.button&&this.k().controls()&&(this.k().paused()?this.k().play():this.k().pause())};s.Be=function(){this.k().userActive(!this.k().userActive())};s.re=function(){this.Uc=f;this.$e()};s.qe=function(){this.Uc=l;this.ld()};s.$e=function(){this.Ge=this.setInterval(function(){var a=this.k().bufferedPercent();this.Md!=a&&this.k().o("progress");this.Md=a;1===a&&this.ld()},500)};s.ld=function(){this.clearInterval(this.Ge)};
112
+ s.se=function(){var a=this.d;this.Yb=f;this.b(a,"play",this.pd);this.b(a,"pause",this.rb);this.N("timeupdate",function(){this.featuresTimeupdateEvents=f;this.Vc()})};s.Vc=function(){var a=this.d;this.Yb=l;this.rb();this.n(a,"play",this.pd);this.n(a,"pause",this.rb)};s.pd=function(){this.Fc&&this.rb();this.Fc=this.setInterval(function(){this.k().o("timeupdate")},250)};s.rb=function(){this.clearInterval(this.Fc);this.k().o("timeupdate")};s.dispose=function(){this.Uc&&this.qe();this.Yb&&this.Vc();t.a.prototype.dispose.call(this)};
113
+ s.bc=function(){this.Yb&&this.k().o("timeupdate")};s.he=function(){function a(){var a=c.ea("textTrackDisplay");a&&a.C()}var c=this.d,d;if(d=this.textTracks())d.addEventListener("removetrack",a),d.addEventListener("addtrack",a),this.b("dispose",t.bind(this,function(){d.removeEventListener("removetrack",a);d.removeEventListener("addtrack",a)}))};
114
+ s.Vd=function(){var a=this.d,c,d,e;window.WebVTT||(e=document.createElement("script"),e.src=a.options()["vtt.js"]||"../node_modules/vtt.js/dist/vtt.js",a.m().appendChild(e),window.WebVTT=f);if(d=this.textTracks())c=function(){var c,d,e;e=a.ea("textTrackDisplay");e.C();for(c=0;c<this.length;c++)d=this[c],d.removeEventListener("cuechange",t.bind(e,e.C)),"showing"===d.mode&&d.addEventListener("cuechange",t.bind(e,e.C))},d.addEventListener("change",c),this.b("dispose",t.bind(this,function(){d.removeEventListener("change",
115
+ c)}))};s.textTracks=function(){this.d.od=this.d.od||new t.F;return this.d.od};s.Z=function(){this.d.ad=this.d.ad||new t.F;return this.d.ad};O=function(a,c,d,e,g){var h=a.textTracks();g=g||{};g.kind=c;d&&(g.label=d);e&&(g.language=e);g.player=a.d;a=new t.t(g);P(h,a);return a};t.j.prototype.addTextTrack=function(a,c,d){if(!a)throw Error("TextTrack kind is required but was not provided");return O(this,a,c,d)};t.j.prototype.ia=function(a){a=O(this,a.kind,a.label,a.language,a);P(this.Z(),a);return{T:a}};
116
+ t.j.prototype.Ba=function(a){Q(this.textTracks(),a);Q(this.Z(),a)};t.j.prototype.fd=m();t.j.prototype.featuresVolumeControl=f;t.j.prototype.featuresFullscreenResize=l;t.j.prototype.featuresPlaybackRate=l;t.j.prototype.featuresProgressEvents=l;t.j.prototype.featuresTimeupdateEvents=l;t.j.prototype.featuresNativeTextTracks=l;
117
+ t.j.gc=function(a){a.Ra=function(c,d){var e=a.gd;e||(e=a.gd=[]);d===b&&(d=e.length);e.splice(d,0,c)};a.pb=function(c){for(var d=a.gd||[],e,g=0;g<d.length;g++)if(e=d[g].eb(c))return d[g];return j};a.zc=function(c){var d=a.pb(c);return d?d.eb(c):""};a.prototype.Sa=function(c){var d=a.pb(c);d||(a.S?d=a.S:t.log.error("No source hander found for the current source."));this.Ka();this.n("dispose",this.Ka);this.Ec=c;this.cc=d.Tb(c,this);this.b("dispose",this.Ka);return this};a.prototype.Ka=function(){this.cc&&
118
+ this.cc.dispose&&this.cc.dispose()}};t.media={};
119
+ t.f=t.j.extend({l:function(a,c,d){var e,g,h;if(c.nativeCaptions===l||c.nativeTextTracks===l)this.featuresNativeTextTracks=l;t.j.call(this,a,c,d);for(d=t.f.yb.length-1;0<=d;d--)this.b(t.f.yb[d],this.Wd);(c=c.source)&&(this.c.currentSrc!==c.src||a.L&&3===a.L.ge)&&this.Sa(c);if(this.c.hasChildNodes()){d=this.c.childNodes;e=d.length;for(c=[];e--;)g=d[e],h=g.nodeName.toLowerCase(),"track"===h&&(this.featuresNativeTextTracks?P(this.Z(),g.track):c.push(g));for(d=0;d<c.length;d++)this.c.removeChild(c[d])}this.featuresNativeTextTracks&&
120
+ this.b("loadstart",t.bind(this,this.ee));if(t.Eb&&a.options().nativeControlsForTouch===f){var k,p,r,u;k=this;p=this.k();c=p.controls();k.c.controls=!!c;r=function(){k.c.controls=f};u=function(){k.c.controls=l};p.b("controlsenabled",r);p.b("controlsdisabled",u);c=function(){p.n("controlsenabled",r);p.n("controlsdisabled",u)};k.b("dispose",c);p.b("usingcustomcontrols",c);p.usingNativeControls(f)}a.I(function(){this.src()&&(this.L&&this.q.autoplay&&this.paused())&&(delete this.L.poster,this.play())});
121
+ this.Wa()}});s=t.f.prototype;s.dispose=function(){t.f.Mb(this.c);t.j.prototype.dispose.call(this)};
122
+ s.e=function(){var a=this.d,c,d,e,g=a.L;if(!g||this.movingMediaElementInDOM===l){g?(e=g.cloneNode(l),t.f.Mb(g),g=e,a.L=j):(g=t.e("video"),e=videojs.$.ya({},a.Xe),(!t.Eb||a.options().nativeControlsForTouch!==f)&&delete e.controls,t.ed(g,t.i.D(e,{id:a.id()+"_html5_api","class":"vjs-tech"})));g.player=a;if(a.q.qd)for(e=0;e<a.q.qd.length;e++)c=a.q.qd[e],d=document.createElement("track"),d.Wb=c.Wb,d.label=c.label,d.hd=c.hd,d.src=c.src,"default"in c&&d.setAttribute("default","default"),g.appendChild(d);
123
+ t.Ub(g,a.m())}c=["autoplay","preload","loop","muted"];for(e=c.length-1;0<=e;e--){d=c[e];var h={};"undefined"!==typeof a.q[d]&&(h[d]=a.q[d]);t.ed(g,h)}return g};s.ee=function(){for(var a=this.c.querySelectorAll("track"),c,d=a.length,e={captions:1,subtitles:1};d--;)if((c=a[d].T)&&c.kind in e&&!a[d]["default"])c.mode="disabled"};s.Wd=function(a){"error"==a.type&&this.error()?this.k().error(this.error().code):(a.bubbles=l,this.k().o(a))};s.play=function(){this.c.play()};s.pause=function(){this.c.pause()};
124
+ s.paused=function(){return this.c.paused};s.currentTime=function(){return this.c.currentTime};s.bc=function(a){try{this.c.currentTime=a}catch(c){t.log(c,"Video is not ready. (Video.js)")}};s.duration=function(){return this.c.duration||0};s.buffered=function(){return this.c.buffered};s.volume=function(){return this.c.volume};s.Se=function(a){this.c.volume=a};s.muted=function(){return this.c.muted};s.Oe=function(a){this.c.muted=a};s.width=function(){return this.c.offsetWidth};s.height=function(){return this.c.offsetHeight};
125
+ s.Ta=function(){return"function"==typeof this.c.webkitEnterFullScreen&&(/Android/.test(t.P)||!/Chrome|Mac OS X 10.5/.test(t.P))?f:l};s.Ic=function(){var a=this.c;"webkitDisplayingFullscreen"in a&&this.N("webkitbeginfullscreen",function(){this.d.isFullscreen(f);this.N("webkitendfullscreen",function(){this.d.isFullscreen(l);this.d.o("fullscreenchange")});this.d.o("fullscreenchange")});a.paused&&a.networkState<=a.jf?(this.c.play(),this.setTimeout(function(){a.pause();a.webkitEnterFullScreen()},0)):a.webkitEnterFullScreen()};
126
+ s.Xd=function(){this.c.webkitExitFullScreen()};s.src=function(a){if(a===b)return this.c.src;this.ma(a)};s.ma=function(a){this.c.src=a};s.load=function(){this.c.load()};s.currentSrc=function(){return this.c.currentSrc};s.poster=function(){return this.c.poster};s.fd=function(a){this.c.poster=a};s.Qa=function(){return this.c.Qa};s.Qe=function(a){this.c.Qa=a};s.autoplay=function(){return this.c.autoplay};s.Le=function(a){this.c.autoplay=a};s.controls=function(){return this.c.controls};s.loop=function(){return this.c.loop};
127
+ s.Ne=function(a){this.c.loop=a};s.error=function(){return this.c.error};s.seeking=function(){return this.c.seeking};s.ended=function(){return this.c.ended};s.playbackRate=function(){return this.c.playbackRate};s.Pe=function(a){this.c.playbackRate=a};s.networkState=function(){return this.c.networkState};s.readyState=function(){return this.c.readyState};s.textTracks=function(){return!this.featuresNativeTextTracks?t.j.prototype.textTracks.call(this):this.c.textTracks};
128
+ s.addTextTrack=function(a,c,d){return!this.featuresNativeTextTracks?t.j.prototype.addTextTrack.call(this,a,c,d):this.c.addTextTrack(a,c,d)};
129
+ s.ia=function(a){if(!this.featuresNativeTextTracks)return t.j.prototype.ia.call(this,a);var c=document.createElement("track");a=a||{};a.kind&&(c.kind=a.kind);a.label&&(c.label=a.label);if(a.language||a.srclang)c.srclang=a.language||a.srclang;a["default"]&&(c["default"]=a["default"]);a.id&&(c.id=a.id);a.src&&(c.src=a.src);this.m().appendChild(c);c.track.mode="metadata"===c.T.kind?"hidden":"disabled";c.onload=function(){var a=c.track;2<=c.readyState&&("metadata"===a.kind&&"hidden"!==a.mode?a.mode="hidden":
130
+ "metadata"!==a.kind&&"disabled"!==a.mode&&(a.mode="disabled"),c.onload=j)};P(this.Z(),c.T);return c};s.Ba=function(a){if(!this.featuresNativeTextTracks)return t.j.prototype.Ba.call(this,a);var c,d;Q(this.Z(),a);c=this.m().querySelectorAll("track");for(d=0;d<c.length;d++)if(c[d]===a||c[d].track===a){c[d].parentNode.removeChild(c[d]);break}};t.f.isSupported=function(){try{t.A.volume=0.5}catch(a){return l}return!!t.A.canPlayType};t.j.gc(t.f);t.f.S={};
131
+ t.f.S.eb=function(a){function c(a){try{return t.A.canPlayType(a)}catch(c){return""}}return a.type?c(a.type):a.src?(a=(a=a.src.match(/\.([^.\/\?]+)(\?[^\/]+)?$/i))&&a[1],c("video/"+a)):""};t.f.S.Tb=function(a,c){c.ma(a.src)};t.f.S.dispose=m();t.f.Ra(t.f.S);t.f.Od=function(){var a=t.A.volume;t.A.volume=a/2+0.1;return a!==t.A.volume};t.f.Nd=function(){var a=t.A.playbackRate;t.A.playbackRate=a/2+0.1;return a!==t.A.playbackRate};
132
+ t.f.Ve=function(){var a;(a=!!t.A.textTracks)&&0<t.A.textTracks.length&&(a="number"!==typeof t.A.textTracks[0].mode);a&&t.jc&&(a=l);return a};t.f.prototype.featuresVolumeControl=t.f.Od();t.f.prototype.featuresPlaybackRate=t.f.Nd();t.f.prototype.movingMediaElementInDOM=!t.Ad;t.f.prototype.featuresFullscreenResize=f;t.f.prototype.featuresProgressEvents=f;t.f.prototype.featuresNativeTextTracks=t.f.Ve();var S,oa=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,pa=/^video\/mp4/i;
133
+ t.f.Xc=function(){4<=t.hc&&(S||(S=t.A.constructor.prototype.canPlayType),t.A.constructor.prototype.canPlayType=function(a){return a&&oa.test(a)?"maybe":S.call(this,a)});t.Ed&&(S||(S=t.A.constructor.prototype.canPlayType),t.A.constructor.prototype.canPlayType=function(a){return a&&pa.test(a)?"maybe":S.call(this,a)})};t.f.bf=function(){var a=t.A.constructor.prototype.canPlayType;t.A.constructor.prototype.canPlayType=S;S=j;return a};t.f.Xc();t.f.yb="loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange volumechange".split(" ");
134
+ t.f.Mb=function(a){if(a){a.player=j;for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src");if("function"===typeof a.load)try{a.load()}catch(c){}}};
135
+ t.g=t.j.extend({l:function(a,c,d){t.j.call(this,a,c,d);var e=c.source;d=a.id()+"_flash_api";var g=a.q,g=t.i.D({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:g.autoplay,preload:g.Qa,loop:g.loop,muted:g.muted},c.flashVars),h=t.i.D({wmode:"opaque",bgcolor:"#000000"},c.params);d=t.i.D({id:d,name:d,"class":"vjs-tech"},c.attributes);e&&this.I(function(){this.Sa(e)});t.Ub(this.c,c.parentEl);c.startTime&&this.I(function(){this.load();
136
+ this.play();this.currentTime(c.startTime)});t.jc&&this.I(function(){this.b("mousemove",function(){this.k().o({type:"mousemove",bubbles:l})})});a.b("stageclick",a.reportUserActivity);this.c=t.g.Hc(c.swf,this.c,g,h,d)}});s=t.g.prototype;s.dispose=function(){t.j.prototype.dispose.call(this)};s.play=function(){this.c.vjs_play()};s.pause=function(){this.c.vjs_pause()};s.src=function(a){return a===b?this.currentSrc():this.ma(a)};
137
+ s.ma=function(a){a=t.$d(a);this.c.vjs_src(a);if(this.d.autoplay()){var c=this;this.setTimeout(function(){c.play()},0)}};t.g.prototype.setCurrentTime=function(a){this.oe=a;this.c.vjs_setProperty("currentTime",a);t.j.prototype.bc.call(this)};t.g.prototype.currentTime=function(){return this.seeking()?this.oe||0:this.c.vjs_getProperty("currentTime")};t.g.prototype.currentSrc=function(){return this.Ec?this.Ec.src:this.c.vjs_getProperty("currentSrc")};t.g.prototype.load=function(){this.c.vjs_load()};
138
+ t.g.prototype.poster=function(){this.c.vjs_getProperty("poster")};t.g.prototype.setPoster=m();t.g.prototype.buffered=function(){return t.Lb(0,this.c.vjs_getProperty("buffered"))};t.g.prototype.Ta=q(l);t.g.prototype.Ic=q(l);function qa(){var a=T[U],c=a.charAt(0).toUpperCase()+a.slice(1);ra["set"+c]=function(c){return this.c.vjs_setProperty(a,c)}}function sa(a){ra[a]=function(){return this.c.vjs_getProperty(a)}}
139
+ var ra=t.g.prototype,T="rtmpConnection rtmpStream preload defaultPlaybackRate playbackRate autoplay loop mediaGroup controller controls volume muted defaultMuted".split(" "),ta="error networkState readyState seeking initialTime duration startOffsetTime paused played seekable ended videoTracks audioTracks videoWidth videoHeight".split(" "),U;for(U=0;U<T.length;U++)sa(T[U]),qa();for(U=0;U<ta.length;U++)sa(ta[U]);t.g.isSupported=function(){return 10<=t.g.version()[0]};t.j.gc(t.g);t.g.S={};
140
+ t.g.S.eb=function(a){return!a.type?"":a.type.replace(/;.*/,"").toLowerCase()in t.g.Zd?"maybe":""};t.g.S.Tb=function(a,c){c.ma(a.src)};t.g.S.dispose=m();t.g.Ra(t.g.S);t.g.Zd={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};t.g.onReady=function(a){var c;if(c=(a=t.m(a))&&a.parentNode&&a.parentNode.player)a.player=c,t.g.checkReady(c.h)};t.g.checkReady=function(a){a.m()&&(a.m().vjs_getProperty?a.Wa():this.setTimeout(function(){t.g.checkReady(a)},50))};
141
+ t.g.onEvent=function(a,c){t.m(a).player.o(c)};t.g.onError=function(a,c){var d=t.m(a).player,e="FLASH: "+c;"srcnotfound"==c?d.error({code:4,message:e}):d.error(e)};
142
+ t.g.version=function(){var a="0,0,0";try{a=(new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(c){try{navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(a=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(d){}}return a.split(",")};
143
+ t.g.Hc=function(a,c,d,e,g){a=t.g.ce(a,d,e,g);a=t.e("div",{innerHTML:a}).childNodes[0];d=c.parentNode;c.parentNode.replaceChild(a,c);a[t.expando]=c[t.expando];var h=d.childNodes[0];setTimeout(function(){h.style.display="block"},1E3);return a};
144
+ t.g.ce=function(a,c,d,e){var g="",h="",k="";c&&t.i.da(c,function(a,c){g+=a+"="+c+"&amp;"});d=t.i.D({movie:a,flashvars:g,allowScriptAccess:"always",allowNetworking:"all"},d);t.i.da(d,function(a,c){h+='<param name="'+a+'" value="'+c+'" />'});e=t.i.D({data:a,width:"100%",height:"100%"},e);t.i.da(e,function(a,c){k+=a+'="'+c+'" '});return'<object type="application/x-shockwave-flash" '+k+">"+h+"</object>"};t.g.Ue={"rtmp/mp4":"MP4","rtmp/flv":"FLV"};t.g.Hf=function(a,c){return a+"&"+c};
145
+ t.g.Te=function(a){var c={Bc:"",md:""};if(!a)return c;var d=a.indexOf("&"),e;-1!==d?e=d+1:(d=e=a.lastIndexOf("/")+1,0===d&&(d=e=a.length));c.Bc=a.substring(0,d);c.md=a.substring(e,a.length);return c};t.g.me=function(a){return a in t.g.Ue};t.g.Gd=/^rtmp[set]?:\/\//i;t.g.le=function(a){return t.g.Gd.test(a)};t.g.ac={};t.g.ac.eb=function(a){return t.g.me(a.type)||t.g.le(a.src)?"maybe":""};t.g.ac.Tb=function(a,c){var d=t.g.Te(a.src);c.setRtmpConnection(d.Bc);c.setRtmpStream(d.md)};t.g.Ra(t.g.ac);
146
+ t.Fd=t.a.extend({l:function(a,c,d){t.a.call(this,a,c,d);if(!a.q.sources||0===a.q.sources.length){c=0;for(d=a.q.techOrder;c<d.length;c++){var e=t.ua(d[c]),g=window.videojs[e];if(g&&g.isSupported()){ka(a,e);break}}}else a.src(a.q.sources)}});t.rc={disabled:"disabled",hidden:"hidden",showing:"showing"};t.Hd={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"};
147
+ t.t=function(a){var c,d,e,g,h,k,p,r,u,A,R;a=a||{};if(!a.player)throw Error("A player was not provided.");c=this;if(t.oa)for(R in c=document.createElement("custom"),t.t.prototype)c[R]=t.t.prototype[R];c.d=a.player;e=t.rc[a.mode]||"disabled";g=t.Hd[a.kind]||"subtitles";h=a.label||"";k=a.language||a.srclang||"";d=a.id||"vjs_text_track_"+t.s++;if("metadata"===g||"chapters"===g)e="hidden";c.X=[];c.Ga=[];p=new t.W(c.X);r=new t.W(c.Ga);A=l;u=t.bind(c,function(){this.activeCues;A&&(this.trigger("cuechange"),
148
+ A=l)});"disabled"!==e&&c.d.b("timeupdate",u);Object.defineProperty(c,"kind",{get:function(){return g},set:Function.prototype});Object.defineProperty(c,"label",{get:function(){return h},set:Function.prototype});Object.defineProperty(c,"language",{get:function(){return k},set:Function.prototype});Object.defineProperty(c,"id",{get:function(){return d},set:Function.prototype});Object.defineProperty(c,"mode",{get:function(){return e},set:function(a){t.rc[a]&&(e=a,"showing"===e&&this.d.b("timeupdate",u),
149
+ this.o("modechange"))}});Object.defineProperty(c,"cues",{get:function(){return!this.Xb?j:p},set:Function.prototype});Object.defineProperty(c,"activeCues",{get:function(){var a,c,d,e,g;if(!this.Xb)return j;if(0===this.cues.length)return r;e=this.d.currentTime();a=0;c=this.cues.length;for(d=[];a<c;a++)g=this.cues[a],g.startTime<=e&&g.endTime>=e?d.push(g):g.startTime===g.endTime&&(g.startTime<=e&&g.startTime+0.5>=e)&&d.push(g);A=l;if(d.length!==this.Ga.length)A=f;else for(a=0;a<d.length;a++)-1===ua.call(this.Ga,
150
+ d[a])&&(A=f);this.Ga=d;r.qb(this.Ga);return r},set:Function.prototype});a.src?va(a.src,c):c.Xb=f;if(t.oa)return c};t.t.prototype=t.i.create(t.z.prototype);t.t.prototype.constructor=t.t;t.t.prototype.bb={cuechange:"cuechange"};t.t.prototype.vc=function(a){var c=this.d.textTracks(),d=0;if(c)for(;d<c.length;d++)c[d]!==this&&c[d].bd(a);this.X.push(a);this.cues.qb(this.X)};t.t.prototype.bd=function(a){for(var c=0,d=this.X.length,e,g=l;c<d;c++)e=this.X[c],e===a&&(this.X.splice(c,1),g=f);g&&this.Dc.qb(this.X)};
151
+ var va,V,ua;va=function(a,c){t.ff(a,t.bind(this,function(a,e,g){if(a)return t.log.error(a);c.Xb=f;V(g,c)}))};V=function(a,c){if("function"!==typeof window.WebVTT)window.setTimeout(function(){V(a,c)},25);else{var d=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder());d.oncue=function(a){c.vc(a)};d.onparsingerror=function(a){t.log.error(a)};d.parse(a);d.flush()}};
152
+ ua=function(a,c){var d;if(this==j)throw new TypeError('"this" is null or not defined');var e=Object(this),g=e.length>>>0;if(0===g)return-1;d=+c||0;Infinity===Math.abs(d)&&(d=0);if(d>=g)return-1;for(d=Math.max(0<=d?d:g-Math.abs(d),0);d<g;){if(d in e&&e[d]===a)return d;d++}return-1};
153
+ t.F=function(a){var c=this,d,e=0;if(t.oa)for(d in c=document.createElement("custom"),t.F.prototype)c[d]=t.F.prototype[d];a=a||[];c.Va=[];for(Object.defineProperty(c,"length",{get:function(){return this.Va.length}});e<a.length;e++)P(c,a[e]);if(t.oa)return c};t.F.prototype=t.i.create(t.z.prototype);t.F.prototype.constructor=t.F;t.F.prototype.bb={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var wa in t.F.prototype.bb)t.F.prototype["on"+wa]=j;
154
+ function P(a,c){var d=a.Va.length;""+d in a||Object.defineProperty(a,d,{get:function(){return this.Va[d]}});c.addEventListener("modechange",t.bind(a,function(){this.o("change")}));a.Va.push(c);a.o({type:"addtrack",T:c})}function Q(a,c){for(var d=0,e=a.length,g;d<e;d++)if(g=a[d],g===c){a.Va.splice(d,1);break}a.o({type:"removetrack",T:c})}t.F.prototype.de=function(a){for(var c=0,d=this.length,e=j,g;c<d;c++)if(g=this[c],g.id===a){e=g;break}return e};
155
+ t.W=function(a){var c=this,d;if(t.oa)for(d in c=document.createElement("custom"),t.W.prototype)c[d]=t.W.prototype[d];t.W.prototype.qb.call(c,a);Object.defineProperty(c,"length",{get:n("pe")});if(t.oa)return c};t.W.prototype.qb=function(a){var c=this.length||0,d=0,e=a.length;this.X=a;this.pe=a.length;a=function(a){""+a in this||Object.defineProperty(this,""+a,{get:function(){return this.X[a]}})};if(c<e)for(d=c;d<e;d++)a.call(this,d)};
156
+ t.W.prototype.be=function(a){for(var c=0,d=this.length,e=j,g;c<d;c++)if(g=this[c],g.id===a){e=g;break}return e};t.ra=t.a.extend({l:function(a,c,d){t.a.call(this,a,c,d);a.b("loadstart",t.bind(this,this.Ze));a.I(t.bind(this,function(){if(a.h&&a.h.featuresNativeTextTracks)this.Y();else{var c,d,h;a.b("fullscreenchange",t.bind(this,this.C));d=a.q.tracks||[];for(c=0;c<d.length;c++)h=d[c],this.d.ia(h)}}))}});t.ra.prototype.Ze=function(){this.d.h&&this.d.h.featuresNativeTextTracks?this.Y():this.show()};
157
+ t.ra.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-text-track-display"})};t.ra.prototype.Pd=function(){"function"===typeof window.WebVTT&&window.WebVTT.processCues(window,[],this.c)};function W(a,c){return"rgba("+parseInt(a[1]+a[1],16)+","+parseInt(a[2]+a[2],16)+","+parseInt(a[3]+a[3],16)+","+c+")"}
158
+ var xa={xf:"monospace",Df:"sans-serif",Ff:"serif",yf:'"Andale Mono", "Lucida Console", monospace',zf:'"Courier New", monospace',Bf:"sans-serif",Cf:"serif",of:'"Comic Sans MS", Impact, fantasy',Ef:'"Monotype Corsiva", cursive',Gf:'"Andale Mono", "Lucida Console", monospace, sans-serif'};t.ra.prototype.C=function(){var a=this.d.textTracks(),c=0,d;this.Pd();if(a)for(;c<a.length;c++)d=a[c],"showing"===d.mode&&this.cf(d)};
159
+ t.ra.prototype.cf=function(a){if("function"===typeof window.WebVTT&&a.activeCues){for(var c=0,d=this.d.textTrackSettings.Lc(),e,g=[];c<a.activeCues.length;c++)g.push(a.activeCues[c]);window.WebVTT.processCues(window,a.activeCues,this.c);for(c=g.length;c--;){a=g[c].pf;d.color&&(a.firstChild.style.color=d.color);if(d.nd)try{a.firstChild.style.color=W(d.color||"#fff",d.nd)}catch(h){}d.backgroundColor&&(a.firstChild.style.backgroundColor=d.backgroundColor);if(d.yc)try{a.firstChild.style.backgroundColor=
160
+ W(d.backgroundColor||"#000",d.yc)}catch(k){}if(d.fc)if(d.ud)try{a.style.backgroundColor=W(d.fc,d.ud)}catch(p){}else a.style.backgroundColor=d.fc;d.La&&("dropshadow"===d.La?a.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===d.La?a.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===d.La?a.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===d.La&&(a.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222"));
161
+ d.Qb&&1!==d.Qb&&(e=window.Af(a.style.fontSize),a.style.fontSize=e*d.Qb+"px",a.style.height="auto",a.style.top="auto",a.style.bottom="2px");d.fontFamily&&"default"!==d.fontFamily&&("small-caps"===d.fontFamily?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=xa[d.fontFamily])}}};
162
+ t.aa=t.M.extend({l:function(a,c){var d=this.T=c.track,e=a.textTracks(),g,h;e&&(g=t.bind(this,function(){var a="showing"===this.T.mode,c,d,g;if(this instanceof t.Ab){a=f;d=0;for(g=e.length;d<g;d++)if(c=e[d],c.kind===this.T.kind&&"showing"===c.mode){a=l;break}}this.selected(a)}),e.addEventListener("change",g),a.b("dispose",function(){e.removeEventListener("change",g)}));c.label=d.label||d.language||"Unknown";c.selected=d["default"]||"showing"===d.mode;t.M.call(this,a,c);e&&e.onchange===b&&this.b(["tap",
163
+ "click"],function(){if("object"!==typeof window.yd)try{h=new window.yd("change")}catch(a){}h||(h=document.createEvent("Event"),h.initEvent("change",f,f));e.dispatchEvent(h)})}});t.aa.prototype.u=function(){var a=this.T.kind,c=this.d.textTracks(),d,e=0;t.M.prototype.u.call(this);if(c)for(;e<c.length;e++)d=c[e],d.kind===a&&(d.mode=d===this.T?"showing":"disabled")};t.Ab=t.aa.extend({l:function(a,c){c.track={kind:c.kind,player:a,label:c.kind+" off","default":l,mode:"disabled"};t.aa.call(this,a,c);this.selected(f)}});
164
+ t.tb=t.aa.extend({l:function(a,c){c.track={kind:c.kind,player:a,label:c.kind+" settings","default":l,mode:"disabled"};t.aa.call(this,a,c);this.p("vjs-texttrack-settings")}});t.tb.prototype.u=function(){this.k().ea("textTrackSettings").show()};
165
+ t.Q=t.O.extend({l:function(a,c){var d,e;t.O.call(this,a,c);d=this.d.textTracks();1>=this.H.length&&this.Y();d&&(e=t.bind(this,this.update),d.addEventListener("removetrack",e),d.addEventListener("addtrack",e),this.d.b("dispose",function(){d.removeEventListener("removetrack",e);d.removeEventListener("addtrack",e)}))}});
166
+ t.Q.prototype.Ia=function(){var a=[],c,d;this instanceof t.na&&(!this.k().h||!this.k().h.featuresNativeTextTracks)&&a.push(new t.tb(this.d,{kind:this.fa}));a.push(new t.Ab(this.d,{kind:this.fa}));d=this.d.textTracks();if(!d)return a;for(var e=0;e<d.length;e++)c=d[e],c.kind===this.fa&&a.push(new t.aa(this.d,{track:c}));return a};t.na=t.Q.extend({l:function(a,c,d){t.Q.call(this,a,c,d);this.c.setAttribute("aria-label","Captions Menu")}});t.na.prototype.fa="captions";t.na.prototype.sa="Captions";
167
+ t.na.prototype.className="vjs-captions-button";t.na.prototype.update=function(){var a=2;t.Q.prototype.update.call(this);this.k().h&&this.k().h.featuresNativeTextTracks&&(a=1);this.H&&this.H.length>a?this.show():this.Y()};t.ab=t.Q.extend({l:function(a,c,d){t.Q.call(this,a,c,d);this.c.setAttribute("aria-label","Subtitles Menu")}});t.ab.prototype.fa="subtitles";t.ab.prototype.sa="Subtitles";t.ab.prototype.className="vjs-subtitles-button";
168
+ t.Xa=t.Q.extend({l:function(a,c,d){t.Q.call(this,a,c,d);this.c.setAttribute("aria-label","Chapters Menu")}});s=t.Xa.prototype;s.fa="chapters";s.sa="Chapters";s.className="vjs-chapters-button";s.Ia=function(){var a=[],c,d;d=this.d.textTracks();if(!d)return a;for(var e=0;e<d.length;e++)c=d[e],c.kind===this.fa&&a.push(new t.aa(this.d,{track:c}));return a};
169
+ s.Ja=function(){for(var a=this.d.textTracks()||[],c=0,d=a.length,e,g,h=this.H=[];c<d;c++)if(e=a[c],e.kind==this.fa)if(e.Dc){g=e;break}else e.mode="hidden",window.setTimeout(t.bind(this,function(){this.Ja()}),100);a=this.xa;a===b&&(a=new t.pa(this.d),a.va().appendChild(t.e("li",{className:"vjs-menu-title",innerHTML:t.ua(this.fa),We:-1})));if(g){e=g.cues;for(var k,c=0,d=e.length;c<d;c++)k=e[c],k=new t.Ya(this.d,{track:g,cue:k}),h.push(k),a.ba(k);this.ba(a)}0<this.H.length&&this.show();return a};
170
+ t.Ya=t.M.extend({l:function(a,c){var d=this.T=c.track,e=this.cue=c.cue,g=a.currentTime();c.label=e.text;c.selected=e.startTime<=g&&g<e.endTime;t.M.call(this,a,c);d.addEventListener("cuechange",t.bind(this,this.update))}});t.Ya.prototype.u=function(){t.M.prototype.u.call(this);this.d.currentTime(this.cue.startTime);this.update(this.cue.startTime)};t.Ya.prototype.update=function(){var a=this.cue,c=this.d.currentTime();this.selected(a.startTime<=c&&c<a.endTime)};
171
+ function X(a){var c;a.Ke?c=a.Ke[0]:a.options&&(c=a.options[a.options.selectedIndex]);return c.value}function Y(a,c){var d,e;if(c){for(d=0;d<a.options.length&&!(e=a.options[d],e.value===c);d++);a.selectedIndex=d}}
172
+ t.sc=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.Y();t.b(this.m().querySelector(".vjs-done-button"),"click",t.bind(this,function(){this.Je();this.Y()}));t.b(this.m().querySelector(".vjs-default-button"),"click",t.bind(this,function(){this.m().querySelector(".vjs-fg-color > select").selectedIndex=0;this.m().querySelector(".vjs-bg-color > select").selectedIndex=0;this.m().querySelector(".window-color > select").selectedIndex=0;this.m().querySelector(".vjs-text-opacity > select").selectedIndex=
173
+ 0;this.m().querySelector(".vjs-bg-opacity > select").selectedIndex=0;this.m().querySelector(".vjs-window-opacity > select").selectedIndex=0;this.m().querySelector(".vjs-edge-style select").selectedIndex=0;this.m().querySelector(".vjs-font-family select").selectedIndex=0;this.m().querySelector(".vjs-font-percent select").selectedIndex=2;this.C()}));t.b(this.m().querySelector(".vjs-fg-color > select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-bg-color > select"),"change",t.bind(this,
174
+ this.C));t.b(this.m().querySelector(".window-color > select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-text-opacity > select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-bg-opacity > select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-window-opacity > select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-font-percent select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-edge-style select"),"change",t.bind(this,
175
+ this.C));t.b(this.m().querySelector(".vjs-font-family select"),"change",t.bind(this,this.C));a.options().persistTextTrackSettings&&this.Ie()}});s=t.sc.prototype;s.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-caption-settings vjs-modal-overlay",innerHTML:'<div class="vjs-tracksettings"><div class="vjs-tracksettings-colors"><div class="vjs-fg-color vjs-tracksetting"><label class="vjs-label">Foreground</label><select><option value="">---</option><option value="#FFF">White</option><option value="#000">Black</option><option value="#F00">Red</option><option value="#0F0">Green</option><option value="#00F">Blue</option><option value="#FF0">Yellow</option><option value="#F0F">Magenta</option><option value="#0FF">Cyan</option></select><span class="vjs-text-opacity vjs-opacity"><select><option value="">---</option><option value="1">Opaque</option><option value="0.5">Semi-Opaque</option></select></span></div><div class="vjs-bg-color vjs-tracksetting"><label class="vjs-label">Background</label><select><option value="">---</option><option value="#FFF">White</option><option value="#000">Black</option><option value="#F00">Red</option><option value="#0F0">Green</option><option value="#00F">Blue</option><option value="#FF0">Yellow</option><option value="#F0F">Magenta</option><option value="#0FF">Cyan</option></select><span class="vjs-bg-opacity vjs-opacity"><select><option value="">---</option><option value="1">Opaque</option><option value="0.5">Semi-Transparent</option><option value="0">Transparent</option></select></span></div><div class="window-color vjs-tracksetting"><label class="vjs-label">Window</label><select><option value="">---</option><option value="#FFF">White</option><option value="#000">Black</option><option value="#F00">Red</option><option value="#0F0">Green</option><option value="#00F">Blue</option><option value="#FF0">Yellow</option><option value="#F0F">Magenta</option><option value="#0FF">Cyan</option></select><span class="vjs-window-opacity vjs-opacity"><select><option value="">---</option><option value="1">Opaque</option><option value="0.5">Semi-Transparent</option><option value="0">Transparent</option></select></span></div></div><div class="vjs-tracksettings-font"><div class="vjs-font-percent vjs-tracksetting"><label class="vjs-label">Font Size</label><select><option value="0.50">50%</option><option value="0.75">75%</option><option value="1.00" selected>100%</option><option value="1.25">125%</option><option value="1.50">150%</option><option value="1.75">175%</option><option value="2.00">200%</option><option value="3.00">300%</option><option value="4.00">400%</option></select></div><div class="vjs-edge-style vjs-tracksetting"><label class="vjs-label">Text Edge Style</label><select><option value="none">None</option><option value="raised">Raised</option><option value="depressed">Depressed</option><option value="uniform">Uniform</option><option value="dropshadow">Dropshadow</option></select></div><div class="vjs-font-family vjs-tracksetting"><label class="vjs-label">Font Family</label><select><option value="">Default</option><option value="monospaceSerif">Monospace Serif</option><option value="proportionalSerif">Proportional Serif</option><option value="monospaceSansSerif">Monospace Sans-Serif</option><option value="proportionalSansSerif">Proportional Sans-Serif</option><option value="casual">Casual</option><option value="script">Script</option><option value="small-caps">Small Caps</option></select></div></div></div><div class="vjs-tracksettings-controls"><button class="vjs-default-button">Defaults</button><button class="vjs-done-button">Done</button></div>'})};
176
+ s.Lc=function(){var a,c,d,e,g,h,k,p,r,u;a=this.m();g=X(a.querySelector(".vjs-edge-style select"));h=X(a.querySelector(".vjs-font-family select"));k=X(a.querySelector(".vjs-fg-color > select"));d=X(a.querySelector(".vjs-text-opacity > select"));p=X(a.querySelector(".vjs-bg-color > select"));c=X(a.querySelector(".vjs-bg-opacity > select"));r=X(a.querySelector(".window-color > select"));e=X(a.querySelector(".vjs-window-opacity > select"));a=window.parseFloat(X(a.querySelector(".vjs-font-percent > select")));
177
+ c={backgroundOpacity:c,textOpacity:d,windowOpacity:e,edgeStyle:g,fontFamily:h,color:k,backgroundColor:p,windowColor:r,fontPercent:a};for(u in c)(""===c[u]||"none"===c[u]||"fontPercent"===u&&1===c[u])&&delete c[u];return c};
178
+ s.Re=function(a){var c=this.m();Y(c.querySelector(".vjs-edge-style select"),a.La);Y(c.querySelector(".vjs-font-family select"),a.fontFamily);Y(c.querySelector(".vjs-fg-color > select"),a.color);Y(c.querySelector(".vjs-text-opacity > select"),a.nd);Y(c.querySelector(".vjs-bg-color > select"),a.backgroundColor);Y(c.querySelector(".vjs-bg-opacity > select"),a.yc);Y(c.querySelector(".window-color > select"),a.fc);Y(c.querySelector(".vjs-window-opacity > select"),a.ud);(a=a.Qb)&&(a=a.toFixed(2));Y(c.querySelector(".vjs-font-percent > select"),
179
+ a)};s.Ie=function(){var a;try{a=JSON.parse(window.localStorage.getItem("vjs-text-track-settings"))}catch(c){}a&&this.Re(a)};s.Je=function(){var a;if(this.d.options().persistTextTrackSettings){a=this.Lc();try{t.ib(a)?window.localStorage.removeItem("vjs-text-track-settings"):window.localStorage.setItem("vjs-text-track-settings",JSON.stringify(a))}catch(c){}}};s.C=function(){var a=this.d.ea("textTrackDisplay");a&&a.C()};
180
+ if("undefined"!==typeof window.JSON&&"function"===typeof window.JSON.parse)t.JSON=window.JSON;else{t.JSON={};var Z=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;t.JSON.parse=function(a,c){function d(a,e){var k,p,r=a[e];if(r&&"object"===typeof r)for(k in r)Object.prototype.hasOwnProperty.call(r,k)&&(p=d(r,k),p!==b?r[k]=p:delete r[k]);return c.call(a,e,r)}var e;a=String(a);Z.lastIndex=0;Z.test(a)&&(a=a.replace(Z,function(a){return"\\u"+("0000"+
181
  a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof c?d({"":e},""):e;throw new SyntaxError("JSON.parse(): invalid or malformed JSON data");}}
182
+ t.xc=function(){var a,c,d,e;a=document.getElementsByTagName("video");c=document.getElementsByTagName("audio");var g=[];if(a&&0<a.length){d=0;for(e=a.length;d<e;d++)g.push(a[d])}if(c&&0<c.length){d=0;for(e=c.length;d<e;d++)g.push(c[d])}if(g&&0<g.length){d=0;for(e=g.length;d<e;d++)if((c=g[d])&&c.getAttribute)c.player===b&&(a=c.getAttribute("data-setup"),a!==j&&videojs(c));else{t.Ib();break}}else t.td||t.Ib()};t.Ib=function(){setTimeout(t.xc,1)};
183
+ "complete"===document.readyState?t.td=f:t.N(window,"load",function(){t.td=f});t.Ib();t.Fe=function(a,c){t.Player.prototype[a]=c};var ya=this;function $(a,c){var d=a.split("."),e=ya;!(d[0]in e)&&e.execScript&&e.execScript("var "+d[0]);for(var g;d.length&&(g=d.shift());)!d.length&&c!==b?e[g]=c:e=e[g]?e[g]:e[g]={}};$("videojs",t);$("_V_",t);$("videojs.options",t.options);$("videojs.players",t.Aa);$("videojs.TOUCH_ENABLED",t.Eb);$("videojs.cache",t.ta);$("videojs.Component",t.a);t.a.prototype.player=t.a.prototype.k;t.a.prototype.options=t.a.prototype.options;t.a.prototype.init=t.a.prototype.l;t.a.prototype.dispose=t.a.prototype.dispose;t.a.prototype.createEl=t.a.prototype.e;t.a.prototype.contentEl=t.a.prototype.va;t.a.prototype.el=t.a.prototype.m;t.a.prototype.addChild=t.a.prototype.ba;
184
+ t.a.prototype.getChild=t.a.prototype.ea;t.a.prototype.getChildById=t.a.prototype.ae;t.a.prototype.children=t.a.prototype.children;t.a.prototype.initChildren=t.a.prototype.Oc;t.a.prototype.removeChild=t.a.prototype.removeChild;t.a.prototype.on=t.a.prototype.b;t.a.prototype.off=t.a.prototype.n;t.a.prototype.one=t.a.prototype.N;t.a.prototype.trigger=t.a.prototype.o;t.a.prototype.triggerReady=t.a.prototype.Wa;t.a.prototype.show=t.a.prototype.show;t.a.prototype.hide=t.a.prototype.Y;
185
+ t.a.prototype.width=t.a.prototype.width;t.a.prototype.height=t.a.prototype.height;t.a.prototype.dimensions=t.a.prototype.Td;t.a.prototype.ready=t.a.prototype.I;t.a.prototype.addClass=t.a.prototype.p;t.a.prototype.removeClass=t.a.prototype.r;t.a.prototype.hasClass=t.a.prototype.Oa;t.a.prototype.buildCSSClass=t.a.prototype.V;t.a.prototype.localize=t.a.prototype.v;t.a.prototype.setInterval=t.a.prototype.setInterval;t.a.prototype.setTimeout=t.a.prototype.setTimeout;$("videojs.EventEmitter",t.z);
186
+ t.z.prototype.on=t.z.prototype.b;t.z.prototype.addEventListener=t.z.prototype.addEventListener;t.z.prototype.off=t.z.prototype.n;t.z.prototype.removeEventListener=t.z.prototype.removeEventListener;t.z.prototype.one=t.z.prototype.N;t.z.prototype.trigger=t.z.prototype.o;t.z.prototype.dispatchEvent=t.z.prototype.dispatchEvent;t.Player.prototype.ended=t.Player.prototype.ended;t.Player.prototype.enterFullWindow=t.Player.prototype.Jc;t.Player.prototype.exitFullWindow=t.Player.prototype.Nb;
187
+ t.Player.prototype.preload=t.Player.prototype.Qa;t.Player.prototype.remainingTime=t.Player.prototype.remainingTime;t.Player.prototype.supportsFullScreen=t.Player.prototype.Ta;t.Player.prototype.currentType=t.Player.prototype.Qd;t.Player.prototype.requestFullScreen=t.Player.prototype.requestFullScreen;t.Player.prototype.requestFullscreen=t.Player.prototype.requestFullscreen;t.Player.prototype.cancelFullScreen=t.Player.prototype.cancelFullScreen;t.Player.prototype.exitFullscreen=t.Player.prototype.exitFullscreen;
188
+ t.Player.prototype.isFullScreen=t.Player.prototype.isFullScreen;t.Player.prototype.isFullscreen=t.Player.prototype.isFullscreen;t.Player.prototype.textTracks=t.Player.prototype.textTracks;t.Player.prototype.remoteTextTracks=t.Player.prototype.Z;t.Player.prototype.addTextTrack=t.Player.prototype.addTextTrack;t.Player.prototype.addRemoteTextTrack=t.Player.prototype.ia;t.Player.prototype.removeRemoteTextTrack=t.Player.prototype.Ba;$("videojs.MediaLoader",t.Fd);$("videojs.TextTrackDisplay",t.ra);
189
+ $("videojs.ControlBar",t.ub);$("videojs.Button",t.w);$("videojs.PlayToggle",t.nc);$("videojs.FullscreenToggle",t.Za);$("videojs.BigPlayButton",t.sb);$("videojs.LoadingSpinner",t.lc);$("videojs.CurrentTimeDisplay",t.vb);$("videojs.DurationDisplay",t.wb);$("videojs.TimeDivider",t.tc);$("videojs.RemainingTimeDisplay",t.Db);$("videojs.LiveDisplay",t.kc);$("videojs.ErrorDisplay",t.xb);$("videojs.Slider",t.U);$("videojs.ProgressControl",t.Cb);$("videojs.SeekBar",t.qc);$("videojs.LoadProgressBar",t.zb);
190
+ $("videojs.PlayProgressBar",t.mc);$("videojs.SeekHandle",t.$a);$("videojs.VolumeControl",t.Gb);$("videojs.VolumeBar",t.Fb);$("videojs.VolumeLevel",t.uc);$("videojs.VolumeMenuButton",t.Fa);$("videojs.VolumeHandle",t.Hb);$("videojs.MuteToggle",t.qa);$("videojs.PosterImage",t.pc);$("videojs.Menu",t.pa);$("videojs.MenuItem",t.M);$("videojs.MenuButton",t.O);$("videojs.PlaybackRateMenuButton",t.oc);$("videojs.ChaptersTrackMenuItem",t.Ya);$("videojs.TextTrackButton",t.Q);$("videojs.TextTrackMenuItem",t.aa);
191
+ $("videojs.OffTextTrackMenuItem",t.Ab);$("videojs.CaptionSettingsMenuItem",t.tb);t.O.prototype.createItems=t.O.prototype.Ia;t.Q.prototype.createItems=t.Q.prototype.Ia;t.Xa.prototype.createItems=t.Xa.prototype.Ia;$("videojs.SubtitlesButton",t.ab);$("videojs.CaptionsButton",t.na);$("videojs.ChaptersButton",t.Xa);$("videojs.MediaTechController",t.j);t.j.withSourceHandlers=t.j.gc;t.j.prototype.featuresVolumeControl=t.j.prototype.uf;t.j.prototype.featuresFullscreenResize=t.j.prototype.qf;
192
+ t.j.prototype.featuresPlaybackRate=t.j.prototype.rf;t.j.prototype.featuresProgressEvents=t.j.prototype.sf;t.j.prototype.featuresTimeupdateEvents=t.j.prototype.tf;t.j.prototype.setPoster=t.j.prototype.fd;t.j.prototype.textTracks=t.j.prototype.textTracks;t.j.prototype.remoteTextTracks=t.j.prototype.Z;t.j.prototype.addTextTrack=t.j.prototype.addTextTrack;t.j.prototype.addRemoteTextTrack=t.j.prototype.ia;t.j.prototype.removeRemoteTextTrack=t.j.prototype.Ba;$("videojs.Html5",t.f);t.f.Events=t.f.yb;
193
+ t.f.isSupported=t.f.isSupported;t.f.canPlaySource=t.f.zc;t.f.patchCanPlayType=t.f.Xc;t.f.unpatchCanPlayType=t.f.bf;t.f.prototype.setCurrentTime=t.f.prototype.bc;t.f.prototype.setVolume=t.f.prototype.Se;t.f.prototype.setMuted=t.f.prototype.Oe;t.f.prototype.setPreload=t.f.prototype.Qe;t.f.prototype.setAutoplay=t.f.prototype.Le;t.f.prototype.setLoop=t.f.prototype.Ne;t.f.prototype.enterFullScreen=t.f.prototype.Ic;t.f.prototype.exitFullScreen=t.f.prototype.Xd;t.f.prototype.playbackRate=t.f.prototype.playbackRate;
194
+ t.f.prototype.setPlaybackRate=t.f.prototype.Pe;t.f.registerSourceHandler=t.f.Ra;t.f.selectSourceHandler=t.f.pb;t.f.prototype.setSource=t.f.prototype.Sa;t.f.prototype.disposeSourceHandler=t.f.prototype.Ka;t.f.prototype.textTracks=t.f.prototype.textTracks;t.f.prototype.remoteTextTracks=t.f.prototype.Z;t.f.prototype.addTextTrack=t.f.prototype.addTextTrack;t.f.prototype.addRemoteTextTrack=t.f.prototype.ia;t.f.prototype.removeRemoteTextTrack=t.f.prototype.Ba;$("videojs.Flash",t.g);t.g.isSupported=t.g.isSupported;
195
+ t.g.canPlaySource=t.g.zc;t.g.onReady=t.g.onReady;t.g.embed=t.g.Hc;t.g.version=t.g.version;t.g.prototype.setSource=t.g.prototype.Sa;t.g.registerSourceHandler=t.g.Ra;t.g.selectSourceHandler=t.g.pb;t.g.prototype.setSource=t.g.prototype.Sa;t.g.prototype.disposeSourceHandler=t.g.prototype.Ka;$("videojs.TextTrack",t.t);$("videojs.TextTrackList",t.F);$("videojs.TextTrackCueList",t.W);$("videojs.TextTrackSettings",t.sc);t.t.prototype.id=t.t.prototype.id;t.t.prototype.label=t.t.prototype.label;
196
+ t.t.prototype.kind=t.t.prototype.Wb;t.t.prototype.mode=t.t.prototype.mode;t.t.prototype.cues=t.t.prototype.Dc;t.t.prototype.activeCues=t.t.prototype.nf;t.t.prototype.addCue=t.t.prototype.vc;t.t.prototype.removeCue=t.t.prototype.bd;t.F.prototype.getTrackById=t.F.prototype.de;t.W.prototype.getCueById=t.F.prototype.be;$("videojs.CaptionsTrack",t.gf);$("videojs.SubtitlesTrack",t.mf);$("videojs.ChaptersTrack",t.hf);$("videojs.autoSetup",t.xc);$("videojs.plugin",t.Fe);$("videojs.createTimeRange",t.Lb);
197
+ $("videojs.util",t.$);t.$.mergeOptions=t.$.ya;t.addLanguage=t.Jd;})();
198
+
199
+ /* vtt.js - v0.11.11 (https://github.com/mozilla/vtt.js) built on 22-01-2015 */
200
+ !function(a){var b=a.vttjs={},c=b.VTTCue,d=b.VTTRegion,e=a.VTTCue,f=a.VTTRegion;b.shim=function(){b.VTTCue=c,b.VTTRegion=d},b.restore=function(){b.VTTCue=e,b.VTTRegion=f}}(this),function(a,b){function c(a){if("string"!=typeof a)return!1;var b=h[a.toLowerCase()];return b?a.toLowerCase():!1}function d(a){if("string"!=typeof a)return!1;var b=i[a.toLowerCase()];return b?a.toLowerCase():!1}function e(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)a[d]=c[d]}return a}function f(a,b,f){var h=this,i=/MSIE\s8\.0/.test(navigator.userAgent),j={};i?h=document.createElement("custom"):j.enumerable=!0,h.hasBeenReset=!1;var k="",l=!1,m=a,n=b,o=f,p=null,q="",r=!0,s="auto",t="start",u=50,v="middle",w=50,x="middle";return Object.defineProperty(h,"id",e({},j,{get:function(){return k},set:function(a){k=""+a}})),Object.defineProperty(h,"pauseOnExit",e({},j,{get:function(){return l},set:function(a){l=!!a}})),Object.defineProperty(h,"startTime",e({},j,{get:function(){return m},set:function(a){if("number"!=typeof a)throw new TypeError("Start time must be set to a number.");m=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"endTime",e({},j,{get:function(){return n},set:function(a){if("number"!=typeof a)throw new TypeError("End time must be set to a number.");n=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"text",e({},j,{get:function(){return o},set:function(a){o=""+a,this.hasBeenReset=!0}})),Object.defineProperty(h,"region",e({},j,{get:function(){return p},set:function(a){p=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"vertical",e({},j,{get:function(){return q},set:function(a){var b=c(a);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");q=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"snapToLines",e({},j,{get:function(){return r},set:function(a){r=!!a,this.hasBeenReset=!0}})),Object.defineProperty(h,"line",e({},j,{get:function(){return s},set:function(a){if("number"!=typeof a&&a!==g)throw new SyntaxError("An invalid number or illegal string was specified.");s=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"lineAlign",e({},j,{get:function(){return t},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");t=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"position",e({},j,{get:function(){return u},set:function(a){if(0>a||a>100)throw new Error("Position must be between 0 and 100.");u=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"positionAlign",e({},j,{get:function(){return v},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");v=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"size",e({},j,{get:function(){return w},set:function(a){if(0>a||a>100)throw new Error("Size must be between 0 and 100.");w=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"align",e({},j,{get:function(){return x},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");x=b,this.hasBeenReset=!0}})),h.displayState=void 0,i?h:void 0}var g="auto",h={"":!0,lr:!0,rl:!0},i={start:!0,middle:!0,end:!0,left:!0,right:!0};f.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},a.VTTCue=a.VTTCue||f,b.VTTCue=f}(this,this.vttjs||{}),function(a,b){function c(a){if("string"!=typeof a)return!1;var b=f[a.toLowerCase()];return b?a.toLowerCase():!1}function d(a){return"number"==typeof a&&a>=0&&100>=a}function e(){var a=100,b=3,e=0,f=100,g=0,h=100,i="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return a},set:function(b){if(!d(b))throw new Error("Width must be between 0 and 100.");a=b}},lines:{enumerable:!0,get:function(){return b},set:function(a){if("number"!=typeof a)throw new TypeError("Lines must be set to a number.");b=a}},regionAnchorY:{enumerable:!0,get:function(){return f},set:function(a){if(!d(a))throw new Error("RegionAnchorX must be between 0 and 100.");f=a}},regionAnchorX:{enumerable:!0,get:function(){return e},set:function(a){if(!d(a))throw new Error("RegionAnchorY must be between 0 and 100.");e=a}},viewportAnchorY:{enumerable:!0,get:function(){return h},set:function(a){if(!d(a))throw new Error("ViewportAnchorY must be between 0 and 100.");h=a}},viewportAnchorX:{enumerable:!0,get:function(){return g},set:function(a){if(!d(a))throw new Error("ViewportAnchorX must be between 0 and 100.");g=a}},scroll:{enumerable:!0,get:function(){return i},set:function(a){var b=c(a);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");i=b}}})}var f={"":!0,up:!0};a.VTTRegion=a.VTTRegion||e,b.VTTRegion=e}(this,this.vttjs||{}),function(a){function b(a,b){this.name="ParsingError",this.code=a.code,this.message=b||a.message}function c(a){function b(a,b,c,d){return 3600*(0|a)+60*(0|b)+(0|c)+(0|d)/1e3}var c=a.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return c?c[3]?b(c[1],c[2],c[3].replace(":",""),c[4]):c[1]>59?b(c[1],c[2],0,c[4]):b(0,c[1],c[2],c[4]):null}function d(){this.values=o(null)}function e(a,b,c,d){var e=d?a.split(d):[a];for(var f in e)if("string"==typeof e[f]){var g=e[f].split(c);if(2===g.length){var h=g[0],i=g[1];b(h,i)}}}function f(a,f,g){function h(){var d=c(a);if(null===d)throw new b(b.Errors.BadTimeStamp,"Malformed timestamp: "+k);return a=a.replace(/^[^\sa-zA-Z-]+/,""),d}function i(a,b){var c=new d;e(a,function(a,b){switch(a){case"region":for(var d=g.length-1;d>=0;d--)if(g[d].id===b){c.set(a,g[d].region);break}break;case"vertical":c.alt(a,b,["rl","lr"]);break;case"line":var e=b.split(","),f=e[0];c.integer(a,f),c.percent(a,f)?c.set("snapToLines",!1):null,c.alt(a,f,["auto"]),2===e.length&&c.alt("lineAlign",e[1],["start","middle","end"]);break;case"position":e=b.split(","),c.percent(a,e[0]),2===e.length&&c.alt("positionAlign",e[1],["start","middle","end"]);break;case"size":c.percent(a,b);break;case"align":c.alt(a,b,["start","middle","end","left","right"])}},/:/,/\s/),b.region=c.get("region",null),b.vertical=c.get("vertical",""),b.line=c.get("line","auto"),b.lineAlign=c.get("lineAlign","start"),b.snapToLines=c.get("snapToLines",!0),b.size=c.get("size",100),b.align=c.get("align","middle"),b.position=c.get("position",{start:0,left:0,middle:50,end:100,right:100},b.align),b.positionAlign=c.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},b.align)}function j(){a=a.replace(/^\s+/,"")}var k=a;if(j(),f.startTime=h(),j(),"-->"!==a.substr(0,3))throw new b(b.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+k);a=a.substr(3),j(),f.endTime=h(),j(),i(a,f)}function g(a,b){function d(){function a(a){return b=b.substr(a.length),a}if(!b)return null;var c=b.match(/^([^<]*)(<[^>]+>?)?/);return a(c[1]?c[1]:c[2])}function e(a){return p[a]}function f(a){for(;o=a.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)a=a.replace(o[0],e);return a}function g(a,b){return!s[b.localName]||s[b.localName]===a.localName}function h(b,c){var d=q[b];if(!d)return null;var e=a.document.createElement(d);e.localName=d;var f=r[b];return f&&c&&(e[f]=c.trim()),e}for(var i,j=a.document.createElement("div"),k=j,l=[];null!==(i=d());)if("<"!==i[0])k.appendChild(a.document.createTextNode(f(i)));else{if("/"===i[1]){l.length&&l[l.length-1]===i.substr(2).replace(">","")&&(l.pop(),k=k.parentNode);continue}var m,n=c(i.substr(1,i.length-2));if(n){m=a.document.createProcessingInstruction("timestamp",n),k.appendChild(m);continue}var o=i.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!o)continue;if(m=h(o[1],o[3]),!m)continue;if(!g(k,m))continue;o[2]&&(m.className=o[2].substr(1).replace("."," ")),l.push(o[1]),k.appendChild(m),k=m}return j}function h(a){function b(a,b){for(var c=b.childNodes.length-1;c>=0;c--)a.push(b.childNodes[c])}function c(a){if(!a||!a.length)return null;var d=a.pop(),e=d.textContent||d.innerText;if(e){var f=e.match(/^.*(\n|\r)/);return f?(a.length=0,f[0]):e}return"ruby"===d.tagName?c(a):d.childNodes?(b(a,d),c(a)):void 0}var d,e=[],f="";if(!a||!a.childNodes)return"ltr";for(b(e,a);f=c(e);)for(var g=0;g<f.length;g++){d=f.charCodeAt(g);for(var h=0;h<t.length;h++)if(t[h]===d)return"rtl"}return"ltr"}function i(a){if("number"==typeof a.line&&(a.snapToLines||a.line>=0&&a.line<=100))return a.line;if(!a.track||!a.track.textTrackList||!a.track.textTrackList.mediaElement)return-1;for(var b=a.track,c=b.textTrackList,d=0,e=0;e<c.length&&c[e]!==b;e++)"showing"===c[e].mode&&d++;return-1*++d}function j(){}function k(a,b,c){var d=/MSIE\s8\.0/.test(navigator.userAgent),e="rgba(255, 255, 255, 1)",f="rgba(0, 0, 0, 0.8)";d&&(e="rgb(255, 255, 255)",f="rgb(0, 0, 0)"),j.call(this),this.cue=b,this.cueDiv=g(a,b.text);var i={color:e,backgroundColor:f,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};d||(i.writingMode=""===b.vertical?"horizontal-tb":"lr"===b.vertical?"vertical-lr":"vertical-rl",i.unicodeBidi="plaintext"),this.applyStyles(i,this.cueDiv),this.div=a.document.createElement("div"),i={textAlign:"middle"===b.align?"center":b.align,font:c.font,whiteSpace:"pre-line",position:"absolute"},d||(i.direction=h(this.cueDiv),i.writingMode=""===b.vertical?"horizontal-tb":"lr"===b.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(i),this.div.appendChild(this.cueDiv);var k=0;switch(b.positionAlign){case"start":k=b.position;break;case"middle":k=b.position-b.size/2;break;case"end":k=b.position-b.size}this.applyStyles(""===b.vertical?{left:this.formatStyle(k,"%"),width:this.formatStyle(b.size,"%")}:{top:this.formatStyle(k,"%"),height:this.formatStyle(b.size,"%")}),this.move=function(a){this.applyStyles({top:this.formatStyle(a.top,"px"),bottom:this.formatStyle(a.bottom,"px"),left:this.formatStyle(a.left,"px"),right:this.formatStyle(a.right,"px"),height:this.formatStyle(a.height,"px"),width:this.formatStyle(a.width,"px")})}}function l(a){var b,c,d,e,f=/MSIE\s8\.0/.test(navigator.userAgent);if(a.div){c=a.div.offsetHeight,d=a.div.offsetWidth,e=a.div.offsetTop;var g=(g=a.div.childNodes)&&(g=g[0])&&g.getClientRects&&g.getClientRects();a=a.div.getBoundingClientRect(),b=g?Math.max(g[0]&&g[0].height||0,a.height/g.length):0}this.left=a.left,this.right=a.right,this.top=a.top||e,this.height=a.height||c,this.bottom=a.bottom||e+(a.height||c),this.width=a.width||d,this.lineHeight=void 0!==b?b:a.lineHeight,f&&!this.lineHeight&&(this.lineHeight=13)}function m(a,b,c,d){function e(a,b){for(var e,f=new l(a),g=1,h=0;h<b.length;h++){for(;a.overlapsOppositeAxis(c,b[h])||a.within(c)&&a.overlapsAny(d);)a.move(b[h]);if(a.within(c))return a;var i=a.intersectPercentage(c);g>i&&(e=new l(a),g=i),a=new l(f)}return e||f}var f=new l(b),g=b.cue,h=i(g),j=[];if(g.snapToLines){var k;switch(g.vertical){case"":j=["+y","-y"],k="height";break;case"rl":j=["+x","-x"],k="width";break;case"lr":j=["-x","+x"],k="width"}var m=f.lineHeight,n=m*Math.round(h),o=c[k]+m,p=j[0];Math.abs(n)>o&&(n=0>n?-1:1,n*=Math.ceil(o/m)*m),0>h&&(n+=""===g.vertical?c.height:c.width,j=j.reverse()),f.move(p,n)}else{var q=f.lineHeight/c.height*100;switch(g.lineAlign){case"middle":h-=q/2;break;case"end":h-=q}switch(g.vertical){case"":b.applyStyles({top:b.formatStyle(h,"%")});break;case"rl":b.applyStyles({left:b.formatStyle(h,"%")});break;case"lr":b.applyStyles({right:b.formatStyle(h,"%")})}j=["+y","-x","+x","-y"],f=new l(b)}var r=e(f,j);b.move(r.toCSSCompatValues(c))}function n(){}var o=Object.create||function(){function a(){}return function(b){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return a.prototype=b,new a}}();b.prototype=o(Error.prototype),b.prototype.constructor=b,b.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},d.prototype={set:function(a,b){this.get(a)||""===b||(this.values[a]=b)},get:function(a,b,c){return c?this.has(a)?this.values[a]:b[c]:this.has(a)?this.values[a]:b},has:function(a){return a in this.values},alt:function(a,b,c){for(var d=0;d<c.length;++d)if(b===c[d]){this.set(a,b);break}},integer:function(a,b){/^-?\d+$/.test(b)&&this.set(a,parseInt(b,10))},percent:function(a,b){var c;return(c=b.match(/^([\d]{1,3})(\.[\d]*)?%$/))&&(b=parseFloat(b),b>=0&&100>=b)?(this.set(a,b),!0):!1}};var p={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},q={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},r={v:"title",lang:"lang"},s={rt:"ruby"},t=[1470,1472,1475,1478,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1520,1521,1522,1523,1524,1544,1547,1549,1563,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1645,1646,1647,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1765,1766,1774,1775,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1807,1808,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1969,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2e3,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2036,2037,2042,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2074,2084,2088,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2142,2208,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,8207,64285,64287,64288,64289,64290,64291,64292,64293,64294,64295,64296,64298,64299,64300,64301,64302,64303,64304,64305,64306,64307,64308,64309,64310,64312,64313,64314,64315,64316,64318,64320,64321,64323,64324,64326,64327,64328,64329,64330,64331,64332,64333,64334,64335,64336,64337,64338,64339,64340,64341,64342,64343,64344,64345,64346,64347,64348,64349,64350,64351,64352,64353,64354,64355,64356,64357,64358,64359,64360,64361,64362,64363,64364,64365,64366,64367,64368,64369,64370,64371,64372,64373,64374,64375,64376,64377,64378,64379,64380,64381,64382,64383,64384,64385,64386,64387,64388,64389,64390,64391,64392,64393,64394,64395,64396,64397,64398,64399,64400,64401,64402,64403,64404,64405,64406,64407,64408,64409,64410,64411,64412,64413,64414,64415,64416,64417,64418,64419,64420,64421,64422,64423,64424,64425,64426,64427,64428,64429,64430,64431,64432,64433,64434,64435,64436,64437,64438,64439,64440,64441,64442,64443,64444,64445,64446,64447,64448,64449,64467,64468,64469,64470,64471,64472,64473,64474,64475,64476,64477,64478,64479,64480,64481,64482,64483,64484,64485,64486,64487,64488,64489,64490,64491,64492,64493,64494,64495,64496,64497,64498,64499,64500,64501,64502,64503,64504,64505,64506,64507,64508,64509,64510,64511,64512,64513,64514,64515,64516,64517,64518,64519,64520,64521,64522,64523,64524,64525,64526,64527,64528,64529,64530,64531,64532,64533,64534,64535,64536,64537,64538,64539,64540,64541,64542,64543,64544,64545,64546,64547,64548,64549,64550,64551,64552,64553,64554,64555,64556,64557,64558,64559,64560,64561,64562,64563,64564,64565,64566,64567,64568,64569,64570,64571,64572,64573,64574,64575,64576,64577,64578,64579,64580,64581,64582,64583,64584,64585,64586,64587,64588,64589,64590,64591,64592,64593,64594,64595,64596,64597,64598,64599,64600,64601,64602,64603,64604,64605,64606,64607,64608,64609,64610,64611,64612,64613,64614,64615,64616,64617,64618,64619,64620,64621,64622,64623,64624,64625,64626,64627,64628,64629,64630,64631,64632,64633,64634,64635,64636,64637,64638,64639,64640,64641,64642,64643,64644,64645,64646,64647,64648,64649,64650,64651,64652,64653,64654,64655,64656,64657,64658,64659,64660,64661,64662,64663,64664,64665,64666,64667,64668,64669,64670,64671,64672,64673,64674,64675,64676,64677,64678,64679,64680,64681,64682,64683,64684,64685,64686,64687,64688,64689,64690,64691,64692,64693,64694,64695,64696,64697,64698,64699,64700,64701,64702,64703,64704,64705,64706,64707,64708,64709,64710,64711,64712,64713,64714,64715,64716,64717,64718,64719,64720,64721,64722,64723,64724,64725,64726,64727,64728,64729,64730,64731,64732,64733,64734,64735,64736,64737,64738,64739,64740,64741,64742,64743,64744,64745,64746,64747,64748,64749,64750,64751,64752,64753,64754,64755,64756,64757,64758,64759,64760,64761,64762,64763,64764,64765,64766,64767,64768,64769,64770,64771,64772,64773,64774,64775,64776,64777,64778,64779,64780,64781,64782,64783,64784,64785,64786,64787,64788,64789,64790,64791,64792,64793,64794,64795,64796,64797,64798,64799,64800,64801,64802,64803,64804,64805,64806,64807,64808,64809,64810,64811,64812,64813,64814,64815,64816,64817,64818,64819,64820,64821,64822,64823,64824,64825,64826,64827,64828,64829,64848,64849,64850,64851,64852,64853,64854,64855,64856,64857,64858,64859,64860,64861,64862,64863,64864,64865,64866,64867,64868,64869,64870,64871,64872,64873,64874,64875,64876,64877,64878,64879,64880,64881,64882,64883,64884,64885,64886,64887,64888,64889,64890,64891,64892,64893,64894,64895,64896,64897,64898,64899,64900,64901,64902,64903,64904,64905,64906,64907,64908,64909,64910,64911,64914,64915,64916,64917,64918,64919,64920,64921,64922,64923,64924,64925,64926,64927,64928,64929,64930,64931,64932,64933,64934,64935,64936,64937,64938,64939,64940,64941,64942,64943,64944,64945,64946,64947,64948,64949,64950,64951,64952,64953,64954,64955,64956,64957,64958,64959,64960,64961,64962,64963,64964,64965,64966,64967,65008,65009,65010,65011,65012,65013,65014,65015,65016,65017,65018,65019,65020,65136,65137,65138,65139,65140,65142,65143,65144,65145,65146,65147,65148,65149,65150,65151,65152,65153,65154,65155,65156,65157,65158,65159,65160,65161,65162,65163,65164,65165,65166,65167,65168,65169,65170,65171,65172,65173,65174,65175,65176,65177,65178,65179,65180,65181,65182,65183,65184,65185,65186,65187,65188,65189,65190,65191,65192,65193,65194,65195,65196,65197,65198,65199,65200,65201,65202,65203,65204,65205,65206,65207,65208,65209,65210,65211,65212,65213,65214,65215,65216,65217,65218,65219,65220,65221,65222,65223,65224,65225,65226,65227,65228,65229,65230,65231,65232,65233,65234,65235,65236,65237,65238,65239,65240,65241,65242,65243,65244,65245,65246,65247,65248,65249,65250,65251,65252,65253,65254,65255,65256,65257,65258,65259,65260,65261,65262,65263,65264,65265,65266,65267,65268,65269,65270,65271,65272,65273,65274,65275,65276,67584,67585,67586,67587,67588,67589,67592,67594,67595,67596,67597,67598,67599,67600,67601,67602,67603,67604,67605,67606,67607,67608,67609,67610,67611,67612,67613,67614,67615,67616,67617,67618,67619,67620,67621,67622,67623,67624,67625,67626,67627,67628,67629,67630,67631,67632,67633,67634,67635,67636,67637,67639,67640,67644,67647,67648,67649,67650,67651,67652,67653,67654,67655,67656,67657,67658,67659,67660,67661,67662,67663,67664,67665,67666,67667,67668,67669,67671,67672,67673,67674,67675,67676,67677,67678,67679,67840,67841,67842,67843,67844,67845,67846,67847,67848,67849,67850,67851,67852,67853,67854,67855,67856,67857,67858,67859,67860,67861,67862,67863,67864,67865,67866,67867,67872,67873,67874,67875,67876,67877,67878,67879,67880,67881,67882,67883,67884,67885,67886,67887,67888,67889,67890,67891,67892,67893,67894,67895,67896,67897,67903,67968,67969,67970,67971,67972,67973,67974,67975,67976,67977,67978,67979,67980,67981,67982,67983,67984,67985,67986,67987,67988,67989,67990,67991,67992,67993,67994,67995,67996,67997,67998,67999,68e3,68001,68002,68003,68004,68005,68006,68007,68008,68009,68010,68011,68012,68013,68014,68015,68016,68017,68018,68019,68020,68021,68022,68023,68030,68031,68096,68112,68113,68114,68115,68117,68118,68119,68121,68122,68123,68124,68125,68126,68127,68128,68129,68130,68131,68132,68133,68134,68135,68136,68137,68138,68139,68140,68141,68142,68143,68144,68145,68146,68147,68160,68161,68162,68163,68164,68165,68166,68167,68176,68177,68178,68179,68180,68181,68182,68183,68184,68192,68193,68194,68195,68196,68197,68198,68199,68200,68201,68202,68203,68204,68205,68206,68207,68208,68209,68210,68211,68212,68213,68214,68215,68216,68217,68218,68219,68220,68221,68222,68223,68352,68353,68354,68355,68356,68357,68358,68359,68360,68361,68362,68363,68364,68365,68366,68367,68368,68369,68370,68371,68372,68373,68374,68375,68376,68377,68378,68379,68380,68381,68382,68383,68384,68385,68386,68387,68388,68389,68390,68391,68392,68393,68394,68395,68396,68397,68398,68399,68400,68401,68402,68403,68404,68405,68416,68417,68418,68419,68420,68421,68422,68423,68424,68425,68426,68427,68428,68429,68430,68431,68432,68433,68434,68435,68436,68437,68440,68441,68442,68443,68444,68445,68446,68447,68448,68449,68450,68451,68452,68453,68454,68455,68456,68457,68458,68459,68460,68461,68462,68463,68464,68465,68466,68472,68473,68474,68475,68476,68477,68478,68479,68608,68609,68610,68611,68612,68613,68614,68615,68616,68617,68618,68619,68620,68621,68622,68623,68624,68625,68626,68627,68628,68629,68630,68631,68632,68633,68634,68635,68636,68637,68638,68639,68640,68641,68642,68643,68644,68645,68646,68647,68648,68649,68650,68651,68652,68653,68654,68655,68656,68657,68658,68659,68660,68661,68662,68663,68664,68665,68666,68667,68668,68669,68670,68671,68672,68673,68674,68675,68676,68677,68678,68679,68680,126464,126465,126466,126467,126469,126470,126471,126472,126473,126474,126475,126476,126477,126478,126479,126480,126481,126482,126483,126484,126485,126486,126487,126488,126489,126490,126491,126492,126493,126494,126495,126497,126498,126500,126503,126505,126506,126507,126508,126509,126510,126511,126512,126513,126514,126516,126517,126518,126519,126521,126523,126530,126535,126537,126539,126541,126542,126543,126545,126546,126548,126551,126553,126555,126557,126559,126561,126562,126564,126567,126568,126569,126570,126572,126573,126574,126575,126576,126577,126578,126580,126581,126582,126583,126585,126586,126587,126588,126590,126592,126593,126594,126595,126596,126597,126598,126599,126600,126601,126603,126604,126605,126606,126607,126608,126609,126610,126611,126612,126613,126614,126615,126616,126617,126618,126619,126625,126626,126627,126629,126630,126631,126632,126633,126635,126636,126637,126638,126639,126640,126641,126642,126643,126644,126645,126646,126647,126648,126649,126650,126651,1114109];j.prototype.applyStyles=function(a,b){b=b||this.div;for(var c in a)a.hasOwnProperty(c)&&(b.style[c]=a[c])},j.prototype.formatStyle=function(a,b){return 0===a?0:a+b},k.prototype=o(j.prototype),k.prototype.constructor=k,l.prototype.move=function(a,b){switch(b=void 0!==b?b:this.lineHeight,a){case"+x":this.left+=b,this.right+=b;break;case"-x":this.left-=b,this.right-=b;break;case"+y":this.top+=b,this.bottom+=b;break;case"-y":this.top-=b,this.bottom-=b}},l.prototype.overlaps=function(a){return this.left<a.right&&this.right>a.left&&this.top<a.bottom&&this.bottom>a.top},l.prototype.overlapsAny=function(a){for(var b=0;b<a.length;b++)if(this.overlaps(a[b]))return!0;return!1},l.prototype.within=function(a){return this.top>=a.top&&this.bottom<=a.bottom&&this.left>=a.left&&this.right<=a.right},l.prototype.overlapsOppositeAxis=function(a,b){switch(b){case"+x":return this.left<a.left;case"-x":return this.right>a.right;case"+y":return this.top<a.top;case"-y":return this.bottom>a.bottom}},l.prototype.intersectPercentage=function(a){var b=Math.max(0,Math.min(this.right,a.right)-Math.max(this.left,a.left)),c=Math.max(0,Math.min(this.bottom,a.bottom)-Math.max(this.top,a.top)),d=b*c;return d/(this.height*this.width)},l.prototype.toCSSCompatValues=function(a){return{top:this.top-a.top,bottom:a.bottom-this.bottom,left:this.left-a.left,right:a.right-this.right,height:this.height,width:this.width}},l.getSimpleBoxPosition=function(a){var b=a.div?a.div.offsetHeight:a.tagName?a.offsetHeight:0,c=a.div?a.div.offsetWidth:a.tagName?a.offsetWidth:0,d=a.div?a.div.offsetTop:a.tagName?a.offsetTop:0;a=a.div?a.div.getBoundingClientRect():a.tagName?a.getBoundingClientRect():a;var e={left:a.left,right:a.right,top:a.top||d,height:a.height||b,bottom:a.bottom||d+(a.height||b),width:a.width||c};return e},n.StringDecoder=function(){return{decode:function(a){if(!a)return"";if("string"!=typeof a)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(a))}}},n.convertCueToDOMTree=function(a,b){return a&&b?g(a,b):null};var u=.05,v="sans-serif",w="1.5%";n.processCues=function(a,b,c){function d(a){for(var b=0;b<a.length;b++)if(a[b].hasBeenReset||!a[b].displayState)return!0;return!1}if(!a||!b||!c)return null;for(;c.firstChild;)c.removeChild(c.firstChild);var e=a.document.createElement("div");if(e.style.position="absolute",e.style.left="0",e.style.right="0",e.style.top="0",e.style.bottom="0",e.style.margin=w,c.appendChild(e),d(b)){var f=[],g=l.getSimpleBoxPosition(e),h=Math.round(g.height*u*100)/100,i={font:h+"px "+v};!function(){for(var c,d,h=0;h<b.length;h++)d=b[h],c=new k(a,d,i),e.appendChild(c.div),m(a,c,g,f),d.displayState=c.div,f.push(l.getSimpleBoxPosition(c))}()}else for(var j=0;j<b.length;j++)e.appendChild(b[j].displayState)},n.Parser=function(a,b,c){c||(c=b,b={}),b||(b={}),this.window=a,this.vttjs=b,this.state="INITIAL",this.buffer="",this.decoder=c||new TextDecoder("utf8"),this.regionList=[]},n.Parser.prototype={reportOrThrowError:function(a){if(!(a instanceof b))throw a;this.onparsingerror&&this.onparsingerror(a)},parse:function(a){function c(){for(var a=i.buffer,b=0;b<a.length&&"\r"!==a[b]&&"\n"!==a[b];)++b;var c=a.substr(0,b);return"\r"===a[b]&&++b,"\n"===a[b]&&++b,i.buffer=a.substr(b),c}function g(a){var b=new d;if(e(a,function(a,c){switch(a){case"id":b.set(a,c);break;case"width":b.percent(a,c);break;case"lines":b.integer(a,c);break;case"regionanchor":case"viewportanchor":var e=c.split(",");if(2!==e.length)break;var f=new d;if(f.percent("x",e[0]),f.percent("y",e[1]),!f.has("x")||!f.has("y"))break;b.set(a+"X",f.get("x")),b.set(a+"Y",f.get("y"));break;case"scroll":b.alt(a,c,["up"])}},/=/,/\s/),b.has("id")){var c=new(i.vttjs.VTTRegion||i.window.VTTRegion);c.width=b.get("width",100),c.lines=b.get("lines",3),c.regionAnchorX=b.get("regionanchorX",0),c.regionAnchorY=b.get("regionanchorY",100),c.viewportAnchorX=b.get("viewportanchorX",0),c.viewportAnchorY=b.get("viewportanchorY",100),c.scroll=b.get("scroll",""),i.onregion&&i.onregion(c),i.regionList.push({id:b.get("id"),region:c})}}function h(a){e(a,function(a,b){switch(a){case"Region":g(b)}},/:/)}var i=this;a&&(i.buffer+=i.decoder.decode(a,{stream:!0}));try{var j;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;j=c();var k=j.match(/^WEBVTT([ \t].*)?$/);if(!k||!k[0])throw new b(b.Errors.BadSignature);i.state="HEADER"}for(var l=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(l?l=!1:j=c(),i.state){case"HEADER":/:/.test(j)?h(j):j||(i.state="ID");continue;case"NOTE":j||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(j)){i.state="NOTE";break}if(!j)continue;if(i.cue=new(i.vttjs.VTTCue||i.window.VTTCue)(0,0,""),i.state="CUE",-1===j.indexOf("-->")){i.cue.id=j;continue}case"CUE":try{f(j,i.cue,i.regionList)}catch(m){i.reportOrThrowError(m),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var n=-1!==j.indexOf("-->");if(!j||n&&(l=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=j;continue;case"BADCUE":j||(i.state="ID");continue}}}catch(m){i.reportOrThrowError(m),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var a=this;try{if(a.buffer+=a.decoder.decode(),(a.cue||"HEADER"===a.state)&&(a.buffer+="\n\n",a.parse()),"INITIAL"===a.state)throw new b(b.Errors.BadSignature)}catch(c){a.reportOrThrowError(c)}return a.onflush&&a.onflush(),this}},a.WebVTT=n}(this,this.vttjs||{});