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. Built from https://develop.svn.wordpress.org/trunk@28370 git-svn-id: http://core.svn.wordpress.org/trunk@28198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
558cf6f86d
commit
aeadf0c7cf
|
@ -6,7 +6,7 @@
|
||||||
l10n = typeof _wpMediaViewsL10n === 'undefined' ? {} : _wpMediaViewsL10n;
|
l10n = typeof _wpMediaViewsL10n === 'undefined' ? {} : _wpMediaViewsL10n;
|
||||||
|
|
||||||
if ( ! _.isUndefined( window._wpmejsSettings ) ) {
|
if ( ! _.isUndefined( window._wpmejsSettings ) ) {
|
||||||
baseSettings.pluginPath = _wpmejsSettings.pluginPath;
|
baseSettings = _wpmejsSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -12,7 +12,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( typeof _wpmejsSettings !== 'undefined' ) {
|
if ( typeof _wpmejsSettings !== 'undefined' ) {
|
||||||
settings.pluginPath = _wpmejsSettings.pluginPath;
|
settings = _wpmejsSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
settings.success = function (mejs) {
|
settings.success = function (mejs) {
|
||||||
|
|
|
@ -34,7 +34,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.pluginPath = _wpmejsSettings.pluginPath;
|
this.settings = _wpmejsSettings;
|
||||||
}
|
}
|
||||||
this.settings.success = this.bindPlayer;
|
this.settings.success = this.bindPlayer;
|
||||||
this.setPlayer();
|
this.setPlayer();
|
||||||
|
|
Loading…
Reference in New Issue