W3C home > Mailing lists > Public > public-html@w3.org > January 2010

Re: Should <video> buffer control be tri-state?

From: Maciej Stachowiak <mjs@apple.com>
Date: Sun, 03 Jan 2010 05:28:11 -0800
Cc: HTMLwg WG <public-html@w3.org>
Message-id: <2179189A-A311-42B1-B7AD-99B20F0C1474@apple.com>
To: Jeremy Keith <jeremy@adactio.com>

On Jan 3, 2010, at 4:10 AM, Jeremy Keith wrote:

> Maciej wrote:
>> Personally, I think it's highly likely that many authors will omit  
>> autobuffer out of carelessness, and not as a signal of intent.
> Even if that were true (which I doubt  I don't think that pre- 
> buffering by default is a "safe" state for web pages or user  
> bandwidth), it still leaves authors high and dry when they  
> explicitly don't want to pre-buffer media.

In fact, I am arguing for giving authors an explicit way to request  
that they don't want prebuffering. No one (especially not me) has  
suggested that all media items should be aggressively buffered by  
default. All I'm saying is this: when there is no explicit indication  
of author intent, browsers should be free to apply heuristics. And I  
think lack of an attribute (when there is no obvious visible effect)  
is not very god as an indication of intent.

> I am one such author. I would love to use <audio> on http://huffduffer.com/ 
>  but the inability to explicitly switch off pre-buffering stops me  
> from using it. I initially interpreted the current Webkit behaviour  
> as a bug, but from the discussion here (and on IRC), it seems that  
> Webkit is doing nothing that technically contravenes the spec. If  
> that's the case, the spec is at fault for not allowing authors a way  
> to disable pre-buffering.

I think the current WebKit behavior should be changed, regardless of  
whether it's allowed by the spec. It will be fixed sooner or later.  
Poor performance is a bug, even if it's not a spec bug.

But separate from this point, I am arguing that the spec should have a  
way to let authors explicitly say they don't want buffering, as  
suggested by Sylvia and others. Then the case where the author has not  
signaled their intent at all can leave the browser free to guess the  
best behavior based on circumstances

>> In such circumstances, I don't see how we can possibly treat *lack*  
>> of an attribute as a strong indicator of author intent. It's much  
>> more likely to mean the author simply hasn't thought about the issue.
> As it currently stands, the *only* way I can express my intent  
> (which is "please don't pre-buffer") is to leave out the attribute.
> There needs to be some means to allow authors to express this  
> intent. There are two possible means to that end:
> 1. Codify the lack of an autobuffer attribute as an explicit request  
> not to pre-buffer media (an extra sentence or two in the spec would  
> accomplish this) or
> 2. Either change the autobuffer attribute from being Boolean to tri- 
> state or add a new Boolean nobuffer attribute.

In particular I'm suggesting #2, because I think #1 won't be as  

> But simply assuming that because an author has left off the  
> autobuffer attribute out of carelessness effectively makes the  
> attribute useless: either the attribute is included (and the media  
> is pre-buffered) or the attribute is omitted (and the media is pre- 
> buffered because the browser assumes that the author meant to  
> include the attribute).

That is not what I meant to suggest. My position differs from what you  
describe in two ways:

- I think that, under the current spec, when the autobuffer attribute  
is omitted, there are two possibilities: (a) the author definitely  
doesn't want buffering; (b) the author did not consider the issue of  
buffering at all; and the browser can't tell which of these applies in  
any particular case. I'm not saying that every time the attribute is  
missing, it's out of carelessness.
- If we could be reasonably confident we are in case (b), the best  
thing to do would be apply heuristics to decide whether to buffer. I  
am definitely not saying always buffer. On a page with 50 <video>  
elements, preloading all their contents would likely be a poor  
experience. And in any case, right now, there's no good way to tell if  
(b) applies.

> Rather than browsers having to make guesses about author intent, it  
> would be a lot simpler (for browsers and authors) if there were a  
> way to explicitly express that media should not be pre-buffered.

I agree. What I'm saying is that lack of a particular attribute is not  
explicit enough, so let's add an explicit way to express this intent.

Received on Sunday, 3 January 2010 13:28:46 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:56 UTC