Make WordPress Core

Changeset 31625


Ignore:
Timestamp:
03/05/2015 04:14:13 PM (10 years ago)
Author:
wonderboymusic
Message:

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.

Location:
trunk/src/wp-includes/js/media
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media/audio-video.js

    r31493 r31625  
    821821        }
    822822
    823         if ( this.media.src.indexOf( 'vimeo' ) > -1 && ! ( 'Froogaloop' in window ) ) {
     823        if ( this.model.get( 'src' ).indexOf( 'vimeo' ) > -1 && ! ( 'Froogaloop' in window ) ) {
    824824            baseSettings = wp.media.mixin.mejsSettings;
    825825            this.scriptXhr = $.getScript( baseSettings.pluginPath + 'froogaloop.min.js', _.bind( this.loadPlayer, this ) );
  • trunk/src/wp-includes/js/media/views/media-details.js

    r31493 r31625  
    9494        }
    9595
    96         if ( this.media.src.indexOf( 'vimeo' ) > -1 && ! ( 'Froogaloop' in window ) ) {
     96        if ( this.model.get( 'src' ).indexOf( 'vimeo' ) > -1 && ! ( 'Froogaloop' in window ) ) {
    9797            baseSettings = wp.media.mixin.mejsSettings;
    9898            this.scriptXhr = $.getScript( baseSettings.pluginPath + 'froogaloop.min.js', _.bind( this.loadPlayer, this ) );
Note: See TracChangeset for help on using the changeset viewer.