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. git-svn-id: https://develop.svn.wordpress.org/trunk@27974 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e4d4e0020b
commit
5d3e7be690
@ -1269,7 +1269,7 @@ function wp_playlist_shortcode( $attr ) {
|
||||
<?php if ( 'audio' === $type ): ?>
|
||||
<div class="wp-playlist-current-item"></div>
|
||||
<?php endif ?>
|
||||
<<?php echo $safe_type ?> controls="controls" preload="metadata" width="<?php
|
||||
<<?php echo $safe_type ?> controls="controls" preload="none" width="<?php
|
||||
echo (int) $theme_width;
|
||||
?>"<?php if ( 'video' === $safe_type ):
|
||||
echo ' height="', (int) $theme_height, '"';
|
||||
|
Loading…
x
Reference in New Issue
Block a user