Re: setting HTMLMediaElement volume and playbackRate attributes

On Sun, 23 Nov 2008, 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? [...] 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?

On Sun, 23 Nov 2008, 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.

On Sun, 23 Nov 2008, Eric Carlson wrote:
>
> I agree that a "playbackRate == 0" is equivalent to "paused == true", 
> but isn't "volume == 0" is equivalent to "muted == true"?

On Mon, 24 Nov 2008, Philip Jägenstedt wrote:
> 
> If an UI handles |playbackRate| < x by pausing I don't think anybody 
> would mind as long as x is small. But I suppose you're arguing that 
> setting playbackRate to 0 should simply be allowed. I don't feel 
> strongly about the issue, but if playbackRate 0 is allowed it should be 
> well defined which (if any) events it fired.

On Mon, 24 Nov 2008, Pierre-Olivier Latour wrote:
> 
> I think it should just fire the regular "playbackrate changed" event, 
> like for any other value.
> 
> Having 0.0 be allowed for both playback rate and volume makes things 
> consistent: "pause" is a conveniency override of playback rate, the same 
> way "muted" is one for "volume".

On Thu, 27 Nov 2008, Dave Singer wrote:
> 
> I think if I am implementing a jog/shuttle controller, which allows the 
> rate to slide between +1 and -1, I don't want to worry if I happen to 
> sample it at zero and set the rate to that.  True, I am in the odd state 
> of playing at a rate of zero, but that's not so perceptibly different 
> from a rate of 0.00000001, and is not philosophically different from an 
> unmuted volume of zero.
> 
> It's odd, but not harmful, so I don't see a reason to have the wrinkle.

I've updated the spec to allow the playback rate to be 0.0. Let me know if 
there's anything that is left undefined by this. I've tried to make it 
clear (no 'pause' events fire or anything like that).

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 1 December 2008 10:45:02 UTC