New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent setting of receiver.track.readyState violates Mediacapture #1575
Comments
Also, should we fire |
The steps in
Which links to the steps for changing
So, I think all these issues would be fixed if the |
@taylor-b Thanks for finding that! We could also improve the language here to avoid passive language normative references IMHO.
It seems unusual for a method to normatively call out its callers. I'd say this whole paragraph belongs under set an RTCSessionDescription, not under stop(). |
I assume you mean the paragraph that says:
I agree. Both the |
I'll work on a long-overdue PR here. I think firing Sure, a workaround would be to always remember to do pc.getTransceivers().forEach(tc => tc.stop());
pc.close(); ...but that seems like an API bug. |
The remaining issue in #1575 (comment) required a PR, so I added one. With this merged, we'll have the following spec behavior (with a running loop as starting point):
1. Chrome and Firefox have bugs where they don't fire |
Three things wrong: First, the sole mention of track
readyState
in WebRTC is in pc.close():"For every RTCRtpTransceiver transceiver in transceivers, run the following steps:
1. If transceiver's [[Stopped]] slot is true, abort these steps.
2. ...
3. ...
4. ...
5. ...
6. ...
7. Set receiver.track.readyState to "ended"."
This means that while the following makes sense:
...the following makes no sense:
The second wrong thing is
readyState
is a read-only property, thus can't be set, but that's nit.The third wrong thing is not firing the
ended
event here seems to violate the mediacapture spec:"When a MediaStreamTrack track ends for any reason other than the stop() method being invoked, the User Agent MUST queue a task that runs the following steps:
1. ...
2. ...
3. ...
4. Fire a simple event named ended at the object."
The stop() method referred to there is track.stop(), not any other stop().
Should we fire
ended
events on tracks from peer connection ontransceiver.stop()
and/orpc.close()
, or fix mediacapture?The text was updated successfully, but these errors were encountered: