WICG / interventions

A place for browsers and web developers to collaborate on user agent interventions.
Other
176 stars 28 forks source link

Don't loop video more than N times if it is loaded from the network #61

Closed cramforce closed 2 years ago

cramforce commented 7 years ago

Currently a single looping video can quickly use huge amounts of data if the same file is loaded from the network over and over again. It would be worth considering to limit the maximum number of iterations if data is coming from the network.

ojanvafai commented 7 years ago

@mounirlamouri WDYT? This make sense to me, at least for data saver users.

mounirlamouri commented 7 years ago

I might be misunderstanding this: are we talking about a video looping to show the same content over and over again? This shouldn't download multiple times the video content, should it?

Ajedi32 commented 7 years ago

Yeah, I don't really get this either. At least for regular HTML5 video tags with a single file as the source, after the video is loaded it's loaded, right? It never gets re-downloaded as far as I can tell.

I guess certain other types of buffering media players might re-download portions of the video on loop? In those cases the downloads are controlled with JavaScript though, right? How would the browser detect that situation?

bzbarsky commented 7 years ago

At least for regular HTML5 video tags with a single file as the source, after the video is loaded it's loaded, right?

Not necessarily. If it's big enough, it won't get cached by the browser, in either memory or on-disk. So it'll get streamed through as it plays, with temporary memory caching around the play point to enable playthrough in the face of network hiccups, but if you go all the way to the beginning it may well need to be downloaded again.

mounirlamouri commented 7 years ago

Is there some data that shows that this is a common pattern that affect bandwidth? Also, shouldn't browsers do a better job at caching looping videos in order to avoid this situation?

bzbarsky commented 7 years ago

Also, shouldn't browsers do a better job at caching looping videos in order to avoid this situation?

Possibly, yes.

emjayess commented 7 years ago

(Ugh) May I also suggest penalizing this obnoxious site-building anti-pattern, via seo de-ranking.

johannhof commented 2 years ago

(As noted in https://github.com/WICG/interventions/pull/72, we intend to archive this repository and are thus triaging and resolving all open issues)

This doesn't seem to have moved forward. If there's still interest I would recommend filing a bug with browsers or the Media WG.