@100mslive/react-native-hms 0.7.4 → 0.8.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/README.md +37 -39
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.project +8 -2
- package/android/build.gradle +1 -2
- package/android/src/main/java/com/reactnativehmssdk/HmsDecoder.kt +268 -232
- package/android/src/main/java/com/reactnativehmssdk/HmsHelper.kt +122 -12
- package/android/src/main/java/com/reactnativehmssdk/HmsModule.kt +143 -519
- package/android/src/main/java/com/reactnativehmssdk/HmsSDK.kt +940 -0
- package/android/src/main/java/com/reactnativehmssdk/HmsView.kt +34 -22
- package/android/src/main/java/com/reactnativehmssdk/HmssdkPackage.kt +1 -2
- package/android/src/main/java/com/reactnativehmssdk/HmssdkViewManager.kt +9 -13
- package/ios/HmsDecoder.swift +168 -33
- package/ios/HmsHelper.swift +121 -1
- package/ios/HmsManager.m +20 -14
- package/ios/HmsManager.swift +125 -398
- package/ios/HmsSDK.swift +784 -0
- package/ios/HmsView.swift +16 -8
- package/lib/commonjs/classes/HMSAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioTrackSettings.js +3 -0
- package/lib/commonjs/classes/HMSAudioTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSBrowserRecordingState.js +23 -0
- package/lib/commonjs/classes/HMSBrowserRecordingState.js.map +1 -0
- package/lib/commonjs/classes/HMSCameraFacing.js +14 -0
- package/lib/commonjs/classes/HMSCameraFacing.js.map +1 -0
- package/lib/commonjs/classes/HMSConfig.js +3 -7
- package/lib/commonjs/classes/HMSConfig.js.map +1 -1
- package/lib/commonjs/classes/HMSEncoder.js +65 -35
- package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
- package/lib/commonjs/classes/HMSException.js +30 -0
- package/lib/commonjs/classes/HMSException.js.map +1 -0
- package/lib/commonjs/classes/HMSHelper.js +2 -2
- package/lib/commonjs/classes/HMSHelper.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalAudioTrack.js +39 -1
- package/lib/commonjs/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalVideoTrack.js +28 -2
- package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLogger.js +28 -1
- package/lib/commonjs/classes/HMSLogger.js.map +1 -1
- package/lib/commonjs/classes/HMSPeer.js +3 -0
- package/lib/commonjs/classes/HMSPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSPeerUpdate.js +1 -0
- package/lib/commonjs/classes/HMSPeerUpdate.js.map +1 -1
- package/lib/commonjs/classes/HMSPermissions.js +6 -0
- package/lib/commonjs/classes/HMSPermissions.js.map +1 -1
- package/lib/commonjs/classes/HMSRTMPConfig.js +26 -0
- package/lib/commonjs/classes/HMSRTMPConfig.js.map +1 -0
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js +21 -0
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRemotePeer.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js +21 -0
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRoom.js +9 -0
- package/lib/commonjs/classes/HMSRoom.js.map +1 -1
- package/lib/commonjs/classes/HMSRtmpStreamingState.js +23 -0
- package/lib/commonjs/classes/HMSRtmpStreamingState.js.map +1 -0
- package/lib/commonjs/classes/HMSSDK.js +399 -150
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HMSServerRecordingState.js +23 -0
- package/lib/commonjs/classes/HMSServerRecordingState.js.map +1 -0
- package/lib/commonjs/classes/HMSTrack.js +8 -18
- package/lib/commonjs/classes/HMSTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackSettings.js +3 -0
- package/lib/commonjs/classes/HMSTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackType.js +14 -0
- package/lib/commonjs/classes/HMSTrackType.js.map +1 -0
- package/lib/commonjs/classes/HMSVideoCodec.js +4 -4
- package/lib/commonjs/classes/HMSVideoCodec.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoResolution.js +23 -0
- package/lib/commonjs/classes/HMSVideoResolution.js.map +1 -0
- package/lib/commonjs/classes/HMSVideoSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrack.js +2 -0
- package/lib/commonjs/classes/HMSVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrackSettings.js +0 -3
- package/lib/commonjs/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HmsView.js +10 -7
- package/lib/commonjs/classes/HmsView.js.map +1 -1
- package/lib/commonjs/index.js +112 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/classes/HMSAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSAudioTrackSettings.js +3 -0
- package/lib/module/classes/HMSAudioTrackSettings.js.map +1 -1
- package/lib/module/classes/HMSBrowserRecordingState.js +14 -0
- package/lib/module/classes/HMSBrowserRecordingState.js.map +1 -0
- package/lib/module/classes/HMSCameraFacing.js +7 -0
- package/lib/module/classes/HMSCameraFacing.js.map +1 -0
- package/lib/module/classes/HMSConfig.js +3 -7
- package/lib/module/classes/HMSConfig.js.map +1 -1
- package/lib/module/classes/HMSEncoder.js +64 -35
- package/lib/module/classes/HMSEncoder.js.map +1 -1
- package/lib/module/classes/HMSException.js +21 -0
- package/lib/module/classes/HMSException.js.map +1 -0
- package/lib/module/classes/HMSHelper.js +2 -2
- package/lib/module/classes/HMSHelper.js.map +1 -1
- package/lib/module/classes/HMSLocalAudioTrack.js +37 -2
- package/lib/module/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSLocalPeer.js.map +1 -1
- package/lib/module/classes/HMSLocalVideoTrack.js +25 -2
- package/lib/module/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSLogger.js +28 -1
- package/lib/module/classes/HMSLogger.js.map +1 -1
- package/lib/module/classes/HMSPeer.js +3 -0
- package/lib/module/classes/HMSPeer.js.map +1 -1
- package/lib/module/classes/HMSPeerUpdate.js +1 -0
- package/lib/module/classes/HMSPeerUpdate.js.map +1 -1
- package/lib/module/classes/HMSPermissions.js +6 -0
- package/lib/module/classes/HMSPermissions.js.map +1 -1
- package/lib/module/classes/HMSRTMPConfig.js +17 -0
- package/lib/module/classes/HMSRTMPConfig.js.map +1 -0
- package/lib/module/classes/HMSRemoteAudioTrack.js +18 -0
- package/lib/module/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSRemotePeer.js.map +1 -1
- package/lib/module/classes/HMSRemoteVideoTrack.js +18 -0
- package/lib/module/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSRoom.js +9 -0
- package/lib/module/classes/HMSRoom.js.map +1 -1
- package/lib/module/classes/HMSRtmpStreamingState.js +14 -0
- package/lib/module/classes/HMSRtmpStreamingState.js.map +1 -0
- package/lib/module/classes/HMSSDK.js +388 -150
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HMSServerRecordingState.js +14 -0
- package/lib/module/classes/HMSServerRecordingState.js.map +1 -0
- package/lib/module/classes/HMSTrack.js +8 -16
- package/lib/module/classes/HMSTrack.js.map +1 -1
- package/lib/module/classes/HMSTrackSettings.js +3 -0
- package/lib/module/classes/HMSTrackSettings.js.map +1 -1
- package/lib/module/classes/HMSTrackType.js +7 -0
- package/lib/module/classes/HMSTrackType.js.map +1 -0
- package/lib/module/classes/HMSVideoCodec.js +4 -4
- package/lib/module/classes/HMSVideoCodec.js.map +1 -1
- package/lib/module/classes/HMSVideoResolution.js +14 -0
- package/lib/module/classes/HMSVideoResolution.js.map +1 -0
- package/lib/module/classes/HMSVideoSettings.js.map +1 -1
- package/lib/module/classes/HMSVideoTrack.js +2 -0
- package/lib/module/classes/HMSVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSVideoTrackSettings.js +0 -3
- package/lib/module/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/module/classes/HmsView.js +10 -7
- package/lib/module/classes/HmsView.js.map +1 -1
- package/lib/module/index.js +8 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/classes/HMSAudioTrack.d.ts +3 -0
- package/lib/typescript/classes/HMSAudioTrackSettings.d.ts +3 -0
- package/lib/typescript/classes/HMSBrowserRecordingState.d.ts +9 -0
- package/lib/typescript/classes/HMSCameraFacing.d.ts +4 -0
- package/lib/typescript/classes/HMSConfig.d.ts +2 -4
- package/lib/typescript/classes/HMSEncoder.d.ts +14 -12
- package/lib/typescript/classes/HMSException.d.ts +22 -0
- package/lib/typescript/classes/HMSLocalAudioTrack.d.ts +5 -0
- package/lib/typescript/classes/HMSLocalPeer.d.ts +6 -0
- package/lib/typescript/classes/HMSLocalVideoTrack.d.ts +4 -0
- package/lib/typescript/classes/HMSLogger.d.ts +11 -4
- package/lib/typescript/classes/HMSPeer.d.ts +2 -0
- package/lib/typescript/classes/HMSPeerUpdate.d.ts +1 -0
- package/lib/typescript/classes/HMSPermissions.d.ts +4 -0
- package/lib/typescript/classes/HMSRTMPConfig.d.ts +10 -0
- package/lib/typescript/classes/HMSRemoteAudioTrack.d.ts +4 -0
- package/lib/typescript/classes/HMSRemotePeer.d.ts +3 -0
- package/lib/typescript/classes/HMSRemoteVideoTrack.d.ts +4 -0
- package/lib/typescript/classes/HMSRoom.d.ts +9 -0
- package/lib/typescript/classes/HMSRtmpStreamingState.d.ts +9 -0
- package/lib/typescript/classes/HMSSDK.d.ts +40 -11
- package/lib/typescript/classes/HMSServerRecordingState.d.ts +9 -0
- package/lib/typescript/classes/HMSTrack.d.ts +6 -1
- package/lib/typescript/classes/HMSTrackSettings.d.ts +2 -0
- package/lib/typescript/classes/HMSTrackType.d.ts +4 -0
- package/lib/typescript/classes/HMSVideoCodec.d.ts +4 -4
- package/lib/typescript/classes/HMSVideoResolution.d.ts +8 -0
- package/lib/typescript/classes/HMSVideoSettings.d.ts +3 -3
- package/lib/typescript/classes/HMSVideoTrack.d.ts +5 -1
- package/lib/typescript/classes/HMSVideoTrackSettings.d.ts +13 -10
- package/lib/typescript/classes/HmsView.d.ts +2 -1
- package/lib/typescript/index.d.ts +8 -0
- package/package.json +1 -1
- package/src/classes/HMSAudioTrack.ts +3 -0
- package/src/classes/HMSAudioTrackSettings.ts +9 -1
- package/src/classes/HMSBrowserRecordingState.ts +11 -0
- package/src/classes/HMSCameraFacing.ts +4 -0
- package/src/classes/HMSConfig.ts +3 -7
- package/src/classes/HMSEncoder.ts +64 -28
- package/src/classes/HMSException.ts +33 -0
- package/src/classes/HMSHelper.ts +2 -2
- package/src/classes/HMSLocalAudioTrack.ts +35 -2
- package/src/classes/HMSLocalPeer.ts +6 -0
- package/src/classes/HMSLocalVideoTrack.ts +22 -2
- package/src/classes/HMSLogger.ts +19 -6
- package/src/classes/HMSPeer.ts +3 -0
- package/src/classes/HMSPeerUpdate.ts +1 -0
- package/src/classes/HMSPermissions.ts +6 -0
- package/src/classes/HMSRTMPConfig.ts +15 -0
- package/src/classes/HMSRemoteAudioTrack.ts +29 -2
- package/src/classes/HMSRemotePeer.ts +3 -0
- package/src/classes/HMSRemoteVideoTrack.ts +29 -2
- package/src/classes/HMSRoom.ts +12 -0
- package/src/classes/HMSRtmpStreamingState.ts +11 -0
- package/src/classes/{HMSSDK.ts → HMSSDK.tsx} +332 -98
- package/src/classes/HMSServerRecordingState.ts +11 -0
- package/src/classes/HMSTrack.ts +9 -15
- package/src/classes/HMSTrackSettings.ts +3 -0
- package/src/classes/HMSTrackType.ts +4 -0
- package/src/classes/HMSVideoCodec.ts +4 -4
- package/src/classes/HMSVideoResolution.ts +9 -0
- package/src/classes/HMSVideoSettings.ts +3 -3
- package/src/classes/HMSVideoTrack.ts +6 -1
- package/src/classes/HMSVideoTrackSettings.ts +13 -10
- package/src/classes/HmsView.tsx +4 -0
- package/src/index.ts +8 -0
- package/ios/Hmssdk.m +0 -8
- package/ios/Hmssdk.swift +0 -8
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NativeEventEmitter, NativeModules, ViewStyle } from 'react-native';
|
|
2
3
|
import { HMSUpdateListenerActions } from './HMSUpdateListenerActions';
|
|
3
4
|
import type { HMSConfig } from './HMSConfig';
|
|
4
5
|
import type { HMSLocalPeer } from './HMSLocalPeer';
|
|
@@ -9,7 +10,22 @@ import { HMSEncoder } from './HMSEncoder';
|
|
|
9
10
|
import { HMSMessage } from './HMSMessage';
|
|
10
11
|
import { HMSHelper } from './HMSHelper';
|
|
11
12
|
import type { HMSTrack } from './HMSTrack';
|
|
13
|
+
import type { HMSTrackType } from './HMSTrackType';
|
|
12
14
|
import type { HMSLogger } from './HMSLogger';
|
|
15
|
+
import type { HMSPeer } from './HMSPeer';
|
|
16
|
+
import { HmsView as HMSViewComponent } from './HmsView';
|
|
17
|
+
import { HMSVideoViewMode } from './HMSVideoViewMode';
|
|
18
|
+
import type { HMSTrackSettings } from './HMSTrackSettings';
|
|
19
|
+
import type { HMSRTMPConfig } from './HMSRTMPConfig';
|
|
20
|
+
|
|
21
|
+
interface HmsComponentProps {
|
|
22
|
+
trackId: string;
|
|
23
|
+
sink: boolean;
|
|
24
|
+
style: ViewStyle;
|
|
25
|
+
mirror?: boolean;
|
|
26
|
+
scaleType: HMSVideoViewMode;
|
|
27
|
+
id?: string | null;
|
|
28
|
+
}
|
|
13
29
|
|
|
14
30
|
const {
|
|
15
31
|
/**
|
|
@@ -22,12 +38,15 @@ const HmsEventEmitter = new NativeEventEmitter(HmsManager);
|
|
|
22
38
|
|
|
23
39
|
let HmsSdk: HMSSDK | undefined;
|
|
24
40
|
|
|
41
|
+
let logger: HMSLogger | undefined;
|
|
42
|
+
|
|
25
43
|
export class HMSSDK {
|
|
26
44
|
room?: HMSRoom;
|
|
27
45
|
localPeer?: HMSLocalPeer;
|
|
28
46
|
remotePeers?: HMSRemotePeer[];
|
|
29
47
|
knownRoles?: HMSRole[];
|
|
30
|
-
|
|
48
|
+
id: string;
|
|
49
|
+
private muteStatus: boolean | undefined;
|
|
31
50
|
|
|
32
51
|
onPreviewDelegate?: any;
|
|
33
52
|
onJoinDelegate?: any;
|
|
@@ -43,6 +62,10 @@ export class HMSSDK {
|
|
|
43
62
|
onChangeTrackStateRequestDelegate?: any;
|
|
44
63
|
onRemovedFromRoomDelegate?: any;
|
|
45
64
|
|
|
65
|
+
constructor(id: string) {
|
|
66
|
+
this.id = id;
|
|
67
|
+
}
|
|
68
|
+
|
|
46
69
|
/**
|
|
47
70
|
* - Returns an instance of [HMSSDK]{@link HMSSDK}
|
|
48
71
|
* - This function must be called to get an instance of HMSSDK class and only then user can interact with its methods
|
|
@@ -51,15 +74,27 @@ export class HMSSDK {
|
|
|
51
74
|
* @returns
|
|
52
75
|
* @memberof HMSSDK
|
|
53
76
|
*/
|
|
54
|
-
static build() {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
HmsSdk = new HMSSDK();
|
|
77
|
+
static async build(params?: { trackSettings?: HMSTrackSettings }) {
|
|
78
|
+
let id = await HmsManager.build(params?.trackSettings || {});
|
|
79
|
+
HmsSdk = new HMSSDK(id);
|
|
80
|
+
HmsSdk.attachPreviewListener();
|
|
81
|
+
HmsSdk.attachListeners();
|
|
60
82
|
return HmsSdk;
|
|
61
83
|
}
|
|
62
84
|
|
|
85
|
+
static getLogger() {
|
|
86
|
+
return logger;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
setLogger = (hmsLogger: HMSLogger) => {
|
|
90
|
+
logger = hmsLogger;
|
|
91
|
+
hmsLogger.verbose('#Function setLogger', { id: this.id });
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
destroy = () => {
|
|
95
|
+
this.removeListeners();
|
|
96
|
+
};
|
|
97
|
+
|
|
63
98
|
attachPreviewListener = () => {
|
|
64
99
|
HmsEventEmitter.addListener(
|
|
65
100
|
HMSUpdateListenerActions.ON_PREVIEW,
|
|
@@ -199,15 +234,32 @@ export class HMSSDK {
|
|
|
199
234
|
* @memberof HMSSDK
|
|
200
235
|
*/
|
|
201
236
|
join = async (config: HMSConfig) => {
|
|
202
|
-
|
|
203
|
-
this.
|
|
204
|
-
await HmsManager.join(config);
|
|
237
|
+
logger?.verbose('#Function join', { config, id: this.id });
|
|
238
|
+
await HmsManager.join({ ...config, id: this.id });
|
|
205
239
|
};
|
|
206
240
|
|
|
207
241
|
preview = (config: HMSConfig) => {
|
|
208
|
-
|
|
209
|
-
this.
|
|
210
|
-
|
|
242
|
+
logger?.verbose('#Function preview', { config, id: this.id });
|
|
243
|
+
HmsManager.preview({ ...config, id: this.id });
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
HmsView = ({
|
|
247
|
+
sink,
|
|
248
|
+
trackId,
|
|
249
|
+
style,
|
|
250
|
+
mirror,
|
|
251
|
+
scaleType = HMSVideoViewMode.ASPECT_FIT,
|
|
252
|
+
}: HmsComponentProps) => {
|
|
253
|
+
return (
|
|
254
|
+
<HMSViewComponent
|
|
255
|
+
sink={sink}
|
|
256
|
+
trackId={trackId}
|
|
257
|
+
style={style}
|
|
258
|
+
mirror={mirror}
|
|
259
|
+
scaleType={scaleType}
|
|
260
|
+
id={this.id}
|
|
261
|
+
/>
|
|
262
|
+
);
|
|
211
263
|
};
|
|
212
264
|
|
|
213
265
|
/**
|
|
@@ -215,87 +267,199 @@ export class HMSSDK {
|
|
|
215
267
|
*
|
|
216
268
|
* @memberof HMSSDK
|
|
217
269
|
*/
|
|
218
|
-
leave = () => {
|
|
219
|
-
|
|
270
|
+
leave = async () => {
|
|
271
|
+
logger?.verbose('#Function leave', { id: this.id });
|
|
272
|
+
const data = {
|
|
273
|
+
id: this.id,
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
const op = await HmsManager.leave(data);
|
|
277
|
+
this.muteStatus = undefined;
|
|
220
278
|
this.localPeer = undefined;
|
|
221
279
|
this.remotePeers = undefined;
|
|
222
280
|
this.room = undefined;
|
|
223
281
|
this.knownRoles = undefined;
|
|
224
|
-
|
|
225
|
-
HmsManager.leave();
|
|
282
|
+
return op;
|
|
226
283
|
};
|
|
227
284
|
|
|
228
|
-
sendBroadcastMessage = (message: string, type?: string) => {
|
|
229
|
-
|
|
230
|
-
|
|
285
|
+
sendBroadcastMessage = async (message: string, type?: string) => {
|
|
286
|
+
logger?.verbose('#Function sendBroadcastMessage', {
|
|
287
|
+
message,
|
|
288
|
+
type: type || null,
|
|
289
|
+
id: this.id,
|
|
290
|
+
});
|
|
291
|
+
return await HmsManager.sendBroadcastMessage({
|
|
292
|
+
message,
|
|
293
|
+
type: type || null,
|
|
294
|
+
id: this.id,
|
|
295
|
+
});
|
|
231
296
|
};
|
|
232
297
|
|
|
233
|
-
sendGroupMessage = (
|
|
234
|
-
|
|
235
|
-
|
|
298
|
+
sendGroupMessage = async (
|
|
299
|
+
message: string,
|
|
300
|
+
roles: HMSRole[],
|
|
301
|
+
type?: string
|
|
302
|
+
) => {
|
|
303
|
+
logger?.verbose('#Function sendGroupMessage', {
|
|
304
|
+
message,
|
|
305
|
+
roles,
|
|
306
|
+
id: this.id,
|
|
307
|
+
type: type || null,
|
|
308
|
+
});
|
|
309
|
+
return await HmsManager.sendGroupMessage({
|
|
236
310
|
message,
|
|
237
311
|
roles: HMSHelper.getRoleNames(roles),
|
|
312
|
+
id: this.id,
|
|
238
313
|
type: type || null,
|
|
239
314
|
});
|
|
240
315
|
};
|
|
241
316
|
|
|
242
|
-
sendDirectMessage = (
|
|
243
|
-
|
|
244
|
-
|
|
317
|
+
sendDirectMessage = async (
|
|
318
|
+
message: string,
|
|
319
|
+
peerId: string,
|
|
320
|
+
type?: string
|
|
321
|
+
) => {
|
|
322
|
+
logger?.verbose('#Function sendDirectMessage', {
|
|
245
323
|
message,
|
|
246
324
|
peerId,
|
|
325
|
+
id: this.id,
|
|
247
326
|
type: type || null,
|
|
248
327
|
});
|
|
328
|
+
return await HmsManager.sendDirectMessage({
|
|
329
|
+
message,
|
|
330
|
+
peerId,
|
|
331
|
+
id: this.id,
|
|
332
|
+
type: type || null,
|
|
333
|
+
});
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
changeMetadata = (metadata: string) => {
|
|
337
|
+
logger?.verbose('#Function changeMetadata', { metadata, id: this.id });
|
|
338
|
+
HmsManager.changeMetadata({ metadata, id: this.id });
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
startRTMPOrRecording = async (data: HMSRTMPConfig) => {
|
|
342
|
+
logger?.verbose('#Function startRTMPOrRecording', {
|
|
343
|
+
...data,
|
|
344
|
+
id: this.id,
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
const op = await HmsManager.startRTMPOrRecording({ ...data, id: this.id });
|
|
348
|
+
return op;
|
|
249
349
|
};
|
|
250
350
|
|
|
251
|
-
|
|
351
|
+
stopRtmpAndRecording = async () => {
|
|
352
|
+
logger?.verbose('#Function stopRtmpAndRecording', {});
|
|
353
|
+
const op = await HmsManager.stopRtmpAndRecording({ id: this.id });
|
|
354
|
+
return op;
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
changeRole = async (peer: HMSPeer, role: HMSRole, force: boolean = false) => {
|
|
252
358
|
const data = {
|
|
253
|
-
peerId:
|
|
254
|
-
role: role,
|
|
359
|
+
peerId: peer?.peerID,
|
|
360
|
+
role: role?.name,
|
|
255
361
|
force: force,
|
|
362
|
+
id: this.id,
|
|
256
363
|
};
|
|
257
|
-
|
|
258
|
-
HmsManager.changeRole(data);
|
|
364
|
+
logger?.verbose('#Function changeRole', data);
|
|
365
|
+
return await HmsManager.changeRole(data);
|
|
259
366
|
};
|
|
260
367
|
|
|
261
|
-
changeTrackState = (track: HMSTrack, mute: boolean) => {
|
|
262
|
-
|
|
368
|
+
changeTrackState = async (track: HMSTrack, mute: boolean) => {
|
|
369
|
+
logger?.verbose('#Function changeTrackState', {
|
|
370
|
+
track,
|
|
371
|
+
mute,
|
|
372
|
+
id: this.id,
|
|
373
|
+
});
|
|
263
374
|
const data = {
|
|
264
375
|
trackId: track.trackId,
|
|
265
376
|
mute,
|
|
377
|
+
id: this.id,
|
|
266
378
|
};
|
|
267
379
|
|
|
268
|
-
HmsManager.changeTrackState(data);
|
|
380
|
+
return await HmsManager.changeTrackState(data);
|
|
269
381
|
};
|
|
270
382
|
|
|
271
|
-
|
|
272
|
-
|
|
383
|
+
changeTrackStateRoles = async (
|
|
384
|
+
type: HMSTrackType,
|
|
385
|
+
mute: boolean,
|
|
386
|
+
source: string,
|
|
387
|
+
roles: Array<HMSRole>
|
|
388
|
+
) => {
|
|
389
|
+
logger?.verbose('#Function changeTrackStateRoles', {
|
|
390
|
+
source,
|
|
391
|
+
mute,
|
|
392
|
+
type,
|
|
393
|
+
roles,
|
|
394
|
+
id: this.id,
|
|
395
|
+
});
|
|
396
|
+
const data = {
|
|
397
|
+
source,
|
|
398
|
+
mute,
|
|
399
|
+
type,
|
|
400
|
+
roles: HMSHelper.getRoleNames(roles),
|
|
401
|
+
id: this.id,
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
return await HmsManager.changeTrackStateRoles(data);
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
removePeer = async (peerId: string, reason: string) => {
|
|
408
|
+
logger?.verbose('#Function removePeer', { peerId, reason, id: this.id });
|
|
273
409
|
const data = {
|
|
274
410
|
peerId,
|
|
275
411
|
reason,
|
|
412
|
+
id: this.id,
|
|
276
413
|
};
|
|
277
414
|
|
|
278
|
-
HmsManager.removePeer(data);
|
|
415
|
+
return await HmsManager.removePeer(data);
|
|
279
416
|
};
|
|
280
417
|
|
|
281
|
-
endRoom = (lock: boolean, reason: string) => {
|
|
282
|
-
|
|
418
|
+
endRoom = async (lock: boolean, reason: string) => {
|
|
419
|
+
logger?.verbose('#Function endRoom', { lock, reason, id: this.id });
|
|
283
420
|
const data = {
|
|
284
421
|
lock,
|
|
285
422
|
reason,
|
|
423
|
+
id: this.id,
|
|
286
424
|
};
|
|
287
425
|
|
|
288
|
-
HmsManager.endRoom(data);
|
|
426
|
+
return await HmsManager.endRoom(data);
|
|
289
427
|
};
|
|
290
428
|
|
|
291
429
|
acceptRoleChange = () => {
|
|
292
|
-
|
|
293
|
-
HmsManager.acceptRoleChange();
|
|
430
|
+
logger?.verbose('#Function acceptRoleChange', { id: this.id });
|
|
431
|
+
HmsManager.acceptRoleChange({ id: this.id });
|
|
294
432
|
};
|
|
295
433
|
|
|
296
434
|
muteAllPeersAudio = (mute: boolean) => {
|
|
297
|
-
|
|
298
|
-
|
|
435
|
+
logger?.verbose('#Function muteAllPeersAudio', { mute, id: this.id });
|
|
436
|
+
this.muteStatus = mute;
|
|
437
|
+
HmsManager.muteAllPeersAudio({ mute, id: this.id });
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
getRoom = async () => {
|
|
441
|
+
logger?.verbose('#Function getRoom', {
|
|
442
|
+
roomID: this.room?.id,
|
|
443
|
+
id: this.id,
|
|
444
|
+
});
|
|
445
|
+
const hmsRoom = await HmsManager.getRoom({ id: this.id });
|
|
446
|
+
|
|
447
|
+
const encodedHmsRoom = HMSEncoder.encodeHmsRoom(hmsRoom, this.id);
|
|
448
|
+
return encodedHmsRoom;
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
setVolume = (track: HMSTrack, volume: number) => {
|
|
452
|
+
logger?.verbose('#Function setVolume', {
|
|
453
|
+
track,
|
|
454
|
+
volume,
|
|
455
|
+
id: this.id,
|
|
456
|
+
});
|
|
457
|
+
HmsManager.setVolume({
|
|
458
|
+
id: this.id,
|
|
459
|
+
trackId: track.trackId,
|
|
460
|
+
volume,
|
|
461
|
+
});
|
|
462
|
+
return;
|
|
299
463
|
};
|
|
300
464
|
|
|
301
465
|
/**
|
|
@@ -307,7 +471,10 @@ export class HMSSDK {
|
|
|
307
471
|
* @memberof HMSSDK
|
|
308
472
|
*/
|
|
309
473
|
addEventListener = (action: HMSUpdateListenerActions, callback: any) => {
|
|
310
|
-
|
|
474
|
+
logger?.verbose('#Function addEventListener', {
|
|
475
|
+
action,
|
|
476
|
+
id: this.id,
|
|
477
|
+
});
|
|
311
478
|
switch (action) {
|
|
312
479
|
case HMSUpdateListenerActions.ON_PREVIEW:
|
|
313
480
|
this.onPreviewDelegate = callback;
|
|
@@ -361,7 +528,7 @@ export class HMSSDK {
|
|
|
361
528
|
* @memberof HMSSDK
|
|
362
529
|
*/
|
|
363
530
|
removeEventListener = (action: HMSUpdateListenerActions) => {
|
|
364
|
-
|
|
531
|
+
logger?.verbose('#Function removeEventListener', { action, id: this.id });
|
|
365
532
|
switch (action) {
|
|
366
533
|
case HMSUpdateListenerActions.ON_PREVIEW:
|
|
367
534
|
this.onPreviewDelegate = null;
|
|
@@ -426,19 +593,18 @@ export class HMSSDK {
|
|
|
426
593
|
this.onChangeTrackStateRequestDelegate = null;
|
|
427
594
|
this.onRemovedFromRoomDelegate = null;
|
|
428
595
|
|
|
429
|
-
|
|
430
|
-
};
|
|
431
|
-
|
|
432
|
-
setLogger = (hmsLogger: HMSLogger) => {
|
|
433
|
-
this.logger = hmsLogger;
|
|
434
|
-
hmsLogger.verbose('UPDATE_LOGGER', { hmsLogger });
|
|
596
|
+
logger?.verbose('#Function REMOVE_ALL_LISTENER', { id: this.id });
|
|
435
597
|
};
|
|
436
598
|
|
|
437
599
|
onPreviewListener = (data: any) => {
|
|
438
|
-
this.
|
|
439
|
-
|
|
600
|
+
if (data.id !== this.id) {
|
|
601
|
+
return;
|
|
602
|
+
}
|
|
603
|
+
logger?.verbose('#Listener ON_PREVIEW', data);
|
|
604
|
+
const room: HMSRoom = HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
440
605
|
const localPeer: HMSLocalPeer = HMSEncoder.encodeHmsLocalPeer(
|
|
441
|
-
data.localPeer
|
|
606
|
+
data.localPeer,
|
|
607
|
+
this.id
|
|
442
608
|
);
|
|
443
609
|
|
|
444
610
|
const previewTracks = HMSEncoder.encodeHmsPreviewTracks(data.previewTracks);
|
|
@@ -446,7 +612,7 @@ export class HMSSDK {
|
|
|
446
612
|
this.localPeer = localPeer;
|
|
447
613
|
this.room = room;
|
|
448
614
|
if (this.onPreviewDelegate) {
|
|
449
|
-
|
|
615
|
+
logger?.verbose('#Listener ON_PREVIEW_LISTENER_CALL', {
|
|
450
616
|
...data,
|
|
451
617
|
room,
|
|
452
618
|
localPeer,
|
|
@@ -457,14 +623,19 @@ export class HMSSDK {
|
|
|
457
623
|
};
|
|
458
624
|
|
|
459
625
|
onJoinListener = (data: any) => {
|
|
460
|
-
this.
|
|
626
|
+
if (data.id !== this.id) {
|
|
627
|
+
return;
|
|
628
|
+
}
|
|
629
|
+
logger?.verbose('#LISTENER ON_JOIN', data);
|
|
461
630
|
// Preprocessing
|
|
462
|
-
const room: HMSRoom = HMSEncoder.encodeHmsRoom(data.room);
|
|
631
|
+
const room: HMSRoom = HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
463
632
|
const localPeer: HMSLocalPeer = HMSEncoder.encodeHmsLocalPeer(
|
|
464
|
-
data.localPeer
|
|
633
|
+
data.localPeer,
|
|
634
|
+
this.id
|
|
465
635
|
);
|
|
466
636
|
const remotePeers: HMSRemotePeer[] = HMSEncoder.encodeHmsRemotePeers(
|
|
467
|
-
data.remotePeers
|
|
637
|
+
data.remotePeers,
|
|
638
|
+
this.id
|
|
468
639
|
);
|
|
469
640
|
const roles: HMSRole[] = HMSEncoder.encodeHmsRoles(data.roles);
|
|
470
641
|
this.room = room;
|
|
@@ -472,7 +643,7 @@ export class HMSSDK {
|
|
|
472
643
|
this.remotePeers = remotePeers;
|
|
473
644
|
this.knownRoles = roles;
|
|
474
645
|
if (this.onJoinDelegate) {
|
|
475
|
-
|
|
646
|
+
logger?.verbose('#Listener ON_JOIN_LISTENER_CALL', {
|
|
476
647
|
...data,
|
|
477
648
|
room,
|
|
478
649
|
localPeer,
|
|
@@ -483,19 +654,24 @@ export class HMSSDK {
|
|
|
483
654
|
};
|
|
484
655
|
|
|
485
656
|
onRoomListener = (data: any) => {
|
|
486
|
-
this.
|
|
487
|
-
|
|
657
|
+
if (data.id !== this.id) {
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
660
|
+
logger?.verbose('#Listener ON_ROOM', data);
|
|
661
|
+
const room: HMSRoom = HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
488
662
|
const localPeer: HMSLocalPeer = HMSEncoder.encodeHmsLocalPeer(
|
|
489
|
-
data.localPeer
|
|
663
|
+
data.localPeer,
|
|
664
|
+
this.id
|
|
490
665
|
);
|
|
491
666
|
const remotePeers: HMSRemotePeer[] = HMSEncoder.encodeHmsRemotePeers(
|
|
492
|
-
data.remotePeers
|
|
667
|
+
data.remotePeers,
|
|
668
|
+
this.id
|
|
493
669
|
);
|
|
494
670
|
this.room = room;
|
|
495
671
|
this.localPeer = localPeer;
|
|
496
672
|
this.remotePeers = remotePeers;
|
|
497
673
|
if (this.onRoomDelegate) {
|
|
498
|
-
|
|
674
|
+
logger?.verbose('#Listener ON_ROOM_LISTENER_CALL', {
|
|
499
675
|
...data,
|
|
500
676
|
room,
|
|
501
677
|
localPeer,
|
|
@@ -506,71 +682,113 @@ export class HMSSDK {
|
|
|
506
682
|
};
|
|
507
683
|
|
|
508
684
|
onPeerListener = (data: any) => {
|
|
509
|
-
this.
|
|
685
|
+
if (data.id !== this.id) {
|
|
686
|
+
return;
|
|
687
|
+
}
|
|
688
|
+
logger?.verbose('#Listener ON_PEER', data);
|
|
689
|
+
const peer: HMSPeer = HMSEncoder.encodeHmsPeer(data.peer, this.id);
|
|
690
|
+
const room: HMSRoom = HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
510
691
|
const localPeer: HMSLocalPeer = HMSEncoder.encodeHmsLocalPeer(
|
|
511
|
-
data.localPeer
|
|
692
|
+
data.localPeer,
|
|
693
|
+
this.id
|
|
512
694
|
);
|
|
513
695
|
const remotePeers: HMSRemotePeer[] = HMSEncoder.encodeHmsRemotePeers(
|
|
514
|
-
data.remotePeers
|
|
696
|
+
data.remotePeers,
|
|
697
|
+
this.id
|
|
515
698
|
);
|
|
516
699
|
// this.room = room;
|
|
517
700
|
this.localPeer = localPeer;
|
|
518
701
|
this.remotePeers = remotePeers;
|
|
702
|
+
this.room = room;
|
|
519
703
|
if (this.onPeerDelegate) {
|
|
520
|
-
|
|
521
|
-
this.onPeerDelegate({ ...data, localPeer, remotePeers });
|
|
704
|
+
logger?.verbose('#Listener ON_PEER_LISTENER_CALL', data);
|
|
705
|
+
this.onPeerDelegate({ ...data, localPeer, remotePeers, room, peer });
|
|
522
706
|
}
|
|
523
707
|
};
|
|
524
708
|
|
|
525
709
|
onTrackListener = (data: any) => {
|
|
526
|
-
this.
|
|
527
|
-
|
|
710
|
+
if (data.id !== this.id) {
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
713
|
+
logger?.verbose('#Listener ON_TRACK', data);
|
|
714
|
+
const track: HMSTrack = HMSEncoder.encodeHmsTrack(data.track, this.id);
|
|
715
|
+
const peer: HMSPeer = HMSEncoder.encodeHmsPeer(data.peer, this.id);
|
|
716
|
+
const room: HMSRoom = HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
528
717
|
const localPeer: HMSLocalPeer = HMSEncoder.encodeHmsLocalPeer(
|
|
529
|
-
data.localPeer
|
|
718
|
+
data.localPeer,
|
|
719
|
+
this.id
|
|
530
720
|
);
|
|
531
721
|
const remotePeers: HMSRemotePeer[] = HMSEncoder.encodeHmsRemotePeers(
|
|
532
|
-
data.remotePeers
|
|
722
|
+
data.remotePeers,
|
|
723
|
+
this.id
|
|
533
724
|
);
|
|
534
|
-
|
|
725
|
+
if (this.muteStatus && data?.type === 'TRACK_ADDED') {
|
|
726
|
+
this.muteAllPeersAudio(this.muteStatus);
|
|
727
|
+
}
|
|
728
|
+
this.room = room;
|
|
535
729
|
this.localPeer = localPeer;
|
|
536
730
|
this.remotePeers = remotePeers;
|
|
537
731
|
if (this.onTrackDelegate) {
|
|
538
|
-
|
|
539
|
-
this.onTrackDelegate({
|
|
732
|
+
logger?.verbose('#Listener ON_TRACK_LISTENER_CALL', data);
|
|
733
|
+
this.onTrackDelegate({
|
|
734
|
+
...data,
|
|
735
|
+
localPeer,
|
|
736
|
+
remotePeers,
|
|
737
|
+
room,
|
|
738
|
+
peer,
|
|
739
|
+
track,
|
|
740
|
+
});
|
|
540
741
|
}
|
|
541
742
|
};
|
|
542
743
|
|
|
543
744
|
onMessageListener = (data: any) => {
|
|
544
|
-
this.
|
|
745
|
+
if (data.id !== this.id) {
|
|
746
|
+
return;
|
|
747
|
+
}
|
|
748
|
+
logger?.verbose('#Listener ON_MESSAGE', data);
|
|
545
749
|
const message = new HMSMessage(data);
|
|
546
750
|
if (this.onMessageDelegate) {
|
|
547
|
-
|
|
751
|
+
logger?.verbose('#Listener ON_MESSAGE_LISTENER_CALL', message);
|
|
548
752
|
this.onMessageDelegate(message);
|
|
549
753
|
}
|
|
550
754
|
};
|
|
551
755
|
|
|
552
756
|
onSpeakerListener = (data: any) => {
|
|
553
|
-
this.
|
|
757
|
+
if (data.id !== this.id) {
|
|
758
|
+
return;
|
|
759
|
+
}
|
|
760
|
+
logger?.verbose('#Listener ON_SPEAKER', data);
|
|
554
761
|
if (this.onSpeakerDelegate) {
|
|
762
|
+
logger?.verbose('#Listener ON_SPEAKER_LISTENER_CALL', data);
|
|
555
763
|
this.onSpeakerDelegate(data);
|
|
556
764
|
}
|
|
557
765
|
};
|
|
558
766
|
|
|
559
767
|
onErrorListener = (data: any) => {
|
|
560
|
-
this.
|
|
768
|
+
if (data.id !== this.id) {
|
|
769
|
+
return;
|
|
770
|
+
}
|
|
771
|
+
logger?.warn('#Listener ON_ERROR', data);
|
|
772
|
+
logger?.verbose('#Listener ON_ERROR', data);
|
|
561
773
|
if (this.onErrorDelegate) {
|
|
562
|
-
|
|
774
|
+
logger?.verbose('#Listener ON_ERROR_LISTENER_CALL', data);
|
|
775
|
+
logger?.warn('#Listener ON_ERROR_LISTENER_CALL', data);
|
|
563
776
|
this.onErrorDelegate(data);
|
|
564
777
|
}
|
|
565
778
|
};
|
|
566
779
|
|
|
567
780
|
onRoleChangeRequestListener = (data: any) => {
|
|
568
|
-
this.
|
|
781
|
+
if (data.id !== this.id) {
|
|
782
|
+
return;
|
|
783
|
+
}
|
|
784
|
+
logger?.verbose('#Listener ON_ROLE_CHANGE_REQUEST', data);
|
|
569
785
|
if (this.onRoleChangeRequestDelegate) {
|
|
570
|
-
const encodedRoleChangeRequest =
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
786
|
+
const encodedRoleChangeRequest = HMSEncoder.encodeHmsRoleChangeRequest(
|
|
787
|
+
data,
|
|
788
|
+
this.id
|
|
789
|
+
);
|
|
790
|
+
logger?.verbose(
|
|
791
|
+
'#Listener ON_ROLE_CHANGE_LISTENER_CALL',
|
|
574
792
|
encodedRoleChangeRequest
|
|
575
793
|
);
|
|
576
794
|
this.onRoleChangeRequestDelegate(encodedRoleChangeRequest);
|
|
@@ -578,12 +796,15 @@ export class HMSSDK {
|
|
|
578
796
|
};
|
|
579
797
|
|
|
580
798
|
onChangeTrackStateRequestListener = (data: any) => {
|
|
581
|
-
this.
|
|
799
|
+
if (data.id !== this.id) {
|
|
800
|
+
return;
|
|
801
|
+
}
|
|
802
|
+
logger?.verbose('#Listener ON_CHANGE_TRACK_STATE_REQUEST', data);
|
|
582
803
|
if (this.onChangeTrackStateRequestDelegate) {
|
|
583
804
|
const encodedRoleChangeRequest =
|
|
584
|
-
HMSEncoder.encodeHmsChangeTrackStateRequest(data);
|
|
585
|
-
|
|
586
|
-
'ON_CHANGE_TRACK_STATE_REQUEST_LISTENER_CALL',
|
|
805
|
+
HMSEncoder.encodeHmsChangeTrackStateRequest(data, this.id);
|
|
806
|
+
logger?.verbose(
|
|
807
|
+
'#Listener ON_CHANGE_TRACK_STATE_REQUEST_LISTENER_CALL',
|
|
587
808
|
encodedRoleChangeRequest
|
|
588
809
|
);
|
|
589
810
|
this.onChangeTrackStateRequestDelegate(encodedRoleChangeRequest);
|
|
@@ -591,30 +812,43 @@ export class HMSSDK {
|
|
|
591
812
|
};
|
|
592
813
|
|
|
593
814
|
onRemovedFromRoomListener = (data: any) => {
|
|
594
|
-
this.
|
|
815
|
+
if (data.id !== this.id) {
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
818
|
+
logger?.verbose('#Listener ON_REMOVED_FROM_ROOM', data);
|
|
595
819
|
if (this.onRemovedFromRoomDelegate) {
|
|
596
|
-
|
|
820
|
+
let requestedBy = null;
|
|
821
|
+
if (data.requestedBy) {
|
|
822
|
+
requestedBy = HMSEncoder.encodeHmsPeer(data.requestedBy, this.id);
|
|
823
|
+
}
|
|
597
824
|
const reason = data.reason;
|
|
598
825
|
const roomEnded = data.roomEnded;
|
|
599
826
|
|
|
600
|
-
|
|
827
|
+
logger?.verbose('#Listener ON_REMOVED_FROM_ROOM_LISTENER_CALL', {
|
|
601
828
|
requestedBy,
|
|
602
829
|
reason,
|
|
603
830
|
roomEnded,
|
|
831
|
+
id: this.id,
|
|
604
832
|
});
|
|
605
833
|
this.onRemovedFromRoomDelegate({ requestedBy, reason, roomEnded });
|
|
606
834
|
}
|
|
607
835
|
};
|
|
608
836
|
|
|
609
837
|
reconnectingListener = (data: any) => {
|
|
610
|
-
this.
|
|
838
|
+
if (data.id !== this.id) {
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
logger?.verbose('#Listener ON_RECONNECTING', data);
|
|
611
842
|
if (this.onReconnectingDelegate) {
|
|
612
843
|
this.onReconnectingDelegate(data);
|
|
613
844
|
}
|
|
614
845
|
};
|
|
615
846
|
|
|
616
847
|
reconnectedListener = (data: any) => {
|
|
617
|
-
this.
|
|
848
|
+
if (data.id !== this.id) {
|
|
849
|
+
return;
|
|
850
|
+
}
|
|
851
|
+
logger?.verbose('#Listener ON_RECONNECTED', data);
|
|
618
852
|
if (this.onReconnectedDelegate) {
|
|
619
853
|
this.onReconnectedDelegate(data);
|
|
620
854
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HMSException } from './HMSException';
|
|
2
|
+
|
|
3
|
+
export class HMSServerRecordingState {
|
|
4
|
+
running: string;
|
|
5
|
+
error: HMSException;
|
|
6
|
+
|
|
7
|
+
constructor(params: { running: string; error: HMSException }) {
|
|
8
|
+
this.running = params.running;
|
|
9
|
+
this.error = params.error;
|
|
10
|
+
}
|
|
11
|
+
}
|