[whatwg] A new attribute for <video> and low-power devices

Benjamin M. Schwartz bmschwar at fas.harvard.edu
Mon May 18 14:28:29 PDT 2009


Simon Pieters wrote:
> On Mon, 18 May 2009 18:59:01 +0200, Benjamin M. Schwartz
> <bmschwar at fas.harvard.edu> wrote:
> 
>> Simon Pieters wrote:
>>> If there is a controls attribute or if scripting is disabled, show
>>> controls, else use author-provided scripted button (if any) to play the
>>> video.
>>
>> Consider a webpage in which a side-effect of clicking on some scripted
>> button is to trigger a small animation (using <video>) elsewhere on the
>> page.  If your browser is configured to show <video> full-screen, this
>> webpage will become nearly unusable, because the small animation will
>> take
>> over the screen every time you click on a button.
> 
> I'm not convinced that this will be a problem in practice.
> 
> 
>> I am proposing an additional attribute for <video> so that the browser
>> will know not to do that.
> 
> I'm not convinced that an additional attribute would solve the problem:
> it is likely that some authors would use the attribute incorrectly,
> because it doesn't have any effect in their primary testing environment.
> If an author sets the attribute where it shouldn't be set, it
> effectively makes the video unavailable to users whose UA acts upon the
> attribute, which seems bad.

Then I will attempt to convince you.  Suppose the additional attribute is
a boolean called "decorative", defaulting to "false" if not present.
Authors who are only testing on modern desktops will, as you say, likely
ignore this issue.  I therefore fully expect that they will never set this
attribute.  If the attribute is not set, then most browsers should assume
that the video may be of some significance, and ensure that the user can
play it.

I think the risk of authors accidentally setting "decorative" on critical
videos is small.  I also think that if a popular mobile browsing platform
were to respect this flag, major websites would use it correctly and user
experience would be improved.

> I think a more effective solution is to give
> a non-modal message to the user saying "This page is trying to play a
> video. Press the Foo key to play.", or similar.

Are you going to pop up a message of this kind for every <video> tag on
every page?  A page decorated with many small <video> tags in place of
animated GIFs is going to be quite difficult to use in a mobile browser
where each one is associated with a different approval dialog, and
approving causes them to take over the 4-inch screen.

--Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090518/1953c186/attachment.pgp>


More information about the whatwg mailing list