Conversation
@k0nserv, webrtc git repo commit: webrtc-rs/webrtc@668445c should fix this bug. Use your example and above webrtc git repo commit, the following log shows:
Could you try the latest webrtc git repo? Let me know if it fixed your issue, so I can prepare a new release. Thanks. |
3f1f6e8
to
8efcd62
Compare
Thanks for looking into this. Maybe I am misunderstanding things, but I'd expect Further, if I try to create an offer in response to This is what I'd expect(keep in mind that I haven't read the spec and this could be wrong):
|
So doing some more investigation: We end up in /// NegotiationNeededStateEmpty running and queue
Queue, I feel like the state should be |
Thinking about this more(and reading the Pion source code + the spec) the fix in webrtc-rs/webrtc@668445c does seem correct. But as outlined above it causes problem when negotiation is attempted in response to |
This showcase a problem where using `add_track` to create a new track in response to an incoming track does not trigger negotiation.
fec2496
to
aa8ce38
Compare
I think I've fixed this somewhere |
This is a modified version of the reflect example. Instead of adding the reflected output tracks immediately it waits until the remote track is added and adds the corresponding output track at this point instead.
NOTE: Even if the negotiate callback fired correctly it wouldn't work because the negotiation over the data channel is not implemented.
Lowering the debug log verbosity from
Trace
toDebug
is advisableSteps
Expected behaviour
Adding a new output track in response to an incoming track in
on_track
should cause theon_negotiation_needed
callback to fire. If the data channel was wired up to do the negotiation in response to this it would have have the effect of the code working as intended.Actual behaviour
The
on_negotiation_needed
callback never fires, "Negotiation needed fired" never appears in the log.Environment
M1 Macbook Pro running macOS 12.0.1, Google chrome