Re: setting HTMLMediaElement volume and playbackRate attributes

playbackRate 0 is equivalent to pausing playback and in my opinion it
seems like a bad idea to have several ways to do that.

Philip

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:28:41 UTC