W3C home > Mailing lists > Public > public-html@w3.org > November 2008

Re: setting HTMLMediaElement volume and playbackRate attributes

From: Eric Carlson <eric.carlson@apple.com>
Date: Sun, 23 Nov 2008 12:51:02 -0800
To: Philip Jägenstedt <philipj@opera.com>
Cc: HTML WG <public-html@w3.org>
Message-id: <9FF01AAA-5E97-4141-83F7-55AECBE5A0D9@apple.com>


On Nov 23, 2008, at 12:27 PM, Philip Jägenstedt wrote:

> playbackRate 0 is equivalent to pausing playback and in my opinion it
> seems like a bad idea to have several ways to do that.
>
   I agree that a "playbackRate == 0" is equivalent to "paused ==  
true", but isn't "volume == 0" is equivalent to "muted == true"?

   Why is it OK for volume but not rate?

   Why is "playbackRate = 0.0000000000.1" allowed, but "playbackRate =  
0.0" throws an error?

eric


>
> On Sun, 2008-11-23 at 10:20 -0800, Eric Carlson wrote:
>>
>>   Why is it OK to set the volume to zero but it is an error to set
>> the playback rate to zero?
>>
>>   The spec says the following about "volume" [1]:
>>
>> 	The volume attribute must return the playback volume of any audio
>> portions of the media element,
>> 	in the range 0.0 (silent) to 1.0 (loudest).
>>
>>   It says the following about "playbackRate" [2]:
>>
>> 	The attribute is mutable, but on setting, if the new value is 0.0, a
>> NOT_SUPPORTED_ERR exception
>> 	must be raised instead of the value being changed.
>>
>>   How is this helpful? Further, why is it OK to set the rate to
>> 0.00001 but an error to set it to 0 when there is no real difference
>> between the two from the user's perspective?
>>
>> eric
>>
>> [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#dom-media-volume
>> [2] http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#dom-media-playbackrate
>>
> -- 
> Philip Jägenstedt
> Opera Software
>
Received on Sunday, 23 November 2008 20:51:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:26 GMT