@100mslive/react-native-hms 0.8.0 → 0.8.4
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/6.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/6.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
- 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/build.gradle +1 -2
- package/android/src/main/java/com/reactnativehmssdk/HmsDecoder.kt +249 -230
- package/android/src/main/java/com/reactnativehmssdk/HmsHelper.kt +145 -13
- package/android/src/main/java/com/reactnativehmssdk/HmsModule.kt +56 -21
- package/android/src/main/java/com/reactnativehmssdk/HmsSDK.kt +463 -247
- package/android/src/main/java/com/reactnativehmssdk/HmsView.kt +15 -18
- package/android/src/main/java/com/reactnativehmssdk/HmssdkPackage.kt +1 -2
- package/android/src/main/java/com/reactnativehmssdk/HmssdkViewManager.kt +4 -10
- package/ios/HmsDecoder.swift +135 -35
- package/ios/HmsHelper.swift +103 -1
- package/ios/HmsManager.m +13 -9
- package/ios/HmsManager.swift +59 -24
- package/ios/HmsSDK.swift +322 -85
- package/ios/HmsView.swift +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/HMSChangeTrackStateRequest.js +3 -0
- package/lib/commonjs/classes/HMSChangeTrackStateRequest.js.map +1 -1
- package/lib/commonjs/classes/HMSConfig.js +3 -1
- package/lib/commonjs/classes/HMSConfig.js.map +1 -1
- package/lib/commonjs/classes/HMSEncoder.js +27 -7
- 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 +32 -0
- package/lib/commonjs/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalVideoTrack.js +18 -0
- 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 +19 -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 +19 -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 +229 -125
- 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 +2 -19
- 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/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/HMSVideoTrackSettings.js +0 -3
- package/lib/commonjs/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/commonjs/index.js +98 -0
- package/lib/commonjs/index.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/HMSChangeTrackStateRequest.js +3 -0
- package/lib/module/classes/HMSChangeTrackStateRequest.js.map +1 -1
- package/lib/module/classes/HMSConfig.js +3 -1
- package/lib/module/classes/HMSConfig.js.map +1 -1
- package/lib/module/classes/HMSEncoder.js +26 -7
- 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 +30 -1
- package/lib/module/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSLocalPeer.js.map +1 -1
- package/lib/module/classes/HMSLocalVideoTrack.js +15 -0
- 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 +16 -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 +16 -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 +227 -125
- 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 +2 -17
- 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/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/HMSVideoTrackSettings.js +0 -3
- package/lib/module/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -1
- 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/HMSChangeTrackStateRequest.d.ts +2 -0
- package/lib/typescript/classes/HMSConfig.d.ts +2 -0
- package/lib/typescript/classes/HMSEncoder.d.ts +3 -1
- package/lib/typescript/classes/HMSException.d.ts +22 -0
- package/lib/typescript/classes/HMSLocalAudioTrack.d.ts +1 -0
- package/lib/typescript/classes/HMSLocalPeer.d.ts +4 -0
- package/lib/typescript/classes/HMSLogger.d.ts +7 -0
- 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/HMSRemotePeer.d.ts +1 -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 +22 -13
- package/lib/typescript/classes/HMSServerRecordingState.d.ts +9 -0
- package/lib/typescript/classes/HMSTrack.d.ts +1 -1
- package/lib/typescript/classes/HMSTrackSettings.d.ts +2 -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/HMSVideoTrackSettings.d.ts +13 -10
- package/lib/typescript/index.d.ts +7 -0
- package/package.json +2 -1
- package/src/classes/HMSAudioTrackSettings.ts +9 -1
- package/src/classes/HMSBrowserRecordingState.ts +11 -0
- package/src/classes/HMSCameraFacing.ts +4 -0
- package/src/classes/HMSChangeTrackStateRequest.ts +7 -1
- package/src/classes/HMSConfig.ts +3 -1
- package/src/classes/HMSEncoder.ts +22 -2
- package/src/classes/HMSException.ts +33 -0
- package/src/classes/HMSHelper.ts +2 -2
- package/src/classes/HMSLocalAudioTrack.ts +29 -1
- package/src/classes/HMSLocalPeer.ts +4 -0
- package/src/classes/HMSLocalVideoTrack.ts +15 -0
- package/src/classes/HMSLogger.ts +14 -1
- 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 +16 -0
- package/src/classes/HMSRemotePeer.ts +1 -0
- package/src/classes/HMSRemoteVideoTrack.ts +16 -0
- package/src/classes/HMSRoom.ts +12 -0
- package/src/classes/HMSRtmpStreamingState.ts +11 -0
- package/src/classes/HMSSDK.tsx +170 -71
- package/src/classes/HMSServerRecordingState.ts +11 -0
- package/src/classes/HMSTrack.ts +2 -15
- package/src/classes/HMSTrackSettings.ts +3 -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/HMSVideoTrackSettings.ts +13 -10
- package/src/index.ts +7 -0
- package/android/.gradle/6.9/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/6.9/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/6.9/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/6.9/javaCompile/classAnalysis.bin +0 -0
- package/android/.gradle/6.9/javaCompile/jarAnalysis.bin +0 -0
- package/android/.gradle/6.9/javaCompile/javaCompile.lock +0 -0
- package/android/.gradle/6.9/javaCompile/taskHistory.bin +0 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.project +0 -34
package/src/classes/HMSSDK.tsx
CHANGED
|
@@ -15,6 +15,8 @@ import type { HMSLogger } from './HMSLogger';
|
|
|
15
15
|
import type { HMSPeer } from './HMSPeer';
|
|
16
16
|
import { HmsView as HMSViewComponent } from './HmsView';
|
|
17
17
|
import { HMSVideoViewMode } from './HMSVideoViewMode';
|
|
18
|
+
import type { HMSTrackSettings } from './HMSTrackSettings';
|
|
19
|
+
import type { HMSRTMPConfig } from './HMSRTMPConfig';
|
|
18
20
|
|
|
19
21
|
interface HmsComponentProps {
|
|
20
22
|
trackId: string;
|
|
@@ -36,13 +38,15 @@ const HmsEventEmitter = new NativeEventEmitter(HmsManager);
|
|
|
36
38
|
|
|
37
39
|
let HmsSdk: HMSSDK | undefined;
|
|
38
40
|
|
|
41
|
+
let logger: HMSLogger | undefined;
|
|
42
|
+
|
|
39
43
|
export class HMSSDK {
|
|
40
44
|
room?: HMSRoom;
|
|
41
45
|
localPeer?: HMSLocalPeer;
|
|
42
46
|
remotePeers?: HMSRemotePeer[];
|
|
43
47
|
knownRoles?: HMSRole[];
|
|
44
|
-
logger?: HMSLogger;
|
|
45
48
|
id: string;
|
|
49
|
+
private muteStatus: boolean | undefined;
|
|
46
50
|
|
|
47
51
|
onPreviewDelegate?: any;
|
|
48
52
|
onJoinDelegate?: any;
|
|
@@ -70,14 +74,23 @@ export class HMSSDK {
|
|
|
70
74
|
* @returns
|
|
71
75
|
* @memberof HMSSDK
|
|
72
76
|
*/
|
|
73
|
-
static async build() {
|
|
74
|
-
let id = await HmsManager.build();
|
|
77
|
+
static async build(params?: { trackSettings?: HMSTrackSettings }) {
|
|
78
|
+
let id = await HmsManager.build(params?.trackSettings || {});
|
|
75
79
|
HmsSdk = new HMSSDK(id);
|
|
76
80
|
HmsSdk.attachPreviewListener();
|
|
77
81
|
HmsSdk.attachListeners();
|
|
78
82
|
return HmsSdk;
|
|
79
83
|
}
|
|
80
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
|
+
|
|
81
94
|
destroy = () => {
|
|
82
95
|
this.removeListeners();
|
|
83
96
|
};
|
|
@@ -221,12 +234,12 @@ export class HMSSDK {
|
|
|
221
234
|
* @memberof HMSSDK
|
|
222
235
|
*/
|
|
223
236
|
join = async (config: HMSConfig) => {
|
|
224
|
-
|
|
237
|
+
logger?.verbose('#Function join', { config, id: this.id });
|
|
225
238
|
await HmsManager.join({ ...config, id: this.id });
|
|
226
239
|
};
|
|
227
240
|
|
|
228
241
|
preview = (config: HMSConfig) => {
|
|
229
|
-
|
|
242
|
+
logger?.verbose('#Function preview', { config, id: this.id });
|
|
230
243
|
HmsManager.preview({ ...config, id: this.id });
|
|
231
244
|
};
|
|
232
245
|
|
|
@@ -255,30 +268,45 @@ export class HMSSDK {
|
|
|
255
268
|
* @memberof HMSSDK
|
|
256
269
|
*/
|
|
257
270
|
leave = async () => {
|
|
258
|
-
|
|
271
|
+
logger?.verbose('#Function leave', { id: this.id });
|
|
259
272
|
const data = {
|
|
260
273
|
id: this.id,
|
|
261
274
|
};
|
|
262
275
|
|
|
263
|
-
await HmsManager.leave(data);
|
|
276
|
+
const op = await HmsManager.leave(data);
|
|
277
|
+
this.muteStatus = undefined;
|
|
264
278
|
this.localPeer = undefined;
|
|
265
279
|
this.remotePeers = undefined;
|
|
266
280
|
this.room = undefined;
|
|
267
281
|
this.knownRoles = undefined;
|
|
282
|
+
return op;
|
|
268
283
|
};
|
|
269
284
|
|
|
270
|
-
sendBroadcastMessage = (message: string, type?: string) => {
|
|
271
|
-
|
|
272
|
-
|
|
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({
|
|
273
292
|
message,
|
|
274
293
|
type: type || null,
|
|
275
294
|
id: this.id,
|
|
276
295
|
});
|
|
277
296
|
};
|
|
278
297
|
|
|
279
|
-
sendGroupMessage = (
|
|
280
|
-
|
|
281
|
-
|
|
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({
|
|
282
310
|
message,
|
|
283
311
|
roles: HMSHelper.getRoleNames(roles),
|
|
284
312
|
id: this.id,
|
|
@@ -286,9 +314,18 @@ export class HMSSDK {
|
|
|
286
314
|
});
|
|
287
315
|
};
|
|
288
316
|
|
|
289
|
-
sendDirectMessage = (
|
|
290
|
-
|
|
291
|
-
|
|
317
|
+
sendDirectMessage = async (
|
|
318
|
+
message: string,
|
|
319
|
+
peerId: string,
|
|
320
|
+
type?: string
|
|
321
|
+
) => {
|
|
322
|
+
logger?.verbose('#Function sendDirectMessage', {
|
|
323
|
+
message,
|
|
324
|
+
peerId,
|
|
325
|
+
id: this.id,
|
|
326
|
+
type: type || null,
|
|
327
|
+
});
|
|
328
|
+
return await HmsManager.sendDirectMessage({
|
|
292
329
|
message,
|
|
293
330
|
peerId,
|
|
294
331
|
id: this.id,
|
|
@@ -296,39 +333,65 @@ export class HMSSDK {
|
|
|
296
333
|
});
|
|
297
334
|
};
|
|
298
335
|
|
|
299
|
-
|
|
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;
|
|
349
|
+
};
|
|
350
|
+
|
|
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) => {
|
|
300
358
|
const data = {
|
|
301
359
|
peerId: peer?.peerID,
|
|
302
360
|
role: role?.name,
|
|
303
361
|
force: force,
|
|
304
362
|
id: this.id,
|
|
305
363
|
};
|
|
306
|
-
|
|
307
|
-
HmsManager.changeRole(data);
|
|
364
|
+
logger?.verbose('#Function changeRole', data);
|
|
365
|
+
return await HmsManager.changeRole(data);
|
|
308
366
|
};
|
|
309
367
|
|
|
310
|
-
changeTrackState = (track: HMSTrack, mute: boolean) => {
|
|
311
|
-
|
|
368
|
+
changeTrackState = async (track: HMSTrack, mute: boolean) => {
|
|
369
|
+
logger?.verbose('#Function changeTrackState', {
|
|
370
|
+
track,
|
|
371
|
+
mute,
|
|
372
|
+
id: this.id,
|
|
373
|
+
});
|
|
312
374
|
const data = {
|
|
313
375
|
trackId: track.trackId,
|
|
314
376
|
mute,
|
|
315
377
|
id: this.id,
|
|
316
378
|
};
|
|
317
379
|
|
|
318
|
-
HmsManager.changeTrackState(data);
|
|
380
|
+
return await HmsManager.changeTrackState(data);
|
|
319
381
|
};
|
|
320
382
|
|
|
321
|
-
changeTrackStateRoles = (
|
|
383
|
+
changeTrackStateRoles = async (
|
|
322
384
|
type: HMSTrackType,
|
|
323
385
|
mute: boolean,
|
|
324
386
|
source: string,
|
|
325
387
|
roles: Array<HMSRole>
|
|
326
388
|
) => {
|
|
327
|
-
|
|
389
|
+
logger?.verbose('#Function changeTrackStateRoles', {
|
|
328
390
|
source,
|
|
329
391
|
mute,
|
|
330
392
|
type,
|
|
331
393
|
roles,
|
|
394
|
+
id: this.id,
|
|
332
395
|
});
|
|
333
396
|
const data = {
|
|
334
397
|
source,
|
|
@@ -338,49 +401,67 @@ export class HMSSDK {
|
|
|
338
401
|
id: this.id,
|
|
339
402
|
};
|
|
340
403
|
|
|
341
|
-
HmsManager.changeTrackStateRoles(data);
|
|
404
|
+
return await HmsManager.changeTrackStateRoles(data);
|
|
342
405
|
};
|
|
343
406
|
|
|
344
|
-
removePeer = (peerId: string, reason: string) => {
|
|
345
|
-
|
|
407
|
+
removePeer = async (peerId: string, reason: string) => {
|
|
408
|
+
logger?.verbose('#Function removePeer', { peerId, reason, id: this.id });
|
|
346
409
|
const data = {
|
|
347
410
|
peerId,
|
|
348
411
|
reason,
|
|
349
412
|
id: this.id,
|
|
350
413
|
};
|
|
351
414
|
|
|
352
|
-
HmsManager.removePeer(data);
|
|
415
|
+
return await HmsManager.removePeer(data);
|
|
353
416
|
};
|
|
354
417
|
|
|
355
|
-
endRoom = (lock: boolean, reason: string) => {
|
|
356
|
-
|
|
418
|
+
endRoom = async (lock: boolean, reason: string) => {
|
|
419
|
+
logger?.verbose('#Function endRoom', { lock, reason, id: this.id });
|
|
357
420
|
const data = {
|
|
358
421
|
lock,
|
|
359
422
|
reason,
|
|
360
423
|
id: this.id,
|
|
361
424
|
};
|
|
362
425
|
|
|
363
|
-
HmsManager.endRoom(data);
|
|
426
|
+
return await HmsManager.endRoom(data);
|
|
364
427
|
};
|
|
365
428
|
|
|
366
|
-
acceptRoleChange = () => {
|
|
367
|
-
|
|
368
|
-
HmsManager.acceptRoleChange({ id: this.id });
|
|
429
|
+
acceptRoleChange = async () => {
|
|
430
|
+
logger?.verbose('#Function acceptRoleChange', { id: this.id });
|
|
431
|
+
return await HmsManager.acceptRoleChange({ id: this.id });
|
|
369
432
|
};
|
|
370
433
|
|
|
371
434
|
muteAllPeersAudio = (mute: boolean) => {
|
|
372
|
-
|
|
435
|
+
logger?.verbose('#Function muteAllPeersAudio', { mute, id: this.id });
|
|
436
|
+
this.muteStatus = mute;
|
|
373
437
|
HmsManager.muteAllPeersAudio({ mute, id: this.id });
|
|
374
438
|
};
|
|
375
439
|
|
|
376
440
|
getRoom = async () => {
|
|
377
|
-
|
|
441
|
+
logger?.verbose('#Function getRoom', {
|
|
442
|
+
roomID: this.room?.id,
|
|
443
|
+
id: this.id,
|
|
444
|
+
});
|
|
378
445
|
const hmsRoom = await HmsManager.getRoom({ id: this.id });
|
|
379
446
|
|
|
380
447
|
const encodedHmsRoom = HMSEncoder.encodeHmsRoom(hmsRoom, this.id);
|
|
381
448
|
return encodedHmsRoom;
|
|
382
449
|
};
|
|
383
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;
|
|
463
|
+
};
|
|
464
|
+
|
|
384
465
|
/**
|
|
385
466
|
* - This is a prototype event listener that takes action and listens for updates related to that particular action
|
|
386
467
|
* - This method will be @deprecated in future and event listener will be passed in join method
|
|
@@ -390,7 +471,10 @@ export class HMSSDK {
|
|
|
390
471
|
* @memberof HMSSDK
|
|
391
472
|
*/
|
|
392
473
|
addEventListener = (action: HMSUpdateListenerActions, callback: any) => {
|
|
393
|
-
|
|
474
|
+
logger?.verbose('#Function addEventListener', {
|
|
475
|
+
action,
|
|
476
|
+
id: this.id,
|
|
477
|
+
});
|
|
394
478
|
switch (action) {
|
|
395
479
|
case HMSUpdateListenerActions.ON_PREVIEW:
|
|
396
480
|
this.onPreviewDelegate = callback;
|
|
@@ -444,7 +528,7 @@ export class HMSSDK {
|
|
|
444
528
|
* @memberof HMSSDK
|
|
445
529
|
*/
|
|
446
530
|
removeEventListener = (action: HMSUpdateListenerActions) => {
|
|
447
|
-
|
|
531
|
+
logger?.verbose('#Function removeEventListener', { action, id: this.id });
|
|
448
532
|
switch (action) {
|
|
449
533
|
case HMSUpdateListenerActions.ON_PREVIEW:
|
|
450
534
|
this.onPreviewDelegate = null;
|
|
@@ -509,19 +593,14 @@ export class HMSSDK {
|
|
|
509
593
|
this.onChangeTrackStateRequestDelegate = null;
|
|
510
594
|
this.onRemovedFromRoomDelegate = null;
|
|
511
595
|
|
|
512
|
-
|
|
513
|
-
};
|
|
514
|
-
|
|
515
|
-
setLogger = (hmsLogger: HMSLogger) => {
|
|
516
|
-
this.logger = hmsLogger;
|
|
517
|
-
hmsLogger.verbose('UPDATE_LOGGER', { hmsLogger });
|
|
596
|
+
logger?.verbose('#Function REMOVE_ALL_LISTENER', { id: this.id });
|
|
518
597
|
};
|
|
519
598
|
|
|
520
599
|
onPreviewListener = (data: any) => {
|
|
521
600
|
if (data.id !== this.id) {
|
|
522
601
|
return;
|
|
523
602
|
}
|
|
524
|
-
|
|
603
|
+
logger?.verbose('#Listener ON_PREVIEW', data);
|
|
525
604
|
const room: HMSRoom = HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
526
605
|
const localPeer: HMSLocalPeer = HMSEncoder.encodeHmsLocalPeer(
|
|
527
606
|
data.localPeer,
|
|
@@ -533,7 +612,7 @@ export class HMSSDK {
|
|
|
533
612
|
this.localPeer = localPeer;
|
|
534
613
|
this.room = room;
|
|
535
614
|
if (this.onPreviewDelegate) {
|
|
536
|
-
|
|
615
|
+
logger?.verbose('#Listener ON_PREVIEW_LISTENER_CALL', {
|
|
537
616
|
...data,
|
|
538
617
|
room,
|
|
539
618
|
localPeer,
|
|
@@ -547,7 +626,7 @@ export class HMSSDK {
|
|
|
547
626
|
if (data.id !== this.id) {
|
|
548
627
|
return;
|
|
549
628
|
}
|
|
550
|
-
|
|
629
|
+
logger?.verbose('#LISTENER ON_JOIN', data);
|
|
551
630
|
// Preprocessing
|
|
552
631
|
const room: HMSRoom = HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
553
632
|
const localPeer: HMSLocalPeer = HMSEncoder.encodeHmsLocalPeer(
|
|
@@ -564,7 +643,7 @@ export class HMSSDK {
|
|
|
564
643
|
this.remotePeers = remotePeers;
|
|
565
644
|
this.knownRoles = roles;
|
|
566
645
|
if (this.onJoinDelegate) {
|
|
567
|
-
|
|
646
|
+
logger?.verbose('#Listener ON_JOIN_LISTENER_CALL', {
|
|
568
647
|
...data,
|
|
569
648
|
room,
|
|
570
649
|
localPeer,
|
|
@@ -578,7 +657,7 @@ export class HMSSDK {
|
|
|
578
657
|
if (data.id !== this.id) {
|
|
579
658
|
return;
|
|
580
659
|
}
|
|
581
|
-
|
|
660
|
+
logger?.verbose('#Listener ON_ROOM', data);
|
|
582
661
|
const room: HMSRoom = HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
583
662
|
const localPeer: HMSLocalPeer = HMSEncoder.encodeHmsLocalPeer(
|
|
584
663
|
data.localPeer,
|
|
@@ -592,7 +671,7 @@ export class HMSSDK {
|
|
|
592
671
|
this.localPeer = localPeer;
|
|
593
672
|
this.remotePeers = remotePeers;
|
|
594
673
|
if (this.onRoomDelegate) {
|
|
595
|
-
|
|
674
|
+
logger?.verbose('#Listener ON_ROOM_LISTENER_CALL', {
|
|
596
675
|
...data,
|
|
597
676
|
room,
|
|
598
677
|
localPeer,
|
|
@@ -606,7 +685,8 @@ export class HMSSDK {
|
|
|
606
685
|
if (data.id !== this.id) {
|
|
607
686
|
return;
|
|
608
687
|
}
|
|
609
|
-
|
|
688
|
+
logger?.verbose('#Listener ON_PEER', data);
|
|
689
|
+
const peer: HMSPeer = HMSEncoder.encodeHmsPeer(data.peer, this.id);
|
|
610
690
|
const room: HMSRoom = HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
611
691
|
const localPeer: HMSLocalPeer = HMSEncoder.encodeHmsLocalPeer(
|
|
612
692
|
data.localPeer,
|
|
@@ -621,8 +701,8 @@ export class HMSSDK {
|
|
|
621
701
|
this.remotePeers = remotePeers;
|
|
622
702
|
this.room = room;
|
|
623
703
|
if (this.onPeerDelegate) {
|
|
624
|
-
|
|
625
|
-
this.onPeerDelegate({ ...data, localPeer, remotePeers, room });
|
|
704
|
+
logger?.verbose('#Listener ON_PEER_LISTENER_CALL', data);
|
|
705
|
+
this.onPeerDelegate({ ...data, localPeer, remotePeers, room, peer });
|
|
626
706
|
}
|
|
627
707
|
};
|
|
628
708
|
|
|
@@ -630,7 +710,9 @@ export class HMSSDK {
|
|
|
630
710
|
if (data.id !== this.id) {
|
|
631
711
|
return;
|
|
632
712
|
}
|
|
633
|
-
|
|
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);
|
|
634
716
|
const room: HMSRoom = HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
635
717
|
const localPeer: HMSLocalPeer = HMSEncoder.encodeHmsLocalPeer(
|
|
636
718
|
data.localPeer,
|
|
@@ -640,12 +722,22 @@ export class HMSSDK {
|
|
|
640
722
|
data.remotePeers,
|
|
641
723
|
this.id
|
|
642
724
|
);
|
|
725
|
+
if (this.muteStatus && data?.type === 'TRACK_ADDED') {
|
|
726
|
+
this.muteAllPeersAudio(this.muteStatus);
|
|
727
|
+
}
|
|
643
728
|
this.room = room;
|
|
644
729
|
this.localPeer = localPeer;
|
|
645
730
|
this.remotePeers = remotePeers;
|
|
646
731
|
if (this.onTrackDelegate) {
|
|
647
|
-
|
|
648
|
-
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
|
+
});
|
|
649
741
|
}
|
|
650
742
|
};
|
|
651
743
|
|
|
@@ -653,10 +745,10 @@ export class HMSSDK {
|
|
|
653
745
|
if (data.id !== this.id) {
|
|
654
746
|
return;
|
|
655
747
|
}
|
|
656
|
-
|
|
748
|
+
logger?.verbose('#Listener ON_MESSAGE', data);
|
|
657
749
|
const message = new HMSMessage(data);
|
|
658
750
|
if (this.onMessageDelegate) {
|
|
659
|
-
|
|
751
|
+
logger?.verbose('#Listener ON_MESSAGE_LISTENER_CALL', message);
|
|
660
752
|
this.onMessageDelegate(message);
|
|
661
753
|
}
|
|
662
754
|
};
|
|
@@ -665,8 +757,9 @@ export class HMSSDK {
|
|
|
665
757
|
if (data.id !== this.id) {
|
|
666
758
|
return;
|
|
667
759
|
}
|
|
668
|
-
|
|
760
|
+
logger?.verbose('#Listener ON_SPEAKER', data);
|
|
669
761
|
if (this.onSpeakerDelegate) {
|
|
762
|
+
logger?.verbose('#Listener ON_SPEAKER_LISTENER_CALL', data);
|
|
670
763
|
this.onSpeakerDelegate(data);
|
|
671
764
|
}
|
|
672
765
|
};
|
|
@@ -675,9 +768,11 @@ export class HMSSDK {
|
|
|
675
768
|
if (data.id !== this.id) {
|
|
676
769
|
return;
|
|
677
770
|
}
|
|
678
|
-
|
|
771
|
+
logger?.warn('#Listener ON_ERROR', data);
|
|
772
|
+
logger?.verbose('#Listener ON_ERROR', data);
|
|
679
773
|
if (this.onErrorDelegate) {
|
|
680
|
-
|
|
774
|
+
logger?.verbose('#Listener ON_ERROR_LISTENER_CALL', data);
|
|
775
|
+
logger?.warn('#Listener ON_ERROR_LISTENER_CALL', data);
|
|
681
776
|
this.onErrorDelegate(data);
|
|
682
777
|
}
|
|
683
778
|
};
|
|
@@ -686,14 +781,14 @@ export class HMSSDK {
|
|
|
686
781
|
if (data.id !== this.id) {
|
|
687
782
|
return;
|
|
688
783
|
}
|
|
689
|
-
|
|
784
|
+
logger?.verbose('#Listener ON_ROLE_CHANGE_REQUEST', data);
|
|
690
785
|
if (this.onRoleChangeRequestDelegate) {
|
|
691
786
|
const encodedRoleChangeRequest = HMSEncoder.encodeHmsRoleChangeRequest(
|
|
692
787
|
data,
|
|
693
788
|
this.id
|
|
694
789
|
);
|
|
695
|
-
|
|
696
|
-
'ON_ROLE_CHANGE_LISTENER_CALL',
|
|
790
|
+
logger?.verbose(
|
|
791
|
+
'#Listener ON_ROLE_CHANGE_LISTENER_CALL',
|
|
697
792
|
encodedRoleChangeRequest
|
|
698
793
|
);
|
|
699
794
|
this.onRoleChangeRequestDelegate(encodedRoleChangeRequest);
|
|
@@ -701,12 +796,15 @@ export class HMSSDK {
|
|
|
701
796
|
};
|
|
702
797
|
|
|
703
798
|
onChangeTrackStateRequestListener = (data: any) => {
|
|
704
|
-
this.
|
|
799
|
+
if (data.id !== this.id) {
|
|
800
|
+
return;
|
|
801
|
+
}
|
|
802
|
+
logger?.verbose('#Listener ON_CHANGE_TRACK_STATE_REQUEST', data);
|
|
705
803
|
if (this.onChangeTrackStateRequestDelegate) {
|
|
706
804
|
const encodedRoleChangeRequest =
|
|
707
805
|
HMSEncoder.encodeHmsChangeTrackStateRequest(data, this.id);
|
|
708
|
-
|
|
709
|
-
'ON_CHANGE_TRACK_STATE_REQUEST_LISTENER_CALL',
|
|
806
|
+
logger?.verbose(
|
|
807
|
+
'#Listener ON_CHANGE_TRACK_STATE_REQUEST_LISTENER_CALL',
|
|
710
808
|
encodedRoleChangeRequest
|
|
711
809
|
);
|
|
712
810
|
this.onChangeTrackStateRequestDelegate(encodedRoleChangeRequest);
|
|
@@ -717,7 +815,7 @@ export class HMSSDK {
|
|
|
717
815
|
if (data.id !== this.id) {
|
|
718
816
|
return;
|
|
719
817
|
}
|
|
720
|
-
|
|
818
|
+
logger?.verbose('#Listener ON_REMOVED_FROM_ROOM', data);
|
|
721
819
|
if (this.onRemovedFromRoomDelegate) {
|
|
722
820
|
let requestedBy = null;
|
|
723
821
|
if (data.requestedBy) {
|
|
@@ -726,10 +824,11 @@ export class HMSSDK {
|
|
|
726
824
|
const reason = data.reason;
|
|
727
825
|
const roomEnded = data.roomEnded;
|
|
728
826
|
|
|
729
|
-
|
|
827
|
+
logger?.verbose('#Listener ON_REMOVED_FROM_ROOM_LISTENER_CALL', {
|
|
730
828
|
requestedBy,
|
|
731
829
|
reason,
|
|
732
830
|
roomEnded,
|
|
831
|
+
id: this.id,
|
|
733
832
|
});
|
|
734
833
|
this.onRemovedFromRoomDelegate({ requestedBy, reason, roomEnded });
|
|
735
834
|
}
|
|
@@ -739,7 +838,7 @@ export class HMSSDK {
|
|
|
739
838
|
if (data.id !== this.id) {
|
|
740
839
|
return;
|
|
741
840
|
}
|
|
742
|
-
|
|
841
|
+
logger?.verbose('#Listener ON_RECONNECTING', data);
|
|
743
842
|
if (this.onReconnectingDelegate) {
|
|
744
843
|
this.onReconnectingDelegate(data);
|
|
745
844
|
}
|
|
@@ -749,7 +848,7 @@ export class HMSSDK {
|
|
|
749
848
|
if (data.id !== this.id) {
|
|
750
849
|
return;
|
|
751
850
|
}
|
|
752
|
-
|
|
851
|
+
logger?.verbose('#Listener ON_RECONNECTED', data);
|
|
753
852
|
if (this.onReconnectedDelegate) {
|
|
754
853
|
this.onReconnectedDelegate(data);
|
|
755
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
|
+
}
|
package/src/classes/HMSTrack.ts
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import { NativeModules } from 'react-native';
|
|
2
1
|
import type { HMSTrackType } from './HMSTrackType';
|
|
3
2
|
|
|
4
|
-
const {
|
|
5
|
-
/**
|
|
6
|
-
* @ignore
|
|
7
|
-
*/
|
|
8
|
-
HmsManager,
|
|
9
|
-
} = NativeModules;
|
|
10
|
-
|
|
11
3
|
export class HMSTrack {
|
|
12
4
|
trackId: string;
|
|
13
5
|
source?: number | string;
|
|
@@ -16,13 +8,8 @@ export class HMSTrack {
|
|
|
16
8
|
id: string;
|
|
17
9
|
type?: HMSTrackType;
|
|
18
10
|
|
|
19
|
-
isMute =
|
|
20
|
-
|
|
21
|
-
let val = await HmsManager.isMute({ trackId: this.trackId, id: this.id });
|
|
22
|
-
return val;
|
|
23
|
-
} catch (err) {
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
11
|
+
isMute = () => {
|
|
12
|
+
return this.mute;
|
|
26
13
|
};
|
|
27
14
|
|
|
28
15
|
constructor(params: {
|
|
@@ -4,14 +4,17 @@ import type { HMSVideoTrackSettings } from './HMSVideoTrackSettings';
|
|
|
4
4
|
export class HMSTrackSettings {
|
|
5
5
|
video?: HMSVideoTrackSettings;
|
|
6
6
|
audio?: HMSAudioTrackSettings;
|
|
7
|
+
useHardwareEchoCancellation?: boolean;
|
|
7
8
|
|
|
8
9
|
constructor(params?: {
|
|
9
10
|
video?: HMSVideoTrackSettings;
|
|
10
11
|
audio?: HMSAudioTrackSettings;
|
|
12
|
+
useHardwareEchoCancellation?: boolean;
|
|
11
13
|
}) {
|
|
12
14
|
if (params) {
|
|
13
15
|
this.video = params.video;
|
|
14
16
|
this.audio = params.audio;
|
|
17
|
+
this.useHardwareEchoCancellation = params.useHardwareEchoCancellation;
|
|
15
18
|
}
|
|
16
19
|
}
|
|
17
20
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { HMSVideoCodec } from '..';
|
|
2
2
|
|
|
3
3
|
export class HMSVideoSettings {
|
|
4
4
|
bitrate?: number;
|
|
5
5
|
frameRate: number;
|
|
6
6
|
width: number;
|
|
7
7
|
height: number;
|
|
8
|
-
codec:
|
|
8
|
+
codec: HMSVideoCodec;
|
|
9
9
|
|
|
10
10
|
constructor(params: {
|
|
11
11
|
bitrate?: number;
|
|
12
12
|
frameRate: number;
|
|
13
13
|
width: number;
|
|
14
14
|
height: number;
|
|
15
|
-
codec:
|
|
15
|
+
codec: HMSVideoCodec;
|
|
16
16
|
}) {
|
|
17
17
|
this.bitrate = params.bitrate;
|
|
18
18
|
this.frameRate = params.frameRate;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
+
import type { HMSVideoCodec } from './HMSVideoCodec';
|
|
1
2
|
import type { HMSSimulcastLayerSettings } from './HMSSimulcastLayerSettings';
|
|
3
|
+
import type { HMSCameraFacing } from './HMSCameraFacing';
|
|
4
|
+
import type { HMSVideoResolution } from './HMSVideoResolution';
|
|
2
5
|
|
|
3
6
|
export class HMSVideoTrackSettings {
|
|
4
|
-
codec
|
|
5
|
-
resolution
|
|
6
|
-
maxBitrate
|
|
7
|
-
maxFrameRate
|
|
8
|
-
cameraFacing
|
|
7
|
+
codec: HMSVideoCodec;
|
|
8
|
+
resolution: HMSVideoResolution;
|
|
9
|
+
maxBitrate: number;
|
|
10
|
+
maxFrameRate: number;
|
|
11
|
+
cameraFacing: HMSCameraFacing;
|
|
9
12
|
trackDescription?: string;
|
|
10
13
|
simulcastSettings?: HMSSimulcastLayerSettings[];
|
|
11
14
|
|
|
12
15
|
constructor(params: {
|
|
13
|
-
codec
|
|
14
|
-
resolution
|
|
15
|
-
maxBitrate
|
|
16
|
-
maxFrameRate
|
|
17
|
-
cameraFacing
|
|
16
|
+
codec: HMSVideoCodec;
|
|
17
|
+
resolution: HMSVideoResolution;
|
|
18
|
+
maxBitrate: number;
|
|
19
|
+
maxFrameRate: number;
|
|
20
|
+
cameraFacing: HMSCameraFacing;
|
|
18
21
|
trackDescription?: string;
|
|
19
22
|
simulcastSettings?: HMSSimulcastLayerSettings[];
|
|
20
23
|
}) {
|