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.

Built from https://develop.svn.wordpress.org/trunk@31625


git-svn-id: http://core.svn.wordpress.org/trunk@31606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor
2015-03-05 16:15:25 +00:00
parent f9c138b4c4
commit ae85d506e6
4 changed files with 4 additions and 4 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 {

File diff suppressed because one or more lines are too long

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 {