mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Support loop for [audio] and [video] shortcodes that specify files that are played using MediaElement's Flash plugin bridge.
Fixes #27368. git-svn-id: https://develop.svn.wordpress.org/trunk@28363 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -16,9 +16,17 @@
|
||||
}
|
||||
|
||||
settings.success = function (mejs) {
|
||||
var autoplay = mejs.attributes.autoplay && 'false' !== mejs.attributes.autoplay;
|
||||
if ( 'flash' === mejs.pluginType && autoplay ) {
|
||||
mejs.addEventListener( 'canplay', function () {
|
||||
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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user