Media: fix undefined error that prevents showing a preview in the media modal when replacing video or audio.
Fixes #35363. Built from https://develop.svn.wordpress.org/trunk@36233 git-svn-id: http://core.svn.wordpress.org/trunk@36200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a5d44337b2
commit
5a6be6d431
|
@ -792,13 +792,15 @@ MediaDetails = AttachmentDisplay.extend({
|
||||||
* @global MediaElementPlayer
|
* @global MediaElementPlayer
|
||||||
*/
|
*/
|
||||||
setPlayer : function() {
|
setPlayer : function() {
|
||||||
var baseSettings;
|
var baseSettings, src;
|
||||||
|
|
||||||
if ( this.players.length || ! this.media || this.scriptXhr ) {
|
if ( this.players.length || ! this.media || this.scriptXhr ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( this.model.get( 'src' ).indexOf( 'vimeo' ) > -1 && ! ( 'Froogaloop' in window ) ) {
|
src = this.model.get( 'src' );
|
||||||
|
|
||||||
|
if ( src && src.indexOf( 'vimeo' ) > -1 && ! ( 'Froogaloop' in window ) ) {
|
||||||
baseSettings = wp.media.mixin.mejsSettings;
|
baseSettings = wp.media.mixin.mejsSettings;
|
||||||
this.scriptXhr = $.getScript( baseSettings.pluginPath + 'froogaloop.min.js', _.bind( this.loadPlayer, this ) );
|
this.scriptXhr = $.getScript( baseSettings.pluginPath + 'froogaloop.min.js', _.bind( this.loadPlayer, this ) );
|
||||||
} else {
|
} else {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.5-alpha-36232';
|
$wp_version = '4.5-alpha-36233';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue