Allow users to set overrides for MediaElement instances by always passing _wpmejsSettings instead of just _wpmejsSettings.pluginPath.

Props Otto42 for the initial patch.
Fixes #25243.



git-svn-id: https://develop.svn.wordpress.org/trunk@28370 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-05-11 06:24:58 +00:00
parent e1b341cc59
commit e8b8e881b2
3 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@
l10n = typeof _wpMediaViewsL10n === 'undefined' ? {} : _wpMediaViewsL10n;
if ( ! _.isUndefined( window._wpmejsSettings ) ) {
baseSettings.pluginPath = _wpmejsSettings.pluginPath;
baseSettings = _wpmejsSettings;
}
/**

View File

@ -12,7 +12,7 @@
}
if ( typeof _wpmejsSettings !== 'undefined' ) {
settings.pluginPath = _wpmejsSettings.pluginPath;
settings = _wpmejsSettings;
}
settings.success = function (mejs) {

View File

@ -34,7 +34,7 @@
_.bindAll( this, 'bindPlayer', 'bindResetPlayer', 'setPlayer', 'ended', 'clickTrack' );
if ( ! _.isUndefined( window._wpmejsSettings ) ) {
this.settings.pluginPath = _wpmejsSettings.pluginPath;
this.settings = _wpmejsSettings;
}
this.settings.success = this.bindPlayer;
this.setPlayer();