-
Notifications
You must be signed in to change notification settings - Fork 115
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
pc.getSenders() and getReceivers() include stopped ones. #1975
Comments
I agree with @jan-ivar, I did not expect senders/receivers from stopped transceivers. We can modify the collectSenders/collectReceivers algorithms to say |
Stopped transceivers are kind of useless junk. You can't restart them, you can't reuse them, they're no longer squatting on your media sections even. I'm happy with ignoring them in all cases except getTransceivers. Note: getReceivers() will still return stopped tracks in active transceivers. (can those exist?) |
@alvestrand You mean if someone does pc.getReceiver()[0].track.stop() ...? An odd thing to do. WebRTC doesn't mention this, so according to mediacapture-main, the Since this renders the transceiver useless, should we stop the transceiver from this? |
|
Here's how I'd play pc tracks without any associated streams:
The problem is, EXAMPLE 11 uses:
Unfortunately, the latter and shorter incantation might include stopped receivers I'm not expecting.
Worse,
pc.getReceivers()
offers no easy way to tell whether my receivers are stopped or not.Maybe it should only return non-stopped receivers?
Same question for
pc.getSenders()
.It turns out HTMLVideoElement conveniently ignores ended tracks, so the above still works. But this just seems to bury the surprise even further, and I could see people tripping over this in other situations.
The text was updated successfully, but these errors were encountered: