-
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
Need something such as rtpSender.reset() #2087
Comments
@ibc You can set The fundamental problem is that the number of simulcast streams is negotiated in Offer/Answer, so it can't be changed without negotiation and encoding parameters cannot set |
@aboba I don't think that is an elegant approach nor even a workaround. Take into account that some settings such as
I didn't know that |
The Changing It does not seem like there is a way to do this. The |
In summary: do never reuse the same transceiver for sending a new track unless you want to also reuse the very same sending parameters. So SDP semantics are conditioning the WebRTC 1.0 API much more than in my worst dreams... |
not sure if I follow, let's imagine that we are in stable state after SDP O/A negotiation. Then if it could be possible to do something like this, for resetting the transceiver:
|
What @aboba says is that, once first SDP O/A is done, In short: we chose SDP for WebRTC and now we must di... live with it. |
removing the negation, I read that as |
But why do you want to reuse a transceiver like this? I can see wanting to reuse a media section (it's bits on the wire in an SDP description), but a transceiver is just bits in memory. Once you have transceiver.stop(), the media section can be reused for a new transceiver (with a different mid). |
if |
stop() + addTransceiver(track, params) will create a new transceiver. It uses code already present. If you keep the MID, then you're telling the other guy to keep his transceiver, even though it's being renegotiated - which means that you can't change # of layers - which was the original point. again: Why do you think you need this? |
I think this is the key, is it allowed to change the simulcast rids (add or remove) on a re-offer? Not talking about API now, just SDP O/A. |
In my simplified use case, I've a PeerConnection I just use for sending media. I want to send a video track, "close" it, then send a new video track without having to reuse previous RtpSender parameters ( So if I understand your text above, calling |
That's right. The language that permits this is in JSEP section 5.2.2. o If any RtpTransceiver has been added, and there exists an m= |
Thanks @alvestrand. Then we just need I'll close the issue. |
Use case
transceiver
to send a new video, now without simulcast:The problem
According to the spec this is not valid:
So reusing a transceiver becomes a pain because we must "accept" the previously set
encodings
and now we can just "mangle" some of them to accomplish with our new and probably unrelated needs.Yes, of course, weI could initially set 20
encodings
and setactive: false
in most of them, so later we can switch them on/off individually to get the "desired" behavior. This is far from "elegant".Proposal
Have a new
rtpSender.reset()
ortransceiver.resetSender()
method that replaces the previousRtpSender
with a fresh one, without dependencies or settings based on previous usages.Of course, such a
reset()
method should throw if called while the transceiver hasdirection
"sendonly" or "sendrecv".The text was updated successfully, but these errors were encountered: