From 02b6a6201b2c7fbb9291e5e429f0829e58e9c62d Mon Sep 17 00:00:00 2001 From: Bryce Tham Date: Tue, 12 Dec 2023 09:44:43 -0500 Subject: [PATCH] fix: rename error type enum --- src/device/device-management.ts | 14 +++++++------- src/errors.ts | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) 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