Fix crash when setting audio output on Chrome for Android
This commit is contained in:
parent
9444f43c72
commit
e21094b525
1 changed files with 2 additions and 1 deletions
|
@ -55,7 +55,8 @@ export function useMediaStream(stream, audioOutputDevice, mute = false) {
|
||||||
mediaRef.current !== undefined
|
mediaRef.current !== undefined
|
||||||
) {
|
) {
|
||||||
console.log(`useMediaStream setSinkId ${audioOutputDevice}`);
|
console.log(`useMediaStream setSinkId ${audioOutputDevice}`);
|
||||||
mediaRef.current.setSinkId(audioOutputDevice);
|
// Chrome for Android doesn't support this
|
||||||
|
mediaRef.current.setSinkId?.(audioOutputDevice);
|
||||||
}
|
}
|
||||||
}, [audioOutputDevice]);
|
}, [audioOutputDevice]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue