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 25262 - MediaStream Constructor algorithm must also check for MediaStreamTracks "ended" state while initializing "active" state.
Summary: MediaStream Constructor algorithm must also check for MediaStreamTracks "ende...
Status: RESOLVED FIXED
Alias: None
Product: WebRTC Working Group
Classification: Unclassified
Component: Media Capture and Streams (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: public-media-capture@w3.org
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-04 17:10 UTC by Kiran
Modified: 2014-05-08 08:25 UTC (History)
3 users (show)

See Also:


Attachments

Description Kiran 2014-04-04 17:10:44 UTC
MediaStream constructor algorithm (section 4.2) in [1] specifies that

"A MediaStream object is said to be MediaStream.inactive when it does not have any tracks or all tracks belonging to the stream have ended. Otherwise the stream is active."

But step 4 in MediaStream constructor algorithm (section 4.2) is checking only whether streams track set is empty for assigning MediaStreams "active" state to true or false. Since according to correction specified in (#25250)[2] there are chances for a MediaStream to contain ended tracks. So it must also check for MediaStreamTracks ended state while assigning "active" state to true or false.

4. If stream's track set is empty, set stream's active attribute to false, otherwise set it to true.

should be corrected as below

4. If stream's track set is empty or all tracks in track set are ended, set stream's active attribute to false, otherwise set it to true.

[1] http://dev.w3.org/2011/webrtc/editor/getusermedia.html#mediastream
[2] https://www.w3.org/Bugs/Public/show_bug.cgi?id=25250
Comment 1 Adam Bergkvist 2014-04-10 08:10:17 UTC
Kiran's proposal seems right to me.

Proposed fix: https://github.com/fluffy/webrtc-w3c/commit/9f08c60f9cd7140fb439aaf9452593461c53e8e7
Comment 2 Stefan Hakansson LK 2014-05-08 08:25:20 UTC
Fixed in http://dev.w3.org/2011/webrtc/editor/archives/20140507/getusermedia.html