Fix the display of Audio and Video in the Media Library when using IE8 and below.

This delays the execution of instantiating of the MediaElement.js player until the render is complete, and the node is in the DOM.
Although it's a bug that this is needed in the first place, this will cover us until a new MediaElement.ks release is made.

Props afercia.
Fixes #31058 for 4.1.

Built from https://develop.svn.wordpress.org/branches/4.1@31444


git-svn-id: http://core.svn.wordpress.org/branches/4.1@31425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2015-02-13 05:54:26 +00:00
parent 8518481173
commit 4ff80ae587
2 changed files with 4 additions and 2 deletions

View File

@ -298,7 +298,9 @@
media.mixin.removeAllPlayers();
this.$( 'audio, video' ).each( function (i, elem) {
var el = media.view.MediaDetails.prepareSrc( elem );
setTimeout( function() {
new MediaElementPlayer( el, media.mixin.mejsSettings );
}, 0 );
} );
}
});

File diff suppressed because one or more lines are too long