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. Built from https://develop.svn.wordpress.org/trunk@36364 git-svn-id: http://core.svn.wordpress.org/trunk@36331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
dddfbfa1d3
commit
cee318ed81
|
@ -20,7 +20,7 @@
|
||||||
*/
|
*/
|
||||||
function initialize() {
|
function initialize() {
|
||||||
if ( typeof _wpmejsSettings !== 'undefined' ) {
|
if ( typeof _wpmejsSettings !== 'undefined' ) {
|
||||||
settings = _wpmejsSettings;
|
settings = $.extend( true, {}, _wpmejsSettings );
|
||||||
}
|
}
|
||||||
|
|
||||||
settings.success = settings.success || function (mejs) {
|
settings.success = settings.success || function (mejs) {
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
_.bindAll( this, 'bindPlayer', 'bindResetPlayer', 'setPlayer', 'ended', 'clickTrack' );
|
_.bindAll( this, 'bindPlayer', 'bindResetPlayer', 'setPlayer', 'ended', 'clickTrack' );
|
||||||
|
|
||||||
if ( ! _.isUndefined( window._wpmejsSettings ) ) {
|
if ( ! _.isUndefined( window._wpmejsSettings ) ) {
|
||||||
this.settings = _wpmejsSettings;
|
this.settings = _.clone( _wpmejsSettings );
|
||||||
}
|
}
|
||||||
this.settings.success = this.bindPlayer;
|
this.settings.success = this.bindPlayer;
|
||||||
this.setPlayer();
|
this.setPlayer();
|
||||||
|
@ -172,4 +172,4 @@
|
||||||
|
|
||||||
window.WPPlaylistView = WPPlaylistView;
|
window.WPPlaylistView = WPPlaylistView;
|
||||||
|
|
||||||
}(jQuery, _, Backbone));
|
}(jQuery, _, Backbone));
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.5-alpha-36359';
|
$wp_version = '4.5-alpha-36364';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue