<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>25262</bug_id>
          
          <creation_ts>2014-04-04 17:10:44 +0000</creation_ts>
          <short_desc>MediaStream Constructor algorithm must also check for MediaStreamTracks &quot;ended&quot; state while initializing &quot;active&quot; state.</short_desc>
          <delta_ts>2014-05-08 08:25:20 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebRTC Working Group</product>
          <component>Media Capture and Streams</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kiran">kiran.guduru</reporter>
          <assigned_to name="public-media-capture@w3.org">public-media-capture</assigned_to>
          <cc>adam.bergkvist</cc>
    
    <cc>public-media-capture</cc>
    
    <cc>stefan.lk.hakansson</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103423</commentid>
    <comment_count>0</comment_count>
    <who name="Kiran">kiran.guduru</who>
    <bug_when>2014-04-04 17:10:44 +0000</bug_when>
    <thetext>MediaStream constructor algorithm (section 4.2) in [1] specifies that

&quot;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.&quot;

But step 4 in MediaStream constructor algorithm (section 4.2) is checking only whether streams track set is empty for assigning MediaStreams &quot;active&quot; 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 &quot;active&quot; state to true or false.

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

should be corrected as below

4. If stream&apos;s track set is empty or all tracks in track set are ended, set stream&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103656</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Bergkvist">adam.bergkvist</who>
    <bug_when>2014-04-10 08:10:17 +0000</bug_when>
    <thetext>Kiran&apos;s proposal seems right to me.

Proposed fix: https://github.com/fluffy/webrtc-w3c/commit/9f08c60f9cd7140fb439aaf9452593461c53e8e7</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105411</commentid>
    <comment_count>2</comment_count>
    <who name="Stefan Hakansson LK">stefan.lk.hakansson</who>
    <bug_when>2014-05-08 08:25:20 +0000</bug_when>
    <thetext>Fixed in http://dev.w3.org/2011/webrtc/editor/archives/20140507/getusermedia.html</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>