Video Embed & Thumbnail Generator - Version 4.6.6

Version Description

  • May 21, 2016 =
  • Added support for Yoast's custom Universal Google Analytics variable name.
  • Modified resizing method for WordPress Default player container again.
  • Updated WordPress Default player's fullscreen resolution calculation to match Video.js change made in v4.6.3
  • Added filter hook to modify FFMPEG-generated thumbnail options.
  • Increased WordPress Default play button z-index.
Download this release

Release Info

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

Code changes from version 4.6.5 to 4.6.6

css/kgvid_styles.css CHANGED
@@ -220,6 +220,7 @@ img.kgvid_ios_novideo {
220
  .kgvid_share_icons input[type="text"] {
221
  font-family: sans-serif !important;
222
  font-size: 10pt !important;
 
223
  color: white !important;
224
  width: 50% !important;
225
  background: #ABACA8 !important;
@@ -472,6 +473,10 @@ ul li.vjs-menu-title.vjs-res-menu-title:hover {
472
  clip: auto;
473
  }
474
 
 
 
 
 
475
  /* mep-feature-sourcechooser plugin styles */
476
 
477
  .kgvid_wrapper .mejs-controls div.mejs-sourcechooser-button button {
220
  .kgvid_share_icons input[type="text"] {
221
  font-family: sans-serif !important;
222
  font-size: 10pt !important;
223
+ line-height: 1.2 !important;
224
  color: white !important;
225
  width: 50% !important;
226
  background: #ABACA8 !important;
473
  clip: auto;
474
  }
475
 
476
+ .kgvid_wrapper .mejs-overlay-button {
477
+ z-index: 2;
478
+ }
479
+
480
  /* mep-feature-sourcechooser plugin styles */
481
 
482
  .kgvid_wrapper .mejs-controls div.mejs-sourcechooser-button button {
js/kgvid_video_embed.js CHANGED
@@ -485,18 +485,7 @@ function kgvid_setup_video(id) {
485
  var mejs_player = eval('mejs.players.'+mejs_id);
486
 
487
  if ( mejs_player.isFullScreen && mejs_player.hasOwnProperty('availableRes') ) {
488
- var resolutions = mejs_player.availableRes;
489
-
490
- var resNumbers = new Array();
491
- jQuery.each(resolutions, function(key, value){
492
- if ( typeof key !== 'undefined' && !isNaN(parseInt(key)) ) {
493
- resNumbers.push(parseInt(key));
494
- }
495
- });
496
- var highest_res = Math.max.apply( Math, resNumbers );
497
-
498
- mejs_player.changeRes(highest_res+'p');
499
-
500
  }
501
  });
502
 
@@ -650,7 +639,10 @@ function kgvid_resize_video(id) {
650
  }
651
 
652
  if ( video_vars.player_type == "WordPressDefault" ) {
653
- if ( typeof mejs !== 'undefined' ) { player = eval('mejs.players.'+jQuery('#kgvid_'+id+'_wrapper div.wp-video-shortcode').attr('id')); }
 
 
 
654
  }
655
 
656
  if ( ( video_vars.player_type == "Video.js" && eval('videojs.getPlayers()["video_'+id+'"]') != null )
@@ -784,6 +776,7 @@ function kgvid_video_counter(id, event) {
784
  jQuery('#video_'+id+'_div').data("played", "played");
785
  }
786
  if (typeof ga != "undefined") { ga("send", "event", "Videos", kgvidL10n_frontend.playstart, title); }
 
787
  else if (typeof _gaq != "undefined") { _gaq.push(["_trackEvent", "Videos", kgvidL10n_frontend.playstart, title]); }
788
 
789
  }
@@ -795,6 +788,7 @@ function kgvid_video_counter(id, event) {
795
  }
796
 
797
  if (typeof ga != "undefined") { ga("send", "event", "Videos", event+"%", title); }
 
798
  else if (typeof _gaq != "undefined") { _gaq.push(["_trackEvent", "Videos", event+"%", title]); }
799
 
800
  }
@@ -806,6 +800,7 @@ function kgvid_video_counter(id, event) {
806
  }
807
 
808
  if (typeof ga != "undefined") { ga("send", "event", "Videos", kgvidL10n_frontend.completeview, title); }
 
809
  else if (typeof _gaq != 'undefined') { _gaq.push(['_trackEvent', 'Videos', kgvidL10n_frontend.completeview, title]); }
810
 
811
  }
485
  var mejs_player = eval('mejs.players.'+mejs_id);
486
 
487
  if ( mejs_player.isFullScreen && mejs_player.hasOwnProperty('availableRes') ) {
488
+ kgvid_resize_video(id);
 
 
 
 
 
 
 
 
 
 
 
489
  }
490
  });
491
 
639
  }
640
 
641
  if ( video_vars.player_type == "WordPressDefault" ) {
642
+ if ( typeof mejs !== 'undefined' ) {
643
+ jQuery('#kgvid_'+id+'_wrapper').find('.wp-video').attr('style', 'width:'+set_width+'px;');
644
+ player = eval('mejs.players.'+jQuery('#kgvid_'+id+'_wrapper div.wp-video-shortcode').attr('id'));
645
+ }
646
  }
647
 
648
  if ( ( video_vars.player_type == "Video.js" && eval('videojs.getPlayers()["video_'+id+'"]') != null )
776
  jQuery('#video_'+id+'_div').data("played", "played");
777
  }
778
  if (typeof ga != "undefined") { ga("send", "event", "Videos", kgvidL10n_frontend.playstart, title); }
779
+ else if (typeof __gaTracker != "undefined") { __gaTracker("send", "event", "Videos", kgvidL10n_frontend.playstart, title); } // Yoast renamed ga function
780
  else if (typeof _gaq != "undefined") { _gaq.push(["_trackEvent", "Videos", kgvidL10n_frontend.playstart, title]); }
781
 
782
  }
788
  }
789
 
790
  if (typeof ga != "undefined") { ga("send", "event", "Videos", event+"%", title); }
791
+ else if (typeof __gaTracker != "undefined") { __gaTracker("send", "event", "Videos", event+"%", title); } // Yoast renamed ga function
792
  else if (typeof _gaq != "undefined") { _gaq.push(["_trackEvent", "Videos", event+"%", title]); }
793
 
794
  }
800
  }
801
 
802
  if (typeof ga != "undefined") { ga("send", "event", "Videos", kgvidL10n_frontend.completeview, title); }
803
+ if (typeof __gaTracker != "undefined") { __gaTracker("send", "event", "Videos", kgvidL10n_frontend.completeview, title); } // Yoast renamed ga function
804
  else if (typeof _gaq != 'undefined') { _gaq.push(['_trackEvent', 'Videos', kgvidL10n_frontend.completeview, title]); }
805
 
806
  }
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, video thumbnail, preview, poster, ffmpeg, libav, embed, oembed, mobile, webm, ogg, h.264, h264, vp9, responsive, mp4, jwplayer, resolution, analytics
5
  Requires at least: 4.4
6
  Tested up to: 4.5
7
- Stable tag: 4.6.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -236,6 +236,13 @@ Enter the username & password in the plugin settings "FFMPEG Settings" tab, or u
236
 
237
  == Changelog ==
238
 
 
 
 
 
 
 
 
239
  = 4.6.5 - May 13, 2016 =
240
  * Removed anonymous function to allow the plugin to run on PHP versions lower than 5.3.
241
  * Added 25%, 50%, and 75% video view tracking to the WordPress admin area.
@@ -243,7 +250,7 @@ Enter the username & password in the plugin settings "FFMPEG Settings" tab, or u
243
  * Modified resizing method for WordPress default player container.
244
  * Fixed temporary thumbnail display when switching resolutions in a Video.js player that is set to a different aspect ratio from the video file.
245
  * Disabled background page rendering request on autosaves and revisions.
246
- * Adjusted title bar CSS again and increased WordPress Default play button z-index.
247
 
248
  = 4.6.4 - May 5, 2016 =
249
  * Fixed bug that caused an error when feed pages were generated, possibly interrupting autosaves.
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, video thumbnail, ffmpeg
5
  Requires at least: 4.4
6
  Tested up to: 4.5
7
+ Stable tag: 4.6.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
236
 
237
  == Changelog ==
238
 
239
+ = 4.6.6 - May 21, 2016 =
240
+ * Added support for Yoast's custom Universal Google Analytics variable name.
241
+ * Modified resizing method for WordPress Default player container again.
242
+ * Updated WordPress Default player's fullscreen resolution calculation to match Video.js change made in v4.6.3
243
+ * Added filter hook to modify FFMPEG-generated thumbnail options.
244
+ * Increased WordPress Default play button z-index.
245
+
246
  = 4.6.5 - May 13, 2016 =
247
  * Removed anonymous function to allow the plugin to run on PHP versions lower than 5.3.
248
  * Added 25%, 50%, and 75% video view tracking to the WordPress admin area.
250
  * Modified resizing method for WordPress default player container.
251
  * Fixed temporary thumbnail display when switching resolutions in a Video.js player that is set to a different aspect ratio from the video file.
252
  * Disabled background page rendering request on autosaves and revisions.
253
+ * Adjusted title bar CSS again.
254
 
255
  = 4.6.4 - May 5, 2016 =
256
  * Fixed bug that caused an error when feed pages were generated, possibly interrupting autosaves.
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.6.5
7
  Author: Kyle Gilman
8
  Author URI: http://www.kylegilman.net/
9
  Text Domain: video-embed-thumbnail-generator
@@ -6706,6 +6706,8 @@ function kgvid_make_thumbs($postID, $movieurl, $numberofthumbs, $i, $iincreaser,
6706
 
6707
  $ffmpeg_options = '-y -ss '.round($movieoffset).' -i "'.$moviefilepath.'"'.$movie_info['rotate'].' -qscale 1 -vframes 1 -f mjpeg "'.$thumbnailfilename[$i].'"';
6708
 
 
 
6709
  $thumbnailurl = $thumbnailfilebase."_thumb".round($movieoffset).'.jpg';
6710
  $thumbnailurl = str_replace(" ", "_", $thumbnailurl);
6711
 
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.6.6
7
  Author: Kyle Gilman
8
  Author URI: http://www.kylegilman.net/
9
  Text Domain: video-embed-thumbnail-generator
6706
 
6707
  $ffmpeg_options = '-y -ss '.round($movieoffset).' -i "'.$moviefilepath.'"'.$movie_info['rotate'].' -qscale 1 -vframes 1 -f mjpeg "'.$thumbnailfilename[$i].'"';
6708
 
6709
+ $ffmpeg_options = apply_filters( 'kgvid_thumbnail_ffmpeg_options', $ffmpeg_options );
6710
+
6711
  $thumbnailurl = $thumbnailfilebase."_thumb".round($movieoffset).'.jpg';
6712
  $thumbnailurl = str_replace(" ", "_", $thumbnailurl);
6713