[wp-trac] [WordPress Trac] #30029: Allow settings.success override for mediaelement (to give plugins more freedom)
WordPress Trac
noreply at wordpress.org
Sat Oct 18 01:40:28 UTC 2014
#30029: Allow settings.success override for mediaelement (to give plugins more
freedom)
-------------------------------+-----------------------------
Reporter: michael.heuberger | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: trunk
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
This piece in your wp-mediaelement.js file makes it very difficult for me
to develop video based WP plugins:
{{{
var settings = {};
if ( typeof _wpmejsSettings !== 'undefined' ) {
settings = _wpmejsSettings;
}
settings.success = function (mejs) {
...
};
$('.wp-audio-shortcode, .wp-video-shortcode').mediaelementplayer( settings
);
}}}
Please change the line
{{{
settings.success = function (mejs) {
}}}
to
{{{
settings.success = settings.success || function (mejs) {
}}}
so that I can override it with my own success handler through
`_wpmejsSettings`.
Thanks!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30029>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list