Set videos to preload="metadata" to prevent upfront download [trac#5625].
Setting was previously preload="auto". While preload="auto" *does not* cause a full upfront download on Firefox, Abrowser, IceCat or Chromium, a user reported on the LibrePlanet mailing list that it was causing a full download on their browser. The specifications leave it up to the browser do decide whether to download, but it makes sense to do what we can to avoid surprising people on low bandwidth/quota internet connections. https://html.spec.whatwg.org/multipage/media.html#attr-media-preload Further, media.libreplanet.org (one of MediaGoblin's biggest users) has implement this change locally, so it makes sense for us to stay in sync. Signed-off-by: Ben Sturmfels <ben@sturm.com.au>
This commit is contained in:
parent
de60546e34
commit
bc2990c279
@ -22,8 +22,9 @@ This chapter has important information about our current and previous releases.
|
|||||||
0.12.0 (Work in progress)
|
0.12.0 (Work in progress)
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
- Extend left/right arrow key navigation to paginated views [#5627] (Olivier Mehani)
|
- Extend left/right arrow key navigation to paginated views [trac#5627] (Olivier Mehani)
|
||||||
- Fix incorrect setuptools install location for db/migrations/env.py (Elisei Roca)
|
- Fix incorrect setuptools install location for db/migrations/env.py (Elisei Roca)
|
||||||
|
- Set videos to preload="metadata" to prevent upfront download [trac#5625] (Michael McMahon)
|
||||||
|
|
||||||
..
|
..
|
||||||
**To do:**
|
**To do:**
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
{%- set display_type, display_path = media.get_display_media() %}
|
{%- set display_type, display_path = media.get_display_media() %}
|
||||||
<video controls
|
<video controls
|
||||||
{% if global_config['plugins']['mediagoblin.media_types.video']['auto_play'] %}autoplay{% endif %}
|
{% if global_config['plugins']['mediagoblin.media_types.video']['auto_play'] %}autoplay{% endif %}
|
||||||
preload="auto" class="video-js vjs-default-skin">
|
preload="metadata" class="video-js vjs-default-skin">
|
||||||
<source src="{{ request.app.public_store.file_url(display_path) }}"
|
<source src="{{ request.app.public_store.file_url(display_path) }}"
|
||||||
{% if media.media_data %}
|
{% if media.media_data %}
|
||||||
type="{{ media.media_data.source_type() }}"
|
type="{{ media.media_data.source_type() }}"
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
{%- set display_type, display_path = media.get_display_media() %}
|
{%- set display_type, display_path = media.get_display_media() %}
|
||||||
<video controls
|
<video controls
|
||||||
{% if global_config['plugins']['mediagoblin.media_types.video']['auto_play'] %}autoplay{% endif %}
|
{% if global_config['plugins']['mediagoblin.media_types.video']['auto_play'] %}autoplay{% endif %}
|
||||||
preload="auto" class="video-js vjs-default-skin">
|
preload="metadata" class="video-js vjs-default-skin">
|
||||||
<source src="{{ request.app.public_store.file_url(display_path) }}"
|
<source src="{{ request.app.public_store.file_url(display_path) }}"
|
||||||
{% if media.media_data %}
|
{% if media.media_data %}
|
||||||
type="{{ media.media_data.source_type() }}"
|
type="{{ media.media_data.source_type() }}"
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
<video controls
|
<video controls
|
||||||
{% if global_config['plugins']['mediagoblin.media_types.video']['auto_play'] %}autoplay{% endif %}
|
{% if global_config['plugins']['mediagoblin.media_types.video']['auto_play'] %}autoplay{% endif %}
|
||||||
preload="auto" class="video-js vjs-default-skin" id="video_1">
|
preload="metadata" class="video-js vjs-default-skin" id="video_1">
|
||||||
{% for each_media_path in all_media_path %}
|
{% for each_media_path in all_media_path %}
|
||||||
<source src="{{ request.app.public_store.file_url(each_media_path[2]) }}"
|
<source src="{{ request.app.public_store.file_url(each_media_path[2]) }}"
|
||||||
{% if media.media_data %}
|
{% if media.media_data %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user