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:
Scott Taylor 2016-01-20 15:47:28 +00:00
parent dddfbfa1d3
commit cee318ed81
3 changed files with 4 additions and 4 deletions

View File

@ -20,7 +20,7 @@
*/
function initialize() {
if ( typeof _wpmejsSettings !== 'undefined' ) {
settings = _wpmejsSettings;
settings = $.extend( true, {}, _wpmejsSettings );
}
settings.success = settings.success || function (mejs) {

View File

@ -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();

View File

@ -4,7 +4,7 @@
*
* @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.