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 25787 - More clarification required while explaining started event.
Summary: More clarification required while explaining started event.
Status: RESOLVED FIXED
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-18 14:21 UTC by Kiran
Modified: 2014-07-03 06:28 UTC (History)
3 users (show)

See Also:


Attachments

Description Kiran 2014-05-18 14:21:24 UTC
It is specified that 

"A track begins as new prior to being connected to an active source.
Once connected, the started event fires and the track becomes live."

but while explaining started event,it is specified that

"The MediaStreamTrack object has just transitioned from the "new" readyState to another state." 

While explaining about the label attribute, it is specified that a label attribute can be empty string when the track is either in new state or ended state. i.e., a track can directly transit from new to ended state with out transiting to live state.

In such scenarios source will not be connected and no need to fire started event.
Browser can directly fire ended event without firing started event.

Bottom line is the event statement should be modified as

started:    The MediaStreamTrack object has just transitioned from the "new" readyState to live state. This event fires before any other corresponding events such as "ended" or "statechanged", it the track does not transitioned to ended state directly.
Comment 1 Harald Alvestrand 2014-07-01 09:06:26 UTC
At the moment, as the note says, we can't create "new" tracks - when they're returned from getusermedia, they're already "live".

It therefore follows that we cannot attach a listener to the "started" event before the "started" event arrives - so the "started" event is unobservable.

I suggest that we remove the "new" state, the "started" event and all references to it. Newly created tracks are in the "live" state.
Comment 2 Adam Bergkvist 2014-07-03 05:35:54 UTC
I agree with Haralds thinking around this. The way we use MediaStreamTrack in the spec today, the track is basically created with a source. Tracks without sources doesn't seem that fun anyway. :) And we have a way to say that the source doesn't provide any data at the moment (muted), perhaps that covers most cases including a new track when the source is warming up and can't provide data just yet.
Comment 3 Kiran 2014-07-03 06:23:12 UTC
Since we cannot create new tracks directly from java script application.
I agree too for removing new state and started events..
Comment 4 Adam Bergkvist 2014-07-03 06:28:41 UTC
I don't know if we'll keep sourceType, but this change removed sourceType="none" as a consequence.

Proposed fix: https://github.com/fluffy/webrtc-w3c/commit/c8483bc538ca34327fa65365939b596ed2832df5