mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +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.
|
// Update the sink ID whenever we change devices.
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (audioContext && "setSinkId" in audioContext) {
|
if (
|
||||||
|
audioContext &&
|
||||||
|
"setSinkId" in audioContext &&
|
||||||
|
audioOutput.selectedWebDeviceId
|
||||||
|
) {
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/setSinkId
|
// 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.
|
// @ts-expect-error - setSinkId doesn't exist yet in types, maybe because it's not supported everywhere.
|
||||||
audioContext.setSinkId(audioOutput.selectedWebDeviceId).catch((ex) => {
|
audioContext.setSinkId(audioOutput.selectedWebDeviceId).catch((ex) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user