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. Built from https://develop.svn.wordpress.org/trunk@27974 git-svn-id: http://core.svn.wordpress.org/trunk@27804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
29b1f9a0de
commit
7689cc4a74
|
@ -1269,7 +1269,7 @@ function wp_playlist_shortcode( $attr ) {
|
||||||
<?php if ( 'audio' === $type ): ?>
|
<?php if ( 'audio' === $type ): ?>
|
||||||
<div class="wp-playlist-current-item"></div>
|
<div class="wp-playlist-current-item"></div>
|
||||||
<?php endif ?>
|
<?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;
|
echo (int) $theme_width;
|
||||||
?>"<?php if ( 'video' === $safe_type ):
|
?>"<?php if ( 'video' === $safe_type ):
|
||||||
echo ' height="', (int) $theme_height, '"';
|
echo ' height="', (int) $theme_height, '"';
|
||||||
|
|
Loading…
Reference in New Issue