W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2011

[whatwg] Limiting the amount of downloaded but not watched video

From: Glenn Maynard <glenn@zewt.org>
Date: Sun, 23 Jan 2011 06:13:15 -0500
Message-ID: <AANLkTim972UDyp+0ZLVQsrAjn8YYimMKn-tMSxzSM5vS@mail.gmail.com>
On Sun, Jan 23, 2011 at 5:24 AM, Philip J?genstedt <philipj at opera.com>
>> I do think that in the basic case of a user pressing play on a video
>> player, it's good to be able to make that respond instantly rather
>> than waiting for a round-trip to begin playing.
> Have you found this to be an actual problem in Firefox, which does suspend
> download after reaching HAVE_METADATA?

It's not a big problem, but a user experience one: user interfaces are
cleaner when they're immediately responsive.  I'd sooner give a crisp
interface to users than one that feels delayed.

>> Another use case is the background of a game, where you want the video
>> ready to start when gameplay begins.
> For that you should really use <audio preload=auto>, no?

Not if all you want is for the video to start with the rest of the game, and
not to download the whole video.

They're both minor, of course; helpful side-effects of preload=buffer, not
sufficient justifications by themselves.

Hmm.  To get this effect without preload=buffer, you could set preload=auto,
watch the buffered attribute to see when some data is actually downloaded,
then set it to preload=metadata to stop autoloading.  That's a minor hack,
and would need to watch out for browsers that don't autoload on
preload=auto, but it's probably good enough for the above cases.  It'd only
work if runtime changes to preload are applied, which would also be needed
for scripts to implement "preload=auto only when paused".

Glenn Maynard
Received on Sunday, 23 January 2011 03:13:15 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:29 UTC