- From: Adam Bergkvist <adam.bergkvist@ericsson.com>
- Date: Wed, 13 May 2015 06:35:28 +0000
- To: Iņaki Baz Castillo <ibc@aliax.net>, "public-media-capture@w3.org" <public-media-capture@w3.org>
On 2015-05-12 23:30, Iņaki Baz Castillo wrote: > Hi, > > The current draft states that both onaddtrack and onremovetrack events > "are not fired when the script directly modifies the tracks of > aMediaStream". > > I don't like that. When I call close on a WebSocket I get the onclose > event. Events indicate that something happened regardless who or what > caused it. > > I see no reason at all to just fire those events due to a track > modification made by the script in a MediaStream. The reason you get a close event when you do close() on a WebSocket is because you initiate the closing handshake (state: CLOSING) and the event tells you when it's completed (state: CLOSED). I believe it's not common to fire events as a result of direct manipulation of objects. The task that fires an event is usually the task that modifies the concerned script objects and the reason for the event is to notify what happened. It's not compatible with a synchronous operation that performs its action directly. /Adam
Received on Wednesday, 13 May 2015 06:35:56 UTC