Make WordPress Core


Ignore:
Timestamp:
01/20/2016 03:46:59 PM (8 years ago)
Author:
wonderboymusic
Message:

Media: When reusing the initial values from the global MediaElement config object, the config object should first be cloned. Objects in JS are references that will retain any changes. This fixes an issue where player controls could get mixed up between instances when multiple players (namely, single audio and audio playlists, in a certain order) are on the same page.

Props Fab1en.
Fixes #34152.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/mediaelement/wp-playlist.js

    r31471 r36364  
    3232
    3333            if ( ! _.isUndefined( window._wpmejsSettings ) ) {
    34                 this.settings = _wpmejsSettings;
     34                this.settings = _.clone( _wpmejsSettings );
    3535            }
    3636            this.settings.success = this.bindPlayer;
Note: See TracChangeset for help on using the changeset viewer.