CoreFiles by mySites.guru
wp-mediaelement.js30 lines, 821 bytes, from wordpress-3.9.21.zip
Raw History Compare with 3.9.20
md5
2ea532fa670298e162824a0142ae7b9a
sha1
7ca3d1dad1dac848c102861bfbcedb0cef7cb488
sha256
858d52694dd8ffedd595ffe56a7edd1e842946a215f508080419853ffca93cd5
/* 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 ( $( document.body ).hasClass( 'mce-content-body' ) ) {
			return;
		}

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

		settings.success = function (mejs) {
			var autoplay = mejs.attributes.autoplay && 'false' !== mejs.attributes.autoplay;
			if ( 'flash' === mejs.pluginType && autoplay ) {
				mejs.addEventListener( 'canplay', function () {
					mejs.play();
				}, false );
			}
		};

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

}(jQuery));

The same content is in 44 releases, WordPress 3.9-beta3 to 3.9.40. See them all, or every version of this file.