WordPress.org

Make WordPress Core

Changeset 27974


Ignore:
Timestamp:
04/06/2014 09:33:00 PM (8 years ago)
Author:
wonderboymusic
Message:

When dynamically instantiating MediaElementPlayer instances in JS, preload="metadata" is extremely wonky. preload="none" lets the file play right away.

This has already been addressed for audio|video shortcodes, but also needs to be the case for playlists. When loading a playlist from a DOM cache or via AJAX, and when the sources match those already pre-loaded, the browser will sometimes donkey-punch the HTTP request for the first cached track selected.

Set preload="none" for the empty <audio|video> tag for playlists.

See commits related to #26779.

File:
1 edited

Legend:

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

    r27960 r27974  
    12701270    <div class="wp-playlist-current-item"></div>
    12711271    <?php endif ?>
    1272     <<?php echo $safe_type ?> controls="controls" preload="metadata" width="<?php
     1272    <<?php echo $safe_type ?> controls="controls" preload="none" width="<?php
    12731273        echo (int) $theme_width;
    12741274    ?>"<?php if ( 'video' === $safe_type ):
Note: See TracChangeset for help on using the changeset viewer.