WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/22/2014 05:52:06 PM (7 years ago)
Author:
wonderboymusic
Message:

Refinements for asynchronous rendering in wp.mce.media.PlaylistView:

  • Add visibility: hidden as an inline style to <audio> tags, there is a race with the stylesheet which can get enqueued in the body and loaded in the footer.
  • When creating new instances of MediaElementPlayer, always push them onto a stack. Lone views can be responsible for multiple instances of the same shortcode on render.
  • Rename wp.media.mixin.unsetPlayer() to wp.media.mixin.unsetPlayers() to reflect the above.
  • Call wp.media.mixin.unsetPlayers() on the view's unbind() method, instead of inline in the render() method
  • Make sure WPPlaylistView is instantiated for each editor instance
  • Ensure that the No Items Found view state is not rendered when attachments actually do exist.

Props gcorne, wonderboymusic.
See #27899.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r28168 r28182  
    13541354    ?>"<?php if ( 'video' === $safe_type ):
    13551355        echo ' height="', (int) $theme_height, '"';
     1356    else:
     1357        echo ' style="visibility: hidden"';
    13561358    endif; ?>></<?php echo $safe_type ?>>
    13571359    <div class="wp-playlist-next"></div>
     
    15561558        'autoplay' => $autoplay,
    15571559        'preload'  => $preload,
    1558         'style'    => 'width: 100%',
     1560        'style'    => 'width: 100%; visibility: hidden;',
    15591561    );
    15601562
Note: See TracChangeset for help on using the changeset viewer.