Re: Changes to the Stop method

On 2013-09-26 14:04, Harald Alvestrand wrote:
>>>      When two tracks in the same tab are fed from the same source,
>>> stop()
>>>      will cause both of them to be ended. The one on which the call was
>>>      not made will have an event named “ended” fired at it.
>> To me, that sounds like a reasonable interpretation. An alternative
>> could be that the camera (microphone) is not turned off until all tracks
>> it feeds have been stopped. The advantage of your interpretation is that
>> it is simpler to revoke access - you'd only have to stop one track (I
>> guess that you'd have to call getUserMedia to use that source again).
>
> That's one reason why I posted this .... some might have that alternate
> interpretation. I think the words currently in the draft are pretty
> explicit - that stop() actually stops the source - but people have been
> thinking different things over time, and might not have noticed what the
> draft currently says.
>
> If we detect a consensus to change it, we can.

I agree that the stop method algorithm is pretty clear about stopping 
the source. But I think there are some leftovers from previous language 
that hints towards Stefan's alternative interpretation (i.e. source 
reference counting and stop when count reaches zero).

I don't have a clear preference between the two approaches. We should 
really try to make it easy for apps that wants to behave in a nice way 
and release resources when they are not used any more.

/Adam

Received on Thursday, 26 September 2013 13:56:20 UTC