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

[Network] Improve internal audio on/off handling #95

Open
dai-shi opened this issue May 3, 2020 · 1 comment
Open

[Network] Improve internal audio on/off handling #95

dai-shi opened this issue May 3, 2020 · 1 comment
Labels
enhancement New feature or request Size L Large size web app For src/web

Comments

@dai-shi
Copy link
Owner

dai-shi commented May 3, 2020

Currently, audio track is added regardless of "Mic On" flag, which allows users to speak instantly after they enable the mic.
This is done by track.enabled = true/false. ref: https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack

It looks like even if the track is not enabled, the RTCSender transmits some bytes. Can we improve it by using sender.replaceTrack instead? How can we make an empty audio track at the start?

@dai-shi dai-shi added enhancement New feature or request web app For src/web Size L Large size labels May 3, 2020
@dai-shi
Copy link
Owner Author

dai-shi commented May 6, 2020

new AudioContext().createMediaStreamDestination().stream;

to create an empty audio stream.

We could use Audio API to create stream/track, instead of sender.replaceTrack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Size L Large size web app For src/web
Projects
None yet
Development

No branches or pull requests

1 participant