mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@36364 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
65267f09fb
commit
2ed7c6d857
@ -20,7 +20,7 @@
|
||||
*/
|
||||
function initialize() {
|
||||
if ( typeof _wpmejsSettings !== 'undefined' ) {
|
||||
settings = _wpmejsSettings;
|
||||
settings = $.extend( true, {}, _wpmejsSettings );
|
||||
}
|
||||
|
||||
settings.success = settings.success || function (mejs) {
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
_.bindAll( this, 'bindPlayer', 'bindResetPlayer', 'setPlayer', 'ended', 'clickTrack' );
|
||||
|
||||
if ( ! _.isUndefined( window._wpmejsSettings ) ) {
|
||||
this.settings = _wpmejsSettings;
|
||||
this.settings = _.clone( _wpmejsSettings );
|
||||
}
|
||||
this.settings.success = this.bindPlayer;
|
||||
this.setPlayer();
|
||||
@ -172,4 +172,4 @@
|
||||
|
||||
window.WPPlaylistView = WPPlaylistView;
|
||||
|
||||
}(jQuery, _, Backbone));
|
||||
}(jQuery, _, Backbone));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user