This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25652 - Media Capture Spec should explicitly specify about MediaStream active / inactive state change events to give more clarity.
Summary: Media Capture Spec should explicitly specify about MediaStream active / inact...
Status: RESOLVED WORKSFORME
Alias: None
Product: WebRTC Working Group
Classification: Unclassified
Component: Media Capture and Streams (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: public-media-capture@w3.org
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-10 13:49 UTC by Kiran
Modified: 2014-05-14 13:56 UTC (History)
2 users (show)

See Also:


Attachments

Description Kiran 2014-05-10 13:49:23 UTC
Media Capture and Streams spec is specifying active / inactive events.
But missing to give clarity about when they should be fired and when they should not be fired, if any.

MediaStream state may change in many aspects other than MediaStream Constructor algorithm, like
if the following functions invoked 
MediaStream.addTrack()
MediaStream.clone()
MediaStream.removeTreack()
MediaStramTrack.stop()
MediaStreamTrack.enabled()

or if the addTrack/removeTrack events ocrrucred because of internal peerConnection changes
or if all the tracks get muted because of external entity.

Spec should specify that the corresponding active / inactive event should be fired.
Adding the following line after
"Otherwise the stream is active. A MediaStream can start its life as inactive if it is constructed without any tracks"
"UA should fire active and inactive events whenever the stream changes its state from inactive to active and active to inactive respectively"
may be sufficient.
Comment 1 Harald Alvestrand 2014-05-14 13:56:56 UTC
The next paragraph in the spec says

When a MediaStream goes from being active to inactive, the user agent must queue a task that sets the object's active attribute to false and fire a simple event named inactive at the object. When a MediaStream goes from being inactive to active, the user agent must queue a task that sets the object's active attribute to true and fire a simple event named active at the object.

This issue seems covered. Closing as "no change needed" (aka WORKSFORME).