mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-19 06:20:25 +00:00
one more try
This commit is contained in:
@@ -110,7 +110,11 @@ export function useAudioContext<S extends string>(
|
||||
|
||||
// Update the sink ID whenever we change devices.
|
||||
useEffect(() => {
|
||||
if (audioContext && "setSinkId" in audioContext) {
|
||||
if (
|
||||
audioContext &&
|
||||
"setSinkId" in audioContext &&
|
||||
audioOutput.selectedWebDeviceId
|
||||
) {
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/setSinkId
|
||||
// @ts-expect-error - setSinkId doesn't exist yet in types, maybe because it's not supported everywhere.
|
||||
audioContext.setSinkId(audioOutput.selectedWebDeviceId).catch((ex) => {
|
||||
|
||||
Reference in New Issue
Block a user