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

Audio tracks don't stop playback when detached after a screen share audio is attached #620

Open
davideberlein opened this issue Mar 17, 2023 · 1 comment

Comments

@davideberlein
Copy link
Contributor

Describe the bug

Overview

Microphone audio tracks continue playing back after calling RemoteTrack.detach() in some circumstances. Only calling RemoteTrack.stop() actually makes us stop hearing audio from other participants being played back.

Reproduction

  1. start a call with 3 participants
  2. participant 1 and 2 have their mic on (no cam)
  3. participant 2 is sharing a chrome tab including audio (obviously not the meeting tab)
  4. participant 3 simply consumes the shared mics and screen sharing audio and video (all in separate audio / video elements)

Now for participant 3:
call detach() on the participant 1 mic track
call detach() on participant 2 mic track
--> expectation: you don’t here any mics anymore
--> actual result: you still hear the audio from the mics
3. call detach on the screen share audio track
--> suddenly the mics aren’t played back anymore

Logs

No response

System Info

- Mac OS 13.1 / Windows 11
- Chrome 110 / 111, also reproducible on Edge

Severity

serious, but I can work around it

Additional Information

If I do the same steps as for the reproduction but call track.attachedElements[0].pause() instead of detach they stop playing back one by one as I pause them.
Also if stop() is called after the track is detached the playback also stops. Be aware that you need to call start() again before attach()ing it again.

@lukasIO
Copy link
Contributor

lukasIO commented Mar 22, 2023

thanks for the report!
I tried to reproduce this but having trouble doing so.
Could you check whether audioElement.srcObject is still set to a mediaStreamTrack when you hear participants after detaching? it should be null / undefined.
And log track.attachedElements as well just to have an idea of what that looks like (after detach).

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

No branches or pull requests

2 participants