diff --git a/css/kgvid_styles.css b/css/kgvid_styles.css index 962e641..4439479 100644 --- a/css/kgvid_styles.css +++ b/css/kgvid_styles.css @@ -299,7 +299,8 @@ span.kgvid_facebook_icon_holder { } .kgvid_video_gallery_thumb { - position: relative; + position: relative; + max-width:100%; vertical-align: bottom; display:inline-block; cursor: pointer !important; @@ -315,6 +316,13 @@ span.kgvid_facebook_icon_holder { object-fit: cover; } +.kgvid_video_gallery_thumb .mejs-overlay-button { + position: absolute; + top: 50%; + left: 50%; + transform-origin: 0 0; +} + .kgvid_video_gallery_thumb .titlebackground { position:absolute; bottom:10px; diff --git a/js/kgvid_video_embed.js b/js/kgvid_video_embed.js index dbfee07..d41a8e2 100644 --- a/js/kgvid_video_embed.js +++ b/js/kgvid_video_embed.js @@ -934,12 +934,14 @@ function kgvid_resize_gallery_play_button(gallery_id) { if ( video_vars.player_type == "Video.js" ) { var button_selector = '.vjs-big-play-button'; - var translate_y = 30; + var translate_x = '0'; + var translate_y = '-30px'; } if ( video_vars.player_type == "WordPressDefault" ) { var button_selector = '.mejs-overlay-button'; - var translate_y = 5; + var translate_x = '-50%' + var translate_y = '-55%'; } var play_button_percent = jQuery('#'+gallery_id+' '+button_selector).width()/thumb_width; @@ -948,7 +950,7 @@ function kgvid_resize_gallery_play_button(gallery_id) { var scale_value = Math.round(thumb_width * max_percent / unscaled_width * 1000)/1000; if ( scale_value < 1 ) { - var css_text = 'scale('+scale_value+') translateY(-'+translate_y+'px)'; + var css_text = 'scale('+scale_value+') translate('+translate_x+', '+translate_y+')'; jQuery('#'+gallery_id+' '+button_selector).css({ 'transform' : css_text, diff --git a/readme.txt b/readme.txt index 20d600e..2ea99a2 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: kylegilman Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=kylegilman@gmail.com&item_name=Video%20Embed%20And%20Thumbnail%20Generator%20Plugin%20Donation Tags: video, video player, video gallery, video thumbnail, ffmpeg, resolution Requires at least: 4.4 -Tested up to: 5.2 +Tested up to: 5.4 Requires PHP: 5.6.0 Stable tag: 4.6.25 License: GPLv2 or later @@ -250,12 +250,14 @@ Enter the username & password in the plugin settings "FFMPEG Settings" tab, or u == Changelog == -= 4.6.26 - July 6, 2019 = += 4.6.26 - April 22, 2020 = * Added option to disable shortcode URL rewriting if WordPress doesn't know your videos are hosted on a CDN. * Added playsinline attribute to Video.js videos to allow iPhones to play videos inline on web pages. * Added filter to manually rewrite shortcode URLs. * Changed code that caused fatal error 'Can't use function return value in write context' on PHP versions before 5.5 -* Stopped using deprecated $user_ID global +* Made gallery thumbnail images responsive. +* Stopped using deprecated $user_ID global. +* Fixed bug that crashed WordPress Default player if text tracks were available but no default track was set. = 4.6.25 - May 28, 2019 = * Fixed bug that broke pop-up galleries when video title had a space in the name. diff --git a/video-embed-thumbnail-generator.php b/video-embed-thumbnail-generator.php index 40ff4b8..e489bd3 100644 --- a/video-embed-thumbnail-generator.php +++ b/video-embed-thumbnail-generator.php @@ -3462,7 +3462,6 @@ function KGVID_shortcode($atts, $content = '') { if ( $query_atts['align'] == "left" ) { $aligncode = ' kgvid_textalign_left'; } if ( $query_atts['align'] == "center" ) { $aligncode = ' kgvid_textalign_center'; } if ( $query_atts['align'] == "right" ) { $aligncode = ' kgvid_textalign_right'; } - if ( $query_atts['inline'] == "true" ) { $aligncode .= ' kgvid_wrapper_inline'; } $code .= '