#30029 closed enhancement (fixed)
Allow settings.success override for mediaelement (to give plugins more freedom)
| Reported by: | michael.heuberger | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.1 |
| Component: | Media | Version: | 4.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | javascript |
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