-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
DataChannel negotiated peer connection's server.AddTrack doesn't always trigger client.OnTrack #2774
Comments
@nicksanford @Sean-Der These changes (pulled from Lines 330 to 334 in 43a6a69
I am trying to assemble a simple reproducer but let me know if you have any thoughts. |
Taking a look now |
So it turns out my patch was partially wrong and this issue is a non-issue. Firing the event handler again after negotiation is already needed is not allowed. This means @nicksanford that if you want to see a negotiation needed event, you must set the handler prior to any background operations happening that could cause the event to fire. |
@streamer45 published https://github.com/pion/webrtc/releases/tag/v3.2.43. let me know if you see the same issue. |
Thanks @edaniels for the incredibly quick turnaround on this! The new changes are working as expected. |
Great! No problem, sorry for the regression! |
No worries. This simply made a bunch of e2e tests fail on our CI, so it was caught pretty early in the process. |
NOTE: This is my first issue/contribution to Pion. I've done my best to follow the contribution guidelines but if I've missed the mark please let me know.
Your environment.
What did you do?
pc.OnOpen
is called on both the client & server, the server creates aNewTrackLocalStaticSample
sending h264, passes it topc.AddTrack
, and starts callingtrackLocal.WriteSample
pc.OnTrack
to be invoked so it can start receiving theRTP
packets written by serverRepro test case: #2775
What did you expect?
The Client's
pc.OnTrack
callback function is always invokedWhat happened?
Sometimes the client's
pc.OnTrack
callback function is not invokedAdditional Notes:
I think the problem might be in peerconnection.go 's
onNegotiationNeeded
state machine which changes states even if theonNegotiationNeededHandler
is not installed. If I uncomment these lines the repro test case doesn't fail.The text was updated successfully, but these errors were encountered: