• The latest version of MediaElement (3.0.2 by the end of the week) has covered many new media types. But there are things that need to be updated on your side to make it work:

    1. Remove prior files and include new files inside wp-includes/js/mediaelement folder
    2. On wp-includes/js/mediaelement/wp-mediaelement.js:
    • Remove lines related to Silverlight (since it’s no longer supported)
    • Change line if (‘flash’ === mejs.pluginType) to if (mejs.rendererName.match(/flash/gi) !== null)
    • Add in the player settings the config element classPrefix: ‘mejs-‘ to support prior class styles, since now uses BEM naming convention.
    • Replace wp-includes/js/mediaelement/wp-mediaelement.min.js with changes specified above.
    • Modify wp-includes/script-loader.php to update the reference to MediaElementJS changing lines:
    • $scripts->add( ‘mediaelement’, “/wp-includes/js/mediaelement/mediaelement-and-player.min.js”, array(‘jquery’), ‘3.0.2’, 1 );
    • $styles->add( ‘mediaelement’, “/wp-includes/js/mediaelement/mediaelementplayer-legacy.min.css”, array(), ‘3.0.2’);

    Like mentioned above, it’s worth to expand your code as well since the new package supports HLS, M(PEG)-DASH, YouTube, Vimeo, SoundCloud, Facebook and DailyMotion.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Support MediaElementJS latest version’ is closed to new replies.