When editing/viewing the details of a `[video]` shortcode that has Vimeo as its source, and `Froogaloop` has not already been lazy-loaded, check the details of the state's model for the video `src`, instead of the HTML element.

See #29267.


git-svn-id: https://develop.svn.wordpress.org/trunk@31625 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-03-05 16:14:13 +00:00
parent 21568b8cc1
commit ef10d719eb
2 changed files with 2 additions and 2 deletions

View File

@ -820,7 +820,7 @@ MediaDetails = AttachmentDisplay.extend({
return;
}
if ( this.media.src.indexOf( 'vimeo' ) > -1 && ! ( 'Froogaloop' in window ) ) {
if ( this.model.get( '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 {

View File

@ -93,7 +93,7 @@ MediaDetails = AttachmentDisplay.extend({
return;
}
if ( this.media.src.indexOf( 'vimeo' ) > -1 && ! ( 'Froogaloop' in window ) ) {
if ( this.model.get( '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 {