-
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
Reconsider replaceTrack's blocking on the operations queue. #3017
Comments
Fails on Chrome (if I read it correctly). |
I can't seem to find a case where this matters in any browser. https://jsfiddle.net/jib1/Ltsed06f/10 creates a transceiver with a null track, but waits for replaceTrack(track) to finish before first negotiation, yet the msid line does not contain that late-added track's id (it contains a random id instead). Firefox always creates a random track id in the msid, unless you set |
actually stream ids is the part of msid that is not random these days. |
Right, and replaceTrack does not alter stream ids.
That's strange, it WFM. Here's a version without the msid filter and without adapter: https://jsfiddle.net/jib1/Ltsed06f/13/ await pc1.setLocalDescription();
pc1.localDescription.sdp
.split('\r\n')
.slice(1)
.forEach(l => console.log(l)); If you see a bug in it please LMK. |
This issue had an associated resolution in WebRTC November 19 2024 meeting – 19 November 2024 (Issue #3017: Reconsider replaceTrack's blocking on the operations queue):
|
replaceTrack says: "6. Return the result of chaining the following steps to connection's operations chain:"
We don't have a test for this so I wrote one. Firefox and Safari pass, but Chrome fails it:
This suggests Chrome is doing the remaining steps right away rather than chaining them on the operations chain. This timing difference might cause subtle interop problems.
The Chrome behavior has some advantages, like negotiation not being able to interfere with (delay) replaceTrack.
This begs the question what this was supposed to solve in the first place.
In #1769 back in 2018, we seemed preoccupied with updating
sender.track
in time for createOffer or createAnswer. Presumably this mattered for track ids in thea=msid
at the time. Since then, it's understood that using track ids to "correlate local and remote tracks" no longer works. So this reason no longer seems to hold.I propose we remove this requirement and align with Chrome's behavior.
The text was updated successfully, but these errors were encountered: