Media: fix undefined error that prevents showing a preview in the media modal when replacing video or audio.
Fixes #35363. git-svn-id: https://develop.svn.wordpress.org/trunk@36233 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
021401424b
commit
3fba1e59d7
@ -792,13 +792,15 @@ MediaDetails = AttachmentDisplay.extend({
|
||||
* @global MediaElementPlayer
|
||||
*/
|
||||
setPlayer : function() {
|
||||
var baseSettings;
|
||||
var baseSettings, src;
|
||||
|
||||
if ( this.players.length || ! this.media || this.scriptXhr ) {
|
||||
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;
|
||||
this.scriptXhr = $.getScript( baseSettings.pluginPath + 'froogaloop.min.js', _.bind( this.loadPlayer, this ) );
|
||||
} else {
|
||||
|
@ -87,13 +87,15 @@ MediaDetails = AttachmentDisplay.extend({
|
||||
* @global MediaElementPlayer
|
||||
*/
|
||||
setPlayer : function() {
|
||||
var baseSettings;
|
||||
var baseSettings, src;
|
||||
|
||||
if ( this.players.length || ! this.media || this.scriptXhr ) {
|
||||
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;
|
||||
this.scriptXhr = $.getScript( baseSettings.pluginPath + 'froogaloop.min.js', _.bind( this.loadPlayer, this ) );
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user