1
/* global mejs, _wpmejsSettings */
3
// add mime-type aliases to MediaElement plugin support
4
mejs.plugins.silverlight[0].types.push('video/x-ms-wmv');
5
mejs.plugins.silverlight[0].types.push('audio/x-ms-wma');
10
if ( typeof _wpmejsSettings !== 'undefined' ) {
11
settings = _wpmejsSettings;
14
settings.success = function (mejs) {
17
if ( 'flash' === mejs.pluginType ) {
18
autoplay = mejs.attributes.autoplay && 'false' !== mejs.attributes.autoplay;
19
loop = mejs.attributes.loop && 'false' !== mejs.attributes.loop;
21
autoplay && mejs.addEventListener( 'canplay', function () {
25
loop && mejs.addEventListener( 'ended', function () {
31
$('.wp-audio-shortcode, .wp-video-shortcode').mediaelementplayer( settings );