Make WordPress Core

Changeset 31444


Ignore:
Timestamp:
02/13/2015 05:53:28 AM (9 years ago)
Author:
dd32
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1/src/wp-includes/js/media-grid.js

    r30378 r31444  
    299299            this.$( 'audio, video' ).each( function (i, elem) {
    300300                var el = media.view.MediaDetails.prepareSrc( elem );
    301                 new MediaElementPlayer( el, media.mixin.mejsSettings );
     301                setTimeout( function() {
     302                    new MediaElementPlayer( el, media.mixin.mejsSettings );
     303                }, 0 );
    302304            } );
    303305        }
Note: See TracChangeset for help on using the changeset viewer.