Upgrade MediaElement to 2.15.0:
* It is required to set `height` on the parent `.wp-video` wrapper for video * Fixes the play button hover problem in Chrome * Includes my pull request: https://github.com/johndyer/mediaelement/pull/1273 All changes: https://github.com/johndyer/mediaelement/compare/2.14.2...master See #29110. Built from https://develop.svn.wordpress.org/trunk@29457 git-svn-id: http://core.svn.wordpress.org/trunk@29235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -50,7 +50,7 @@ function wp_underscore_audio_template() {
|
||||
function wp_underscore_video_template() {
|
||||
$video_types = wp_get_video_extensions();
|
||||
?>
|
||||
<# var w_rule = '',
|
||||
<# var w_rule = h_rule = '',
|
||||
w, h, settings = wp.media.view.settings,
|
||||
isYouTube = ! _.isEmpty( data.model.src ) && data.model.src.match(/youtube|youtu\.be/);
|
||||
|
||||
@@ -67,10 +67,13 @@ function wp_underscore_video_template() {
|
||||
}
|
||||
|
||||
if ( w ) {
|
||||
w_rule = ' width: ' + w + 'px;';
|
||||
w_rule = 'width: ' + w + 'px; ';
|
||||
}
|
||||
if ( h ) {
|
||||
h_rule = 'height: ' + h + 'px;';
|
||||
}
|
||||
#>
|
||||
<div style="{{ w_rule }}" class="wp-video">
|
||||
<div style="{{ w_rule }}{{ h_rule }}" class="wp-video">
|
||||
<video controls
|
||||
class="wp-video-shortcode{{ isYouTube ? ' youtube-video' : '' }}"
|
||||
<# if ( w ) { #>width="{{ w }}"<# } #>
|
||||
@@ -286,14 +289,17 @@ function wp_print_media_templates() {
|
||||
</audio>
|
||||
</div>
|
||||
<# } else if ( 'video' === data.type ) {
|
||||
var w_rule = '';
|
||||
var w_rule = h_rule = '';
|
||||
if ( data.width ) {
|
||||
w_rule = 'width: ' + data.width + 'px;';
|
||||
} else if ( wp.media.view.settings.contentWidth ) {
|
||||
w_rule = 'width: ' + wp.media.view.settings.contentWidth + 'px;';
|
||||
}
|
||||
if ( data.height ) {
|
||||
h_rule = 'height: ' + data.height + 'px;';
|
||||
}
|
||||
#>
|
||||
<div style="{{ w_rule }}" class="wp-media-wrapper wp-video">
|
||||
<div style="{{ w_rule }}{{ h_rule }}" class="wp-media-wrapper wp-video">
|
||||
<video controls="controls" class="wp-video-shortcode" preload="metadata"
|
||||
<# if ( data.width ) { #>width="{{ data.width }}"<# } #>
|
||||
<# if ( data.height ) { #>height="{{ data.height }}"<# } #>
|
||||
|
||||
Reference in New Issue
Block a user