Opened 4 years ago

Closed 3 years 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">

Change History (6)

comment:1 by Ben Sturmfels, 3 years ago

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 by Ben Sturmfels, 3 years ago

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 by Ben Sturmfels, 3 years ago

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 by Ben Sturmfels, 3 years ago

And if I pause the video, it stops downloading.

comment:5 by thomzane, 3 years ago

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 by Ben Sturmfels, 3 years ago

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.