acceptable-dream-85180
08/26/2025, 6:55 PMtall-airline-16756
08/26/2025, 6:55 PMtall-airline-16756
08/26/2025, 6:55 PMwebAudioMix option in LiveKit brings together all audio tracks (both input and output) within the Web Audio API context. So, it’s not just mixing the output sound tracks—it handles everything.
This makes managing audio way easier for both incoming (remote) and outgoing (local) tracks. Plus, it helps tackle those pesky browser autoplay issues and gives you smoother control over audio playback and syncing.
Sources: src/room/Room.tsacceptable-dream-85180
08/26/2025, 6:56 PMtall-airline-16756
08/26/2025, 6:57 PMwebAudioMix in LiveKit is generally safe and stable, but there are a few things to keep in mind:
• Volume control needs to be handled through the setVolume methods on RemoteParticipant or `RemoteAudioTrack`—setting volume directly on HTMLAudioElements won’t work as expected.
• On iOS, the AudioContext starts off in a "suspended" state and needs a user interaction to resume, so audio playback might be delayed or won’t start if this isn’t managed properly.
• Switching audio output devices depends on setSinkId in the AudioContext, but keep in mind this might not be supported in all browsers or setups.
• Using this feature means relying on the Web Audio API, so it’s important to manage the AudioContext lifecycle carefully.
These aren’t big hurdles, but they might mean tweaking your implementation a bit—especially if you’re working with mobile devices or need more advanced audio controls. If you have any questions or need a hand with this, just let me know!
Sources: src/room/track/options.ts | SDK migration from v1 to v2 | LiveKit Docs