@100mslive/hms-video-store 0.13.3-alpha.9 → 0.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IHMSActions.d.ts +8 -1
- package/dist/index.cjs.js +8 -8
- package/dist/index.cjs.js.map +3 -3
- package/dist/index.js +9 -9
- package/dist/index.js.map +3 -3
- package/dist/interfaces/hms.d.ts +2 -1
- package/dist/interfaces/room.d.ts +12 -0
- package/dist/interfaces/transcription-config.d.ts +34 -0
- package/dist/notification-manager/HMSNotifications.d.ts +8 -0
- package/dist/reactive-store/HMSSDKActions.d.ts +1 -0
- package/dist/schema/room.d.ts +6 -1
- package/dist/sdk/index.d.ts +2 -1
- package/dist/sdk/models/HMSRoom.d.ts +5 -1
- package/dist/selectors/selectors.d.ts +21 -0
- package/dist/signal/interfaces/superpowers.d.ts +12 -0
- package/dist/signal/jsonrpc/index.d.ts +2 -1
- package/dist/signal/jsonrpc/models.d.ts +1 -0
- package/package.json +2 -2
package/dist/interfaces/hms.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { HMSHLS, HMSRecording, HMSRTMP, HMSTranscriptionInfo } from './room';
|
|
|
12
12
|
import { RTMPRecordingConfig } from './rtmp-recording-config';
|
|
13
13
|
import { HMSInteractivityCenter, HMSSessionStore } from './session-store';
|
|
14
14
|
import { HMSScreenShareConfig } from './track-settings';
|
|
15
|
-
import { TranscriptionConfig } from './transcription-config';
|
|
15
|
+
import { TranscriptionConfig, TranscriptionConfigUpdate } from './transcription-config';
|
|
16
16
|
import { HMSAudioListener, HMSConnectionQualityListener, HMSUpdateListener } from './update-listener';
|
|
17
17
|
import { HMSAnalyticsLevel } from '../analytics/AnalyticsEventLevel';
|
|
18
18
|
import { IAudioOutputManager } from '../device-manager/AudioOutputManager';
|
|
@@ -57,6 +57,7 @@ export interface HMSInterface {
|
|
|
57
57
|
stopHLSStreaming(params?: StopHLSConfig): Promise<void>;
|
|
58
58
|
startTranscription(params: TranscriptionConfig): Promise<void>;
|
|
59
59
|
stopTranscription(params: TranscriptionConfig): Promise<void>;
|
|
60
|
+
updateTranscriptionConfig(params: TranscriptionConfigUpdate): Promise<void>;
|
|
60
61
|
getRecordingState(): HMSRecording | undefined;
|
|
61
62
|
getRTMPState(): HMSRTMP | undefined;
|
|
62
63
|
getHLSState(): HMSHLS | undefined;
|
|
@@ -112,9 +112,21 @@ export declare enum HMSTranscriptionMode {
|
|
|
112
112
|
export interface HMSTranscriptionInfo {
|
|
113
113
|
state?: HMSTranscriptionState;
|
|
114
114
|
mode?: HMSTranscriptionMode;
|
|
115
|
+
/** Transcription input language (ISO 639-1/BCP 47, e.g. "en", "hi", "auto") */
|
|
116
|
+
language?: string;
|
|
115
117
|
initialised_at?: Date;
|
|
116
118
|
started_at?: Date;
|
|
117
119
|
updated_at?: Date;
|
|
118
120
|
stopped_at?: Date;
|
|
119
121
|
error?: HMSException;
|
|
122
|
+
/** Translation state — populated when biz broadcasts translation info in room state */
|
|
123
|
+
translation?: {
|
|
124
|
+
/** Whether translation is currently active */
|
|
125
|
+
enabled: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Map of role → target language (ISO 639-1/BCP 47).
|
|
128
|
+
* Roles not in this map receive original (untranslated) captions.
|
|
129
|
+
*/
|
|
130
|
+
roleLanguages?: Record<string, string>;
|
|
131
|
+
};
|
|
120
132
|
}
|
|
@@ -1,4 +1,38 @@
|
|
|
1
1
|
import { HMSTranscriptionMode } from './room';
|
|
2
|
+
export interface TranslationConfig {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Map of role name to target language code (ISO 639-1 or IETF BCP 47).
|
|
6
|
+
* Roles not in this map receive original (untranslated) captions.
|
|
7
|
+
* @example { "host": "en", "guest": "es", "viewer": "fr" }
|
|
8
|
+
* @see https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes
|
|
9
|
+
*/
|
|
10
|
+
roleLanguages?: Record<string, string>;
|
|
11
|
+
}
|
|
2
12
|
export interface TranscriptionConfig {
|
|
3
13
|
mode: HMSTranscriptionMode;
|
|
14
|
+
/**
|
|
15
|
+
* Transcription input language in ISO 639-1 or IETF BCP 47 format.
|
|
16
|
+
* Use "auto" for automatic language detection (maps to Deepgram's multi-language mode).
|
|
17
|
+
* @example "en", "en-US", "hi", "auto"
|
|
18
|
+
* @see https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes
|
|
19
|
+
*/
|
|
20
|
+
language?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Translation config — only activates if the template has translation enabled.
|
|
23
|
+
* If not provided, captions are delivered in the original language (no translation).
|
|
24
|
+
*/
|
|
25
|
+
translation?: TranslationConfig;
|
|
26
|
+
}
|
|
27
|
+
export interface TranscriptionConfigUpdate {
|
|
28
|
+
/**
|
|
29
|
+
* Change transcription input language in ISO 639-1 or IETF BCP 47 format.
|
|
30
|
+
* Use "auto" for automatic language detection.
|
|
31
|
+
* Triggers a Deepgram reconnect (~1-2s gap in captions).
|
|
32
|
+
* @example "en", "hi", "auto"
|
|
33
|
+
* @see https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes
|
|
34
|
+
*/
|
|
35
|
+
language?: string;
|
|
36
|
+
/** Toggle translation on/off and optionally update roleLanguages */
|
|
37
|
+
translation?: TranslationConfig;
|
|
4
38
|
}
|
|
@@ -79,6 +79,10 @@ export interface TranscriptionPluginPermissions {
|
|
|
79
79
|
admin?: Array<string>;
|
|
80
80
|
};
|
|
81
81
|
mode: HMSTranscriptionMode;
|
|
82
|
+
translation?: {
|
|
83
|
+
enabled: boolean;
|
|
84
|
+
roleLanguages?: Record<string, string>;
|
|
85
|
+
};
|
|
82
86
|
}
|
|
83
87
|
export interface NoiseCancellationPlugin {
|
|
84
88
|
enabled?: boolean;
|
|
@@ -134,6 +138,10 @@ export interface TranscriptionNotification {
|
|
|
134
138
|
stopped_at?: number;
|
|
135
139
|
peer?: PeerNotificationInfo;
|
|
136
140
|
error?: ServerError;
|
|
141
|
+
translation?: {
|
|
142
|
+
enabled: boolean;
|
|
143
|
+
roleLanguages?: Record<string, string>;
|
|
144
|
+
};
|
|
137
145
|
}
|
|
138
146
|
export interface RoomState {
|
|
139
147
|
name: string;
|
|
@@ -123,6 +123,7 @@ export declare class HMSSDKActions<T extends HMSGenericTypes = {
|
|
|
123
123
|
stopHLSStreaming(params?: sdkTypes.StopHLSConfig): Promise<void>;
|
|
124
124
|
startTranscription(params: sdkTypes.TranscriptionConfig): Promise<void>;
|
|
125
125
|
stopTranscription(params: sdkTypes.TranscriptionConfig): Promise<void>;
|
|
126
|
+
updateTranscriptionConfig(params: sdkTypes.TranscriptionConfigUpdate): Promise<void>;
|
|
126
127
|
sendHLSTimedMetadata(metadataList: sdkTypes.HLSTimedMetadata[]): Promise<void>;
|
|
127
128
|
changeName(name: string): Promise<void>;
|
|
128
129
|
changeMetadata(metadata: string | any): Promise<void>;
|
package/dist/schema/room.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HMSPeerID } from './peer';
|
|
2
|
-
import { HLSVariant, HMSHLS, HMSRecording, HMSRTMP, HMSTranscriptionInfo } from '../interfaces';
|
|
2
|
+
import { HLSVariant, HMSHLS, HMSRecording, HMSRTMP, HMSTranscriptionInfo, HMSTranscriptionMode } from '../interfaces';
|
|
3
3
|
export type { HMSRecording, HMSRTMP, HMSHLS, HLSVariant };
|
|
4
4
|
export declare type HMSRoomID = string;
|
|
5
5
|
/**
|
|
@@ -42,4 +42,9 @@ export interface HMSRoom {
|
|
|
42
42
|
effectsKey?: string;
|
|
43
43
|
isHipaaEnabled?: boolean;
|
|
44
44
|
isNoiseCancellationEnabled?: boolean;
|
|
45
|
+
/** Translation config from template policy. Presence means translation is available. */
|
|
46
|
+
translationConfig?: Record<HMSTranscriptionMode, {
|
|
47
|
+
enabled: boolean;
|
|
48
|
+
roleLanguages?: Record<string, string>;
|
|
49
|
+
}>;
|
|
45
50
|
}
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { HMSPeerListIteratorOptions } from '../interfaces/peer-list-iterator';
|
|
|
14
14
|
import { HMSPreviewListener } from '../interfaces/preview-listener';
|
|
15
15
|
import { RTMPRecordingConfig } from '../interfaces/rtmp-recording-config';
|
|
16
16
|
import { HMSAudioListener, HMSUpdateListener } from '../interfaces/update-listener';
|
|
17
|
-
import { PlaylistManager, TranscriptionConfig } from '../internal';
|
|
17
|
+
import { PlaylistManager, TranscriptionConfig, TranscriptionConfigUpdate } from '../internal';
|
|
18
18
|
import { HMSRemoteTrack, HMSTrackSource, HMSVideoTrack } from '../media/tracks';
|
|
19
19
|
import { DebugInfo } from '../schema';
|
|
20
20
|
import { SessionStore } from '../session-store';
|
|
@@ -144,6 +144,7 @@ export declare class HMSSdk implements HMSInterface {
|
|
|
144
144
|
stopHLSStreaming(params?: StopHLSConfig): Promise<void>;
|
|
145
145
|
startTranscription(params: TranscriptionConfig): Promise<void>;
|
|
146
146
|
stopTranscription(params: TranscriptionConfig): Promise<void>;
|
|
147
|
+
updateTranscriptionConfig(params: TranscriptionConfigUpdate): Promise<void>;
|
|
147
148
|
sendHLSTimedMetadata(metadataList: HLSTimedMetadata[]): Promise<void>;
|
|
148
149
|
changeName(name: string): Promise<void>;
|
|
149
150
|
changeMetadata(metadata: string): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HMSHLS, HMSRecording, HMSRoom, HMSRTMP, HMSTranscriptionInfo } from '../../interfaces/room';
|
|
1
|
+
import { HMSHLS, HMSRecording, HMSRoom, HMSRTMP, HMSTranscriptionInfo, HMSTranscriptionMode } from '../../interfaces/room';
|
|
2
2
|
export default class Room implements HMSRoom {
|
|
3
3
|
id: string;
|
|
4
4
|
joinedAt?: Date | undefined;
|
|
@@ -20,5 +20,9 @@ export default class Room implements HMSRoom {
|
|
|
20
20
|
effectsKey?: string;
|
|
21
21
|
isHipaaEnabled?: boolean;
|
|
22
22
|
isNoiseCancellationEnabled?: boolean;
|
|
23
|
+
translationConfig?: Record<HMSTranscriptionMode, {
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
roleLanguages?: Record<string, string>;
|
|
26
|
+
}>;
|
|
23
27
|
constructor(id: string);
|
|
24
28
|
}
|
|
@@ -440,6 +440,27 @@ export declare const selectTranscriptionsState: import("reselect").OutputSelecto
|
|
|
440
440
|
*/
|
|
441
441
|
sessionStore: Record<string, any>;
|
|
442
442
|
}>, import("../internal").HMSTranscriptionInfo[] | undefined, (res: HMSRoom) => import("../internal").HMSTranscriptionInfo[] | undefined>;
|
|
443
|
+
/**
|
|
444
|
+
* Select the current translation state for captions.
|
|
445
|
+
* Reads runtime state from transcriptions if captions are running,
|
|
446
|
+
* otherwise falls back to template config from translationConfig.
|
|
447
|
+
*
|
|
448
|
+
* @returns `{ available, enabled, roleLanguages }` or `{ available: false }` if not configured
|
|
449
|
+
*/
|
|
450
|
+
export declare const selectTranslationState: import("reselect").OutputSelector<HMSStore<{
|
|
451
|
+
/**
|
|
452
|
+
* It will help to get the all the error
|
|
453
|
+
*/
|
|
454
|
+
sessionStore: Record<string, any>;
|
|
455
|
+
}>, {
|
|
456
|
+
available: boolean;
|
|
457
|
+
enabled: boolean;
|
|
458
|
+
roleLanguages: Record<string, string> | undefined;
|
|
459
|
+
}, (res: HMSRoom) => {
|
|
460
|
+
available: boolean;
|
|
461
|
+
enabled: boolean;
|
|
462
|
+
roleLanguages: Record<string, string> | undefined;
|
|
463
|
+
}>;
|
|
443
464
|
export declare const selectSessionId: import("reselect").OutputSelector<HMSStore<{
|
|
444
465
|
/**
|
|
445
466
|
* It will help to get the all the error
|
|
@@ -50,6 +50,18 @@ export interface UpdatePeerRequestParams {
|
|
|
50
50
|
}
|
|
51
51
|
export interface StartTranscriptionRequestParams {
|
|
52
52
|
mode: HMSTranscriptionMode;
|
|
53
|
+
language?: string;
|
|
54
|
+
translation?: {
|
|
55
|
+
enabled: boolean;
|
|
56
|
+
roleLanguages?: Record<string, string>;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export interface TranscriptionConfigUpdateRequestParams {
|
|
60
|
+
language?: string;
|
|
61
|
+
translation?: {
|
|
62
|
+
enabled: boolean;
|
|
63
|
+
roleLanguages?: Record<string, string>;
|
|
64
|
+
};
|
|
53
65
|
}
|
|
54
66
|
export interface SetSessionMetadataParams {
|
|
55
67
|
key?: string;
|
|
@@ -3,7 +3,7 @@ import { HMSConnectionRole } from '../../connection/model';
|
|
|
3
3
|
import { PeerNotificationInfo, SendMessage } from '../../notification-manager';
|
|
4
4
|
import { LEAVE_REASON } from '../../utils/constants';
|
|
5
5
|
import { Queue } from '../../utils/queue';
|
|
6
|
-
import { AcceptRoleChangeParams, BroadcastResponse, CreateWhiteboardResponse, FindPeerByNameRequestParams, FindPeerByNameResponse, FindPeersRequestParams, GetPeerRequestParams, GetSessionMetadataResponse, GetWhiteboardResponse, HLSRequestParams, HLSTimedMetadataParams, HMSPermissionType, HMSWhiteboardCreateOptions, JoinLeaveGroupResponse, MultiTrackUpdateRequestParams, PeerIterRequestParams, PeersIterationResponse, PollInfoGetParams, PollInfoSetParams, PollLeaderboardGetParams, PollLeaderboardGetResponse, PollListParams, PollListResponse, PollQuestionsGetParams, PollQuestionsGetResponse, PollQuestionsSetParams, PollQuestionsSetResponse, PollResponseSetParams, PollResponseSetResponse, PollResponsesGetParams, PollResponsesGetResponse, PollResultParams, PollResultResponse, PollStartParams, PollStartResponse, PollStopParams, RemovePeerRequest, RequestForBulkRoleChangeParams, RequestForRoleChangeParams, SetSessionMetadataParams, SetSessionMetadataResponse, StartRTMPOrRecordingRequestParams, StartTranscriptionRequestParams, Track, TrackUpdateRequestParams, UpdatePeerRequestParams } from '../interfaces';
|
|
6
|
+
import { AcceptRoleChangeParams, BroadcastResponse, CreateWhiteboardResponse, FindPeerByNameRequestParams, FindPeerByNameResponse, FindPeersRequestParams, GetPeerRequestParams, GetSessionMetadataResponse, GetWhiteboardResponse, HLSRequestParams, HLSTimedMetadataParams, HMSPermissionType, HMSWhiteboardCreateOptions, JoinLeaveGroupResponse, MultiTrackUpdateRequestParams, PeerIterRequestParams, PeersIterationResponse, PollInfoGetParams, PollInfoSetParams, PollLeaderboardGetParams, PollLeaderboardGetResponse, PollListParams, PollListResponse, PollQuestionsGetParams, PollQuestionsGetResponse, PollQuestionsSetParams, PollQuestionsSetResponse, PollResponseSetParams, PollResponseSetResponse, PollResponsesGetParams, PollResponsesGetResponse, PollResultParams, PollResultResponse, PollStartParams, PollStartResponse, PollStopParams, RemovePeerRequest, RequestForBulkRoleChangeParams, RequestForRoleChangeParams, SetSessionMetadataParams, SetSessionMetadataResponse, StartRTMPOrRecordingRequestParams, StartTranscriptionRequestParams, Track, TrackUpdateRequestParams, TranscriptionConfigUpdateRequestParams, UpdatePeerRequestParams } from '../interfaces';
|
|
7
7
|
import { ISignalEventsObserver } from '../ISignalEventsObserver';
|
|
8
8
|
export default class JsonRpcSignal {
|
|
9
9
|
readonly TAG = "[SIGNAL]: ";
|
|
@@ -58,6 +58,7 @@ export default class JsonRpcSignal {
|
|
|
58
58
|
stopHLSStreaming(params?: HLSRequestParams): Promise<void>;
|
|
59
59
|
startTranscription(params: StartTranscriptionRequestParams): Promise<void>;
|
|
60
60
|
stopTranscription(params: StartTranscriptionRequestParams): Promise<void>;
|
|
61
|
+
updateTranscriptionConfig(params: TranscriptionConfigUpdateRequestParams): Promise<void>;
|
|
61
62
|
sendHLSTimedMetadata(params?: HLSTimedMetadataParams): Promise<void>;
|
|
62
63
|
updatePeer(params: UpdatePeerRequestParams): Promise<void>;
|
|
63
64
|
getPeer(params: GetPeerRequestParams): Promise<PeerNotificationInfo | undefined>;
|
|
@@ -38,6 +38,7 @@ export declare enum HMSSignalMethod {
|
|
|
38
38
|
STOP_HLS_STREAMING = "hls-stop",
|
|
39
39
|
START_TRANSCRIPTION = "transcription-start",
|
|
40
40
|
STOP_TRANSCRIPTION = "transcription-stop",
|
|
41
|
+
UPDATE_TRANSCRIPTION_CONFIG = "transcription-config-update",
|
|
41
42
|
HLS_TIMED_METADATA = "hls-timed-metadata",
|
|
42
43
|
SET_METADATA = "set-metadata",
|
|
43
44
|
GET_METADATA = "get-metadata",
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.13.3
|
|
2
|
+
"version": "0.13.3",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"conferencing",
|
|
73
73
|
"100ms"
|
|
74
74
|
],
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "c0f4a6914d590b6b97135191e08498bad314ff2b"
|
|
76
76
|
}
|