diff --git a/packages/hms-video-store/src/interfaces/room.ts b/packages/hms-video-store/src/interfaces/room.ts index a67204ccde..db861e0725 100644 --- a/packages/hms-video-store/src/interfaces/room.ts +++ b/packages/hms-video-store/src/interfaces/room.ts @@ -123,6 +123,7 @@ export interface HLSVariant { Transcription related details */ export enum HMSTranscriptionState { + INITIALISED = 'initialised', STARTED = 'started', STOPPED = 'stopped', FAILED = 'failed', diff --git a/packages/hms-video-store/src/notification-manager/HMSNotifications.ts b/packages/hms-video-store/src/notification-manager/HMSNotifications.ts index a30e663cbb..34818e72e3 100644 --- a/packages/hms-video-store/src/notification-manager/HMSNotifications.ts +++ b/packages/hms-video-store/src/notification-manager/HMSNotifications.ts @@ -62,6 +62,7 @@ export enum HMSStreamingState { } export enum HMSTranscriptionState { + INITIALISED = 'initialised', STARTED = 'started', STOPPED = 'stopped', FAILED = 'failed', diff --git a/packages/hms-video-store/src/reactive-store/HMSSDKActions.ts b/packages/hms-video-store/src/reactive-store/HMSSDKActions.ts index fdc550e98a..2fbff74954 100644 --- a/packages/hms-video-store/src/reactive-store/HMSSDKActions.ts +++ b/packages/hms-video-store/src/reactive-store/HMSSDKActions.ts @@ -701,11 +701,11 @@ export class HMSSDKActions { + async stopTranscription(params: sdkTypes.TranscriptionConfig): Promise { await this.sdk.stopTranscription(params); } diff --git a/packages/hms-video-store/src/sdk/index.ts b/packages/hms-video-store/src/sdk/index.ts index 35bf656937..2e4679323f 100644 --- a/packages/hms-video-store/src/sdk/index.ts +++ b/packages/hms-video-store/src/sdk/index.ts @@ -1013,27 +1013,24 @@ export class HMSSdk implements HMSInterface { await this.transport?.signal.stopHLSStreaming(); } - async startTranscription(params?: TranscriptionConfig) { + async startTranscription(params: TranscriptionConfig) { if (!this.localPeer) { throw ErrorFactory.GenericErrors.NotConnected( HMSAction.VALIDATION, - 'No local peer present, cannot start HLS streaming', + 'No local peer present, cannot start transcriptions', ); } - if (!params) { - throw ErrorFactory.GenericErrors.Signalling(HMSAction.VALIDATION, 'No mode is passed to start the transcription'); - } const transcriptionParams: StartTranscriptionRequestParams = { mode: params.mode, }; await this.transport?.signal.startTranscription(transcriptionParams); } - async stopTranscription(params?: TranscriptionConfig) { + async stopTranscription(params: TranscriptionConfig) { if (!this.localPeer) { throw ErrorFactory.GenericErrors.NotConnected( HMSAction.VALIDATION, - 'No local peer present, cannot stop HLS streaming', + 'No local peer present, cannot stop transcriptions', ); } if (!params) {