livekit / client-sdk-js

LiveKit browser client SDK (javascript)
https://livekit.io
Apache License 2.0
334 stars 143 forks source link

Fade in/fade out sound in example #1171

Closed kisasexypantera94 closed 2 months ago

kisasexypantera94 commented 2 months ago

Describe the bug

When connecting two peers (one only speaks, the other only listens) on the same machine using the client SDK example, there is a weird pattern where the sound appears and then fades away intermittently. The interval of the pattern is around 300-500ms. The problem is resolved by selecting a different output device on the speaking peer. The same issue occurs on the official demo example at https://meet.livekit.io/?tab=custom.

I could reproduce in Chrome and Firefox but not Safari

Reproduction

Launch example with pnpm install && pnpm sample.

Open two tabs and connect to the same room. Turn off the microphone in the first, mute in the other

Logs

No response

System Info

System:
    OS: macOS 14.5
    CPU: (12) arm64 Apple M3 Pro
    Memory: 2.53 GB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.2.0 - /opt/homebrew/bin/node
    npm: 10.7.0 - /opt/homebrew/bin/npm
    pnpm: 9.4.0 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: 126.0.6478.115
    Safari: 17.5


### Severity

annoyance

### Additional Information

_No response_
kisasexypantera94 commented 2 months ago

Turning off echo-cancellation helped