<html>
<head>
<base href="https://bugs.webkit.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - MediaStreamTrack endedEvent fired when RTCPeerConnection connectionState is already RTCPeerConnectionState::Closed"
href="https://bugs.webkit.org/show_bug.cgi?id=235167#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - MediaStreamTrack endedEvent fired when RTCPeerConnection connectionState is already RTCPeerConnectionState::Closed"
href="https://bugs.webkit.org/show_bug.cgi?id=235167">bug 235167</a>
from <span class="vcard"><a class="email" href="mailto:gnavamarino@apple.com" title="Gabriel Nava Marino <gnavamarino@apple.com>"> <span class="fn">Gabriel Nava Marino</span></a>
</span></b>
<pre>Per Youenn's recommendation in the related radar:
We should probably update MediaStreamTrack::trackEnded to queue a task to fire the event instead of firing the event right away.
This matches <a href="https://w3c.github.io/mediacapture-main/#track-ended">https://w3c.github.io/mediacapture-main/#track-ended</a>.
This would allow to remove the activeDOMObjectsAreSuspended/activeDOMObjectsAreStopped checks in that method.
It would also be good to write a corresponding test. internals.simulateMediaStreamTrackCaptureSourceFailure maybe be able to help validate that the event is not fired synchronously.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>