Opened 6 months ago

Closed 5 weeks ago

#5625 closed defect (fixed)

Video preload is set to preload="auto"

Reported by: thomzane Owned by:
Priority: minor Milestone:
Component: programming Keywords:
Cc: Parent Tickets: #375

Description

There was recently a discussion about this setting on the libreplanet-discuss list. https://lists.gnu.org/archive/html/libreplanet-discuss/2021-05/msg00013.html

I see there was an issue about it 9 years ago. https://issues.mediagoblin.org/ticket/375#no2

The issue suggests using preload="metadata" instead.

These are the two commands I used to find it:

git clone --branch v0.11.0 --depth 1
https://git.savannah.gnu.org/git/mediagoblin.git
grep -R 'preload="auto"' mediagoblin/

mediagoblin/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/video_primary.html:
preload="auto" class="video-js vjs-default-skin">
mediagoblin/mediagoblin/plugins/archivalook/templates/archivalook/feature_displays/video_secondary.html:
preload="auto" class="video-js vjs-default-skin">
mediagoblin/mediagoblin/templates/mediagoblin/media_displays/video.html:
preload="auto" class="video-js vjs-default-skin" id="video_1">

Subtickets

Change History (6)

comment:1 Changed 2 months ago by Ben Sturmfels

Thanks Michael,

What do you think is the right thing to do here? It's a bit of a trade-off where there are benefits to preloading in terms of user experience.

According to https://html.spec.whatwg.org/multipage/media.html#attr-media-preload, the browser isn't required to download the full video, but we can't necessarily ignore the issue and let the browser misbehave and use all the viewer's download quota.

I presume sites like YouTube would intervene with custom JS to explicitly only preload part of the video - balancing UX with avoiding unnecessary downloads.

Regards,
Ben

comment:2 Changed 2 months ago by Ben Sturmfels

Michael, can you do a test for me please? If you go to the following video page, what happens in your browser? Does in download the full video before you hit play?

https://media.sturm.com.au/u/ben/m/mediagoblin-pyconau-2016-video/

In my IceCat 78.13, it appears to begin download, but blocks, though I'm not 100% clear if I'm interpreting the browser console output correctly.

comment:3 Changed 2 months ago by Ben Sturmfels

Specifically I'm looking at the line in the "Network" tab of the browser developer tools that reads eg. "12.67 MB / 11.67 MB transferred". This appears to creep up gradually as I watch the video, not suddenly jump to hundreds of MB.

comment:4 Changed 2 months ago by Ben Sturmfels

And if I pause the video, it stops downloading.

comment:5 Changed 5 weeks ago by thomzane

The network tab looks fine with abrowser (Trisquel's Firefox fork).

I am not sure what browser configuration would load the video with preload="auto", but it might happen with browsers that we do not use.

I went ahead and changed the setting to preload="metadata" on our instance when I made this issue 5 months back and received no complaints since for what it is worth.

comment:6 Changed 5 weeks ago by Ben Sturmfels

Resolution: fixed
Status: newclosed

Thanks Michael, I've updated master to use preload="metadata" because I think it's useful to stay in sync with media.libreplanet.org here, being one of our biggest users.

Note: See TracTickets for help on using tickets.