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-template.php

    r28144 r28182  
    1717    $audio_types = wp_get_audio_extensions();
    1818?>
    19 <audio controls
     19<audio style="visibility: hidden"
     20    controls
    2021    class="wp-audio-shortcode"
    2122    width="{{ _.isUndefined( data.model.width ) ? 400 : data.model.width }}"
Note: See TracChangeset for help on using the changeset viewer.