CoreFiles by mySites.guru
wp-mediaelement.js34 lines, 906 bytes, from wordpress-4.0.21.zip
Raw History Compare with 4.0.20
md5
95c1dc92db0652488b6b3f48c55e40d1
sha1
3ae2326ab2dc244d253cb30f0a086110e95712ab
sha256
e3ad336937d8654ac3e989b8290e855cb74d7e36409f33bca97aa64ca8ec40d5
/* 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 = 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 44 releases, WordPress 4.0-beta2 to 4.0.38. See them all, or every version of this file.