<?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>25248</bug_id>
          
          <creation_ts>2014-04-03 16:14:38 +0000</creation_ts>
          <short_desc>MediaStreamTrack.stop() should fire ended event.</short_desc>
          <delta_ts>2014-06-25 16:44:43 +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>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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>fluffy</cc>
    
    <cc>harald</cc>
    
    <cc>kiran.guduru</cc>
    
    <cc>public-media-capture</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103359</commentid>
    <comment_count>0</comment_count>
    <who name="Kiran">kiran.guduru</who>
    <bug_when>2014-04-03 16:14:38 +0000</bug_when>
    <thetext>After calling the MediaStreamTrack.stop() method, the text in 4.3.2.2 of [1]
stop mentions to set the readystate attribute to ended. But misses indicating to fire ended event.

The steps should be modified as below (step 4. is the newly added step).

1. Let track be the current MediaStreamTrack object.

2. If track has no source attached (sourceType is &quot;none&quot;) or if the source is provided by an RTCPeerConnection, then abort these steps.

3. Set track&apos;s readyState attribute to ended.

4. Fire a simple event named ended at the track.

5. Detach track&apos;s source.


[1] http://dev.w3.org/2011/webrtc/editor/getusermedia.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103360</commentid>
    <comment_count>1</comment_count>
    <who name="Kiran">kiran.guduru</who>
    <bug_when>2014-04-03 16:16:30 +0000</bug_when>
    <thetext>Sorry for the typo, the section is 4.3.3.2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103554</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Bergkvist">adam.bergkvist</who>
    <bug_when>2014-04-08 08:32:42 +0000</bug_when>
    <thetext>Not firing the event is intentional since the script is explicitly stopping the MediaStreamTrack and the readyState is immediately updated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103555</commentid>
    <comment_count>3</comment_count>
    <who name="Kiran">kiran.guduru</who>
    <bug_when>2014-04-08 08:48:53 +0000</bug_when>
    <thetext>(In reply to Adam Bergkvist from comment #2)
&gt; Not firing the event is intentional since the script is explicitly stopping
&gt; the MediaStreamTrack and the readyState is immediately updated.

In section 8. Event Summary [1], it is specified that, invoking stop() is one of the reasons for firing ended event, which is conflicting to this statement &quot;Not firing the event is intentional&quot;.

So either we have to add this event while stopping 

or

If we don&apos;t want to fire the ended event intentionally, then we have to modify the below statement to avoid conflict.



&quot;The MediaStreamTrack object&apos;s source will no longer provide any data, either because the user revoked the permissions, or because the source device has been ejected, or because the remote peer stopped sending data, or because the stop() method was invoked.&quot;

to

&quot;The MediaStreamTrack object&apos;s source will no longer provide any data, either because the user revoked the permissions, or because the source device has been ejected, or because the remote peer stopped sending data.&quot;



[1] http://dev.w3.org/2011/webrtc/editor/getusermedia.html#event-summary</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103556</commentid>
    <comment_count>4</comment_count>
    <who name="Adam Bergkvist">adam.bergkvist</who>
    <bug_when>2014-04-08 08:55:45 +0000</bug_when>
    <thetext>Good catch. The Event Summary section (non-normative) should be updated to match the rest of the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103651</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Bergkvist">adam.bergkvist</who>
    <bug_when>2014-04-10 07:16:21 +0000</bug_when>
    <thetext>Updated Event Summary section as discussed. Closing as WONTFIX.

https://github.com/fluffy/webrtc-w3c/commit/ae5f96056433023ede3ee2307c868c895947d950</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108102</commentid>
    <comment_count>6</comment_count>
    <who name="Harald Alvestrand">harald</who>
    <bug_when>2014-06-20 06:57:39 +0000</bug_when>
    <thetext>Conclusion has been challenged (duplicate bug).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108104</commentid>
    <comment_count>7</comment_count>
    <who name="Harald Alvestrand">harald</who>
    <bug_when>2014-06-20 06:58:06 +0000</bug_when>
    <thetext>*** Bug 25773 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108337</commentid>
    <comment_count>8</comment_count>
    <who name="Harald Alvestrand">harald</who>
    <bug_when>2014-06-25 16:44:43 +0000</bug_when>
    <thetext>Discussed on telechat June 25. The conclusion was to re-close this as &quot;no change needed&quot; - some arguments exist for adding event firing on close(), some arguments exist against it, but the strength of arguments did not warrant a change.

Note - addTrack has the same difference between &quot;script-caused events&quot; and &quot;non-script-caused events&quot;, and should be consistent with this one.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>