-
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
Should pc.removeTrack(sender) "reset" sending parameters in the transceiver? #2025
Comments
Firefox keeps previous sender parameters after calling |
we made the sender parameters parameters of the sender, not parameters of the sender/track association. |
Use case:
I could keep original sender parameters before applying simulcast the first time, and then apply those original params later when reusing the sender for screen sharing. But, not sure why, I expect a way to just "reset" it.
Could that be clarified in the spec? |
If you want to know what the original parameters were, you have to keep them. But more likely, you have a specific set of parameters in mind. FWIW, the screencast teams tend to want simulcast too. And neither the video folks nor the screencast folks seem to be at all eager to stop fiddling with the parameters; "reset" to an unknown state is not likely to be useful to them. |
Sure @alvestrand, I agree. The problem is that, for now and regarding sender parameters, there is little to play with in current implementations. |
@ibc Have we answered this question? If so, can we close this issue? |
@aboba the answer is clear to me. But IMHO the spec is unclear (that's why I had to ask it here for clarification). I think that some clarification is needed in the spec. |
I don't see where the spec is unclear here. removeTrack says what it does in detail—sets [[SenderTrack]] and [[Direction]] and triggers negotiationneeded—and it doesn't say anything about resetting sender parameters. I don't think we need to call out what it doesn't do, so I'm closing this. |
I'll explain the "issue" in a different way:
Now let's do this:
...and it happens that Yes, we know that |
You probably meant If your point is that the Btw, thanks for a rockin' WPT test! const pc = new RTCPeerConnection();
const sender1 = pc.addTrack(track, stream);
pc.removeTrack(sender1);
const sender2 = pc.addTrack(track2, stream);
console.log(sender1 === sender2); // true |
Yes, fixed :)
Well, it's |
Yeah, but at least it's deterministic. |
Let's have a video
transceiver
and apply simulcast to itssender
viasender.setParameters(...)
or initially viapc.addTransceiver(track, { sendEncodings: [ ... ] })
.Later we disable the sending video by calling
pc.removeTrack(transceiver.sender)
.And later let's attach the previous or a new video track into the same
transceiver
by usingtransceiver.sender.replaceTrack(newTrack)
.Question: Should
newTrack
be sent with simulcast or not? The current spec doesn't clarify it IMHO and it's something important to know when it comes to reuse atransceiver
for sending new tracks.The text was updated successfully, but these errors were encountered: