#30029 closed enhancement (fixed)
Allow settings.success override for mediaelement (to give plugins more freedom)
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 4.1 | Priority: | normal |
| Severity: | normal | Version: | 4.1 |
| Component: | Media | Keywords: | has-patch |
| Focuses: | javascript | Cc: |
Description
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!
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
use settings.success if already defined in _wpmejsSettings