W3C home > Mailing lists > Public > public-media-capture@w3.org > June 2015

Order of events ('addtrack' and 'active')

From: Adam Bergkvist <adam.bergkvist@ericsson.com>
Date: Wed, 24 Jun 2015 17:44:56 +0000
To: "public-media-capture@w3.org" <public-media-capture@w3.org>
Message-ID: <A222C88B6882744D8D4B9681B315889023F7A77F@ESESSMB307.ericsson.se>

Consider a case with an inactive MediaStream. For some reason, a new 
'live' track is added to it by the user agent. This means that both an 
'addtrack' and 'active' event must be fired at the stream. I don't 
believe we have specified the order of these.

My proposal is that the 'addtrack and 'removestrack' events fire before 
'active' and 'inactive' in all such cases.

This means that the active attribute will be false when the 'addtrack' 
handler is fired, but it's better than the other way around. And in this 
particular case, it's pretty easy to foresee the upcoming activity 
change by looking at the readyState of the track.


Received on Wednesday, 24 June 2015 17:45:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:33 UTC