Skip to content
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

insertDTMF() can race with stopping or sender.replaceTrack(null) #2860

Closed
jan-ivar opened this issue Apr 14, 2023 · 2 comments · Fixed by #2861
Closed

insertDTMF() can race with stopping or sender.replaceTrack(null) #2860

jan-ivar opened this issue Apr 14, 2023 · 2 comments · Fixed by #2861
Assignees

Comments

@jan-ivar
Copy link
Member

The insertDTMF playout task says to: "start playout of tone for [[Duration]] ms on the associated RTP media stream", without checking whether it is able to send. This can race with replaceTrack(null) or even stopping (which happens before stopped).

@jan-ivar
Copy link
Member Author

Even with #2861, it's still not super-deterministic: temporarily setting replaceTrack(null) should stop the tone immediately based on existing "stop sending" language I presume. However, whether the next tone (and the remaining sequence) goes off or not, seems entirely up to to timing. E.g. if the app calls replaceTrack(audioTrack) again with some non-null audio track before the next tone is set to go off, then tones will continue, otherwise they won't. Thoughts?

@jan-ivar
Copy link
Member Author

jan-ivar commented Apr 14, 2023

It would probably be better if tones never resumed in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant