Skip to content

Commit

Permalink
Only check for setSinkId support on AudioContext if webaudiomix is en…
Browse files Browse the repository at this point in the history
…abled (#787)
  • Loading branch information
lukasIO authored Jul 13, 2023
1 parent bf2e4e8 commit df6dad3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tame-drinks-arrive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-client": patch
---

Only check for setSinkId support on AudioContext if webaudiomix is enabled
2 changes: 1 addition & 1 deletion src/room/Room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ class Room extends EventEmitter<RoomEventCallbacks> {
} else if (kind === 'audiooutput') {
if (
(!supportsSetSinkId() && !this.options.expWebAudioMix) ||
(this.audioContext && !('setSinkId' in this.audioContext))
(this.options.expWebAudioMix && this.audioContext && !('setSinkId' in this.audioContext))
) {
throw new Error('cannot switch audio output, setSinkId not supported');
}
Expand Down

0 comments on commit df6dad3

Please sign in to comment.