CoreFiles by mySites.guru
wp-mediaelement.js34 lines, 926 bytes, from wordpress-4.2.21.zip
Raw History Compare with 4.2.20
md5
9f38d89f0e227bebd5ba84ac75e10f5a
sha1
bb7fa0ef807bee8e2611660808aca376906fbcd7
sha256
ff0405c70b4736e2d659a6080e73b32c3dc29b3a084d3f70b846f4abd008a5bc
/* global mejs, _wpmejsSettings */
(function ($) {
	// add mime-type aliases to MediaElement plugin support
	mejs.plugins.silverlight[0].types.push('video/x-ms-wmv');
	mejs.plugins.silverlight[0].types.push('audio/x-ms-wma');

	$(function () {
		var settings = {};

		if ( typeof _wpmejsSettings !== 'undefined' ) {
			settings = _wpmejsSettings;
		}

		settings.success = settings.success || function (mejs) {
			var autoplay, loop;

			if ( 'flash' === mejs.pluginType ) {
				autoplay = mejs.attributes.autoplay && 'false' !== mejs.attributes.autoplay;
				loop = mejs.attributes.loop && 'false' !== mejs.attributes.loop;

				autoplay && mejs.addEventListener( 'canplay', function () {
					mejs.play();
				}, false );

				loop && mejs.addEventListener( 'ended', function () {
					mejs.play();
				}, false );
			}
		};

		$('.wp-audio-shortcode, .wp-video-shortcode').mediaelementplayer( settings );
	});

}(jQuery));

The same content is in 140 releases, WordPress 4.1-beta1 to 4.3.35. See them all, or every version of this file.