mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-28 11:16:58 +00:00
wip extend device in use error
This commit is contained in:
@@ -22,6 +22,9 @@ import { getOS } from '@/utils/os'
|
|||||||
*/
|
*/
|
||||||
export type MediaPath = 'join_preview' | 'room'
|
export type MediaPath = 'join_preview' | 'room'
|
||||||
|
|
||||||
|
const DEVICE_START_FAILURE =
|
||||||
|
/^(Starting (video|audio)input failed|Timeout starting (video|audio) source)/i
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LiveKit only maps NotReadableError/TrackStartError to DeviceInUse.
|
* LiveKit only maps NotReadableError/TrackStartError to DeviceInUse.
|
||||||
* Firefox reports a device held by another app as
|
* Firefox reports a device held by another app as
|
||||||
@@ -36,7 +39,7 @@ export const getMediaDeviceFailure = (
|
|||||||
if (
|
if (
|
||||||
failure === MediaDeviceFailure.Other &&
|
failure === MediaDeviceFailure.Other &&
|
||||||
error.name === 'AbortError' &&
|
error.name === 'AbortError' &&
|
||||||
/^Starting (video|audio)input failed/i.test(error.message)
|
DEVICE_START_FAILURE.test(error.message)
|
||||||
) {
|
) {
|
||||||
return MediaDeviceFailure.DeviceInUse
|
return MediaDeviceFailure.DeviceInUse
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user