From ef10d719eb709bf74ff266f28cd66d6abf269d14 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 5 Mar 2015 16:14:13 +0000 Subject: [PATCH] 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 --- src/wp-includes/js/media/audio-video.js | 2 +- src/wp-includes/js/media/views/media-details.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/js/media/audio-video.js b/src/wp-includes/js/media/audio-video.js index ad2c8ba046..ace5919144 100644 --- a/src/wp-includes/js/media/audio-video.js +++ b/src/wp-includes/js/media/audio-video.js @@ -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 { diff --git a/src/wp-includes/js/media/views/media-details.js b/src/wp-includes/js/media/views/media-details.js index 4e9b61c1e2..d67e7a12cd 100644 --- a/src/wp-includes/js/media/views/media-details.js +++ b/src/wp-includes/js/media/views/media-details.js @@ -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 {