Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#30029 closed enhancement (fixed)

Allow settings.success override for mediaelement (to give plugins more freedom)

Reported by: michaelheuberger's profile michael.heuberger Owned by:
Milestone: 4.1 Priority: normal
Severity: normal Version: 4.1
Component: Media Keywords: has-patch
Focuses: javascript Cc:


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) {


settings.success = settings.success || function (mejs) {

so that I can override it with my own success handler through _wpmejsSettings.


Attachments (1)

30029.diff (480 bytes) - added by nofearinc 10 years ago.
use settings.success if already defined in _wpmejsSettings

Download all attachments as: .zip

Change History (5)

10 years ago

use settings.success if already defined in _wpmejsSettings

#1 @wonderboymusic
10 years ago

  • Focuses javascript added
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.1

#2 @wonderboymusic
10 years ago

[30083] missed the ticket

#3 @wonderboymusic
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

#4 @michael.heuberger
10 years ago

Great! When is 4.1 coming out?

Note: See TracTickets for help on using tickets.