You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered a case where on_negotiation_needed fires and if you negotiate as a consequence of that and endless offer answer loop will occur.
Reproduction steps
Browser sends an offer
Server sends an answer
Optionally step 1 and 2 happen a few times, for example by first negotiating a data channel and then a video track(Video track is sendonly on the browser side and recvonly on the server side).
We remove the video track with removeTrack in the browser
The connection status reach "stable" on the server side.
on_negotiation_needed fires
We create an offer and perform a negotiation
Go to step 8.
As we loop in step 8 and 9 the only thing that will differ for each offer and answer is the o= line, this is according to the specification.
Details
My assumption here is that after step 7 we don't expect on_negotiation_needed to fire, as evident by the fact that there is no meaningful change to the generated offer.
The reason we keep firing on_negotiation_needed is that the check in check_negotiation_needed that corresponds to step 5.4 of the check if negotiation needed process indicates we should negotiate.
The transceiver in question is stopped because we stop it when the remote description is applied with an inactive direction:
It strikes me that a local fix here could be to generate an offer, then diff it against the current local description, and stop the negotiation if only the o= line differs.
The text was updated successfully, but these errors were encountered:
An "m=" section is generated for each RtpTransceiver that has been added to the PeerConnection, excluding any stopped RtpTransceivers;(...)
But webrtc-rs includes the m= lines for this transceiver which causes this problem. That said, I don't think the transceiver should be stopped at all when its direction becomes inactive.
I've encountered a case where
on_negotiation_needed
fires and if you negotiate as a consequence of that and endless offer answer loop will occur.Reproduction steps
sendonly
on the browser side andrecvonly
on the server side).removeTrack
in the browseron_negotiation_needed
firesAs we loop in step 8 and 9 the only thing that will differ for each offer and answer is the
o=
line, this is according to the specification.Details
My assumption here is that after step 7 we don't expect
on_negotiation_needed
to fire, as evident by the fact that there is no meaningful change to the generated offer.The reason we keep firing
on_negotiation_needed
is that the check incheck_negotiation_needed
that corresponds to step 5.4 of the check if negotiation needed process indicates we should negotiate.The transceiver in question is stopped because we stop it when the remote description is applied with an
inactive
direction:webrtc/src/peer_connection/mod.rs
Line 1315 in de83067
Workaround
It strikes me that a local fix here could be to generate an offer, then diff it against the current local description, and stop the negotiation if only the
o=
line differs.The text was updated successfully, but these errors were encountered: