Video Embed & Thumbnail Generator - Version 3.0.3

Version Description

  • January 29, 2013 =
  • Fixed bug that added a blank line to JavaScript embedded in the page if "volume" wasn't set in the short code (Video.js only).
  • If video player is set larger than the containing DIV and the player size is reduced to fit, the height is now rounded to the nearest integer.
Download this release

Release Info

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

Code changes from version 3.0.2 to 3.0.3

readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=kyleg
4
Tags: video, video gallery, html5, shortcode, thumbnail, ffmpeg, libav, embed, mobile, webm, ogg, h.264
5
Requires at least: 3.5
6
Tested up to: 3.5.1
7
- Stable tag: 3.0.2
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -126,9 +126,13 @@ Use the "Embed from URL" tab. Use the format http://username:password@yourdomain
126
127
== Changelog ==
128
129
= 3.0.2 - January 24, 2013 =
130
* Fixed bug that permanently disabled buttons on the Embed Video from URL tab.
131
- * Disabled "Delete Permanently" option for encoded files found on other servers.
132
* Reduced the jQuery UI Dialog css and put it in its own scope to avoid conflicts with existing jQuery UI Dialog themes.
133
* Cleaned out some leftover code.
134
4
Tags: video, video gallery, html5, shortcode, thumbnail, ffmpeg, libav, embed, mobile, webm, ogg, h.264
5
Requires at least: 3.5
6
Tested up to: 3.5.1
7
+ Stable tag: 3.0.3
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
126
127
== Changelog ==
128
129
+ = 3.0.3 - January 29, 2013 =
130
+ * Fixed bug that added a blank line to JavaScript embedded in the page if "volume" wasn't set in the short code (Video.js only).
131
+ * If video player is set larger than the containing DIV and the player size is reduced to fit, the height is now rounded to the nearest integer.
132
+
133
= 3.0.2 - January 24, 2013 =
134
* Fixed bug that permanently disabled buttons on the Embed Video from URL tab.
135
+ * Disabled "Delete Permanently" link for encoded files found on other servers.
136
* Reduced the jQuery UI Dialog css and put it in its own scope to avoid conflicts with existing jQuery UI Dialog themes.
137
* Cleaned out some leftover code.
138
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 for thumbnails and encodes. <a href="options-general.php?page=video-embed-thumbnail-generator/video-embed-thumbnail-generator.php">Settings</a> | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=kylegilman@gmail.com&item_name=Video%20Embed%20And%20Thumbnail%20Generator%20Plugin%20Donation/">Donate</a>
6
- Version: 3.0.2
7
Author: Kyle Gilman
8
Author URI: http://www.kylegilman.net/
9
@@ -540,7 +540,6 @@ function KGVID_shortcode($atts, $content = ''){
540
if ($query_atts["loop"] == 'true') { $code .= "loop " ;}
541
if ($query_atts["autoplay"] == 'true') { $code .= "autoplay " ;}
542
if ($query_atts["controlbar"] != 'none') { $code .= "controls " ;}
543
- //if ($isAndroid) { $code .= "onclick='this.play();' "; }
544
$code .= "preload='metadata' ";
545
if($query_atts["poster"] != '' ) { $code .= "poster='".$query_atts["poster"]."' "; }
546
$code .= "width='".$query_atts["width"]."' height='".$query_atts["height"]."'";
@@ -569,7 +568,7 @@ function KGVID_shortcode($atts, $content = ''){
569
}
570
$code .= "</video>\n";
571
$code .= "</div>\n\n";
572
- //if ( $options['embed_method'] == "Video.js" ) { $code .= "<script type='text/javascript'>_V_('video_".$div_suffix."').ready(kgvid_set_mp4_src($JSON_mp4_srcs));</script>\n"; }
573
if ( $options['embed_method'] == "Video.js" ) {
574
if ($id != "") {
575
$plays = intval(get_post_meta($id, "_kgflashmediaplayer-starts", true));
@@ -581,15 +580,12 @@ function KGVID_shortcode($atts, $content = ''){
581
}
582
$aspect_ratio = round($query_atts["height"] / $query_atts["width"], 3);
583
584
- $volume_code = "";
585
- if ( !empty($query_atts["volume"]) ) { $volume_code = "this.volume(".$query_atts['volume'].")"; }
586
-
587
$code .= "<input type='hidden' id='".$div_suffix."_played' value='not_played'><script type='text/javascript'>
588
_V_('video_".$div_suffix."').ready(function(){
589
var width = document.getElementById(this.id).parentElement.offsetWidth;
590
- if ( width < ".$query_atts["width"]." ) { this.width(width).height( width * ".$aspect_ratio." ); }
591
- ".$volume_code."
592
- this.addEvent('play', function(){
593
kgvid_video_counter('".$div_suffix."', '".$plays."', '".$ends."', 'play');
594
if (typeof _gaq != 'undefined') { _gaq.push(['_trackEvent', 'Videos', 'Play Start', '".get_the_title($id)."']); }
595
});
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 for thumbnails and encodes. <a href="options-general.php?page=video-embed-thumbnail-generator/video-embed-thumbnail-generator.php">Settings</a> | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=kylegilman@gmail.com&item_name=Video%20Embed%20And%20Thumbnail%20Generator%20Plugin%20Donation/">Donate</a>
6
+ Version: 3.0.3
7
Author: Kyle Gilman
8
Author URI: http://www.kylegilman.net/
9
540
if ($query_atts["loop"] == 'true') { $code .= "loop " ;}
541
if ($query_atts["autoplay"] == 'true') { $code .= "autoplay " ;}
542
if ($query_atts["controlbar"] != 'none') { $code .= "controls " ;}
543
$code .= "preload='metadata' ";
544
if($query_atts["poster"] != '' ) { $code .= "poster='".$query_atts["poster"]."' "; }
545
$code .= "width='".$query_atts["width"]."' height='".$query_atts["height"]."'";
568
}
569
$code .= "</video>\n";
570
$code .= "</div>\n\n";
571
+
572
if ( $options['embed_method'] == "Video.js" ) {
573
if ($id != "") {
574
$plays = intval(get_post_meta($id, "_kgflashmediaplayer-starts", true));
580
}
581
$aspect_ratio = round($query_atts["height"] / $query_atts["width"], 3);
582
583
$code .= "<input type='hidden' id='".$div_suffix."_played' value='not_played'><script type='text/javascript'>
584
_V_('video_".$div_suffix."').ready(function(){
585
var width = document.getElementById(this.id).parentElement.offsetWidth;
586
+ if ( width < ".$query_atts["width"]." ) { this.width(width).height( Math.round(width * ".$aspect_ratio.") ); }";
587
+ if ( !empty($query_atts["volume"]) ) { $code .= "\n\t\t\t"."this.volume(".$query_atts['volume'].");"."\n\t\t\t"; }
588
+ $code .= "this.addEvent('play', function(){
589
kgvid_video_counter('".$div_suffix."', '".$plays."', '".$ends."', 'play');
590
if (typeof _gaq != 'undefined') { _gaq.push(['_trackEvent', 'Videos', 'Play Start', '".get_the_title($id)."']); }
591
});