diff --git a/src/device/device-management.ts b/src/device/device-management.ts index b38d849..78b2f67 100644 --- a/src/device/device-management.ts +++ b/src/device/device-management.ts @@ -1,4 +1,4 @@ -import { WebrtcCoreError, WebrtcCoreErrorTypes } from '../errors'; +import { WebrtcCoreError, WebrtcCoreErrorType } from '../errors'; import * as media from '../media'; import { LocalCameraStream } from '../media/local-camera-stream'; import { LocalDisplayStream } from '../media/local-display-stream'; @@ -45,7 +45,7 @@ export async function createCameraStream( stream = await media.getUserMedia({ video: { ...constraints } }); } catch (error) { throw new WebrtcCoreError( - WebrtcCoreErrorTypes.CREATE_STREAM_FAILED, + WebrtcCoreErrorType.CREATE_STREAM_FAILED, `Failed to create camera stream: ${error}` ); } @@ -68,7 +68,7 @@ export async function createMicrophoneStream( stream = await media.getUserMedia({ audio: { ...constraints } }); } catch (error) { throw new WebrtcCoreError( - WebrtcCoreErrorTypes.CREATE_STREAM_FAILED, + WebrtcCoreErrorType.CREATE_STREAM_FAILED, `Failed to create microphone stream: ${error}` ); } @@ -101,7 +101,7 @@ export async function createCameraAndMicrophoneStreams< }); } catch (error) { throw new WebrtcCoreError( - WebrtcCoreErrorTypes.CREATE_STREAM_FAILED, + WebrtcCoreErrorType.CREATE_STREAM_FAILED, `Failed to create camera and microphone streams: ${error}` ); } @@ -130,7 +130,7 @@ export async function createDisplayStream( stream = await media.getDisplayMedia({ video: true }); } catch (error) { throw new WebrtcCoreError( - WebrtcCoreErrorTypes.CREATE_STREAM_FAILED, + WebrtcCoreErrorType.CREATE_STREAM_FAILED, `Failed to create display stream: ${error}` ); } @@ -164,7 +164,7 @@ export async function createDisplayStreamWithAudio< stream = await media.getDisplayMedia({ video: true, audio: true }); } catch (error) { throw new WebrtcCoreError( - WebrtcCoreErrorTypes.CREATE_STREAM_FAILED, + WebrtcCoreErrorType.CREATE_STREAM_FAILED, `Failed to create display and system audio streams: ${error}` ); } @@ -198,7 +198,7 @@ export async function getDevices(deviceKind?: media.DeviceKind): Promise