@100mslive/react-native-hms 0.9.8 → 0.9.92
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 +50 -43
- package/android/.gradle/6.9/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/6.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- 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/.idea/libraries/{Gradle__com_github_100mslive_android_sdk_lib_2_4_2_aar.xml → Gradle__com_github_100mslive_android_sdk_lib_2_4_7_aar.xml} +4 -4
- package/android/.idea/libraries/Gradle__com_github_100mslive_webrtc_m97_hms_1_1_aar.xml +11 -0
- package/android/.idea/modules/android.androidTest.iml +4 -4
- package/android/.idea/modules/android.main.iml +4 -4
- package/android/.idea/modules/android.unitTest.iml +4 -4
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/reactnativehmssdk/HMSAudioshareActivity.kt +84 -0
- package/android/src/main/java/com/reactnativehmssdk/HMSDecoder.kt +77 -8
- package/android/src/main/java/com/reactnativehmssdk/HMSHelper.kt +95 -22
- package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +88 -2
- package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +282 -49
- package/ios/HMSDecoder.swift +9 -8
- package/ios/HMSHelper.swift +5 -8
- package/ios/HMSManager.m +4 -1
- package/ios/HMSManager.swift +28 -6
- package/ios/HMSRNSDK.swift +146 -101
- package/lib/commonjs/classes/HMSAudioDevice.js +17 -0
- package/lib/commonjs/classes/HMSAudioDevice.js.map +1 -0
- package/lib/commonjs/classes/HMSAudioMixingMode.js +15 -0
- package/lib/commonjs/classes/HMSAudioMixingMode.js.map +1 -0
- package/lib/commonjs/classes/HMSAudioMode.js +17 -0
- package/lib/commonjs/classes/HMSAudioMode.js.map +1 -0
- package/lib/commonjs/classes/HMSEncoder.js +15 -0
- package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
- package/lib/commonjs/classes/HMSException.js +18 -13
- package/lib/commonjs/classes/HMSException.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSConfig.js.map +1 -1
- package/lib/commonjs/classes/HMSLogger.js +2 -2
- package/lib/commonjs/classes/HMSLogger.js.map +1 -1
- package/lib/commonjs/classes/HMSPermissions.js +7 -4
- package/lib/commonjs/classes/HMSPermissions.js.map +1 -1
- package/lib/commonjs/classes/HMSSDK.js +267 -58
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HMSUpdateListenerActions.js +1 -0
- package/lib/commonjs/classes/HMSUpdateListenerActions.js.map +1 -1
- package/lib/commonjs/index.js +42 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/classes/HMSAudioDevice.js +10 -0
- package/lib/module/classes/HMSAudioDevice.js.map +1 -0
- package/lib/module/classes/HMSAudioMixingMode.js +8 -0
- package/lib/module/classes/HMSAudioMixingMode.js.map +1 -0
- package/lib/module/classes/HMSAudioMode.js +10 -0
- package/lib/module/classes/HMSAudioMode.js.map +1 -0
- package/lib/module/classes/HMSEncoder.js +14 -0
- package/lib/module/classes/HMSEncoder.js.map +1 -1
- package/lib/module/classes/HMSException.js +18 -13
- package/lib/module/classes/HMSException.js.map +1 -1
- package/lib/module/classes/HMSHLSConfig.js.map +1 -1
- package/lib/module/classes/HMSLogger.js +2 -2
- package/lib/module/classes/HMSLogger.js.map +1 -1
- package/lib/module/classes/HMSPermissions.js +7 -4
- package/lib/module/classes/HMSPermissions.js.map +1 -1
- package/lib/module/classes/HMSSDK.js +267 -52
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HMSUpdateListenerActions.js +1 -0
- package/lib/module/classes/HMSUpdateListenerActions.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/classes/HMSAudioDevice.d.ts +7 -0
- package/lib/typescript/classes/HMSAudioMixingMode.d.ts +5 -0
- package/lib/typescript/classes/HMSAudioMode.d.ts +7 -0
- package/lib/typescript/classes/HMSEncoder.d.ts +2 -0
- package/lib/typescript/classes/HMSException.d.ts +8 -14
- package/lib/typescript/classes/HMSHLSConfig.d.ts +2 -2
- package/lib/typescript/classes/HMSLogger.d.ts +1 -1
- package/lib/typescript/classes/HMSPermissions.d.ts +6 -4
- package/lib/typescript/classes/HMSSDK.d.ts +112 -12
- package/lib/typescript/classes/HMSUpdateListenerActions.d.ts +2 -1
- package/lib/typescript/index.d.ts +3 -0
- package/package.json +1 -19
- package/react-native-hms.podspec +2 -1
- package/src/classes/HMSAudioDevice.ts +7 -0
- package/src/classes/HMSAudioMixingMode.ts +5 -0
- package/src/classes/HMSAudioMode.ts +7 -0
- package/src/classes/HMSEncoder.ts +12 -0
- package/src/classes/HMSException.ts +15 -24
- package/src/classes/HMSHLSConfig.ts +2 -2
- package/src/classes/HMSLogger.ts +2 -2
- package/src/classes/HMSPermissions.ts +9 -6
- package/src/classes/HMSSDK.tsx +352 -67
- package/src/classes/HMSUpdateListenerActions.ts +1 -0
- package/src/index.ts +3 -0
- package/android/.idea/libraries/Gradle__com_github_100mslive_webrtc_m97_aar.xml +0 -11
|
@@ -14,6 +14,9 @@ import type { HMSVideoViewMode } from './HMSVideoViewMode';
|
|
|
14
14
|
import type { HMSTrackSettings } from './HMSTrackSettings';
|
|
15
15
|
import type { HMSRTMPConfig } from './HMSRTMPConfig';
|
|
16
16
|
import type { HMSHLSConfig } from './HMSHLSConfig';
|
|
17
|
+
import type { HMSAudioDevice } from './HMSAudioDevice';
|
|
18
|
+
import type { HMSAudioMode } from './HMSAudioMode';
|
|
19
|
+
import type { HMSAudioMixingMode } from './HMSAudioMixingMode';
|
|
17
20
|
interface HmsViewProps {
|
|
18
21
|
trackId: string;
|
|
19
22
|
style?: ViewStyle;
|
|
@@ -47,6 +50,7 @@ export declare class HMSSDK {
|
|
|
47
50
|
onLocalVideoStatsDelegate?: any;
|
|
48
51
|
onRemoteAudioStatsDelegate?: any;
|
|
49
52
|
onRemoteVideoStatsDelegate?: any;
|
|
53
|
+
onAudioDeviceChangedDelegate?: any;
|
|
50
54
|
constructor(id: string);
|
|
51
55
|
/**
|
|
52
56
|
* - Returns an instance of [HMSSDK]{@link HMSSDK}
|
|
@@ -56,8 +60,10 @@ export declare class HMSSDK {
|
|
|
56
60
|
* @returns
|
|
57
61
|
* @memberof HMSSDK
|
|
58
62
|
*/
|
|
59
|
-
static build(
|
|
60
|
-
trackSettings
|
|
63
|
+
static build({ trackSettings, appGroup, preferredExtension, }: {
|
|
64
|
+
trackSettings?: HMSTrackSettings;
|
|
65
|
+
appGroup?: String;
|
|
66
|
+
preferredExtension?: String;
|
|
61
67
|
}): Promise<HMSSDK>;
|
|
62
68
|
/**
|
|
63
69
|
* - Returns the instance of logger which can be used to manipulate log levels.
|
|
@@ -70,7 +76,7 @@ export declare class HMSSDK {
|
|
|
70
76
|
* @param {HMSLogger} hmsLogger
|
|
71
77
|
* @memberof HMSSDK
|
|
72
78
|
*/
|
|
73
|
-
setLogger: (hmsLogger
|
|
79
|
+
setLogger: (hmsLogger?: HMSLogger) => void;
|
|
74
80
|
/**
|
|
75
81
|
* - Calls removeListeners that in turn breaks all connections with native listeners.
|
|
76
82
|
*
|
|
@@ -129,13 +135,14 @@ export declare class HMSSDK {
|
|
|
129
135
|
*/
|
|
130
136
|
previewForRole: (role: HMSRole) => Promise<any>;
|
|
131
137
|
/**
|
|
132
|
-
* - HmsView is react component that takes
|
|
138
|
+
* - HmsView is react component that takes trackId and starts showing that track on a tile.
|
|
133
139
|
* - The appearance of tile is completely customizable with style prop.
|
|
134
|
-
* -
|
|
140
|
+
* - Scale type can determine how the incoming video will fit in the canvas check {@link HMSVideoViewMode} for more information.
|
|
141
|
+
* - Mirror to flip the video vertically.
|
|
135
142
|
*
|
|
136
143
|
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/render-video} for more info
|
|
137
144
|
*
|
|
138
|
-
* @param {
|
|
145
|
+
* @param {HmsViewProps}
|
|
139
146
|
* @memberof HMSSDK
|
|
140
147
|
*/
|
|
141
148
|
HmsView: React.ForwardRefExoticComponent<HmsViewProps & React.RefAttributes<any>>;
|
|
@@ -186,7 +193,7 @@ export declare class HMSSDK {
|
|
|
186
193
|
* @param {string}
|
|
187
194
|
* @memberof HMSSDK
|
|
188
195
|
*/
|
|
189
|
-
changeMetadata: (metadata: string) =>
|
|
196
|
+
changeMetadata: (metadata: string) => Promise<any>;
|
|
190
197
|
/**
|
|
191
198
|
* - startRTMPOrRecording takes a configuration object {@link HMSRTMPConfig} and stats the RTMP recording
|
|
192
199
|
* - this object of {@link HMSRTMPConfig} sets the urls for streaming and weather to set recording on or not
|
|
@@ -215,7 +222,7 @@ export declare class HMSSDK {
|
|
|
215
222
|
* @param {HMSHLSConfig}
|
|
216
223
|
* @memberof HMSSDK
|
|
217
224
|
*/
|
|
218
|
-
startHLSStreaming: (data
|
|
225
|
+
startHLSStreaming: (data?: HMSHLSConfig) => Promise<any>;
|
|
219
226
|
/**
|
|
220
227
|
* - stopHLSStreaming function stops the ongoing HLSStreams.
|
|
221
228
|
* - we get the response of this function in onRoomUpdate as HLS_STREAMING_STATE_UPDATED.
|
|
@@ -242,7 +249,7 @@ export declare class HMSSDK {
|
|
|
242
249
|
changeRole: (peer: HMSPeer, role: HMSRole, force?: boolean) => Promise<any>;
|
|
243
250
|
/**
|
|
244
251
|
* - This function can be used to manipulate mute status of any track.
|
|
245
|
-
* - Targeted peer affected by this action will get a callback in
|
|
252
|
+
* - Targeted peer affected by this action will get a callback in onChangeTrackStateRequestListener.
|
|
246
253
|
*
|
|
247
254
|
* * checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-track-state} for more info
|
|
248
255
|
*
|
|
@@ -254,7 +261,7 @@ export declare class HMSSDK {
|
|
|
254
261
|
* - changeTrackStateForRoles is an enhancement on the functionality of {@link changeTrackState}.
|
|
255
262
|
* - We can change mute status for all the tracks of peers having a particular role.
|
|
256
263
|
* - @param source determines the source of the track ex. video, audio etc.
|
|
257
|
-
* - The peers affected by this action will get a callback in
|
|
264
|
+
* - The peers affected by this action will get a callback in onChangeTrackStateRequestListener.
|
|
258
265
|
*
|
|
259
266
|
* @memberof HMSSDK
|
|
260
267
|
*/
|
|
@@ -295,7 +302,7 @@ export declare class HMSSDK {
|
|
|
295
302
|
*/
|
|
296
303
|
acceptRoleChange: () => Promise<any>;
|
|
297
304
|
/**
|
|
298
|
-
* - setPlaybackForAllAudio is an extension of the abilities of
|
|
305
|
+
* - setPlaybackForAllAudio is an extension of the abilities of setPlaybackAllowed in
|
|
299
306
|
* {@link HMSRemoteAudioTrack}, it sets mute status for all peers in the room
|
|
300
307
|
*
|
|
301
308
|
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/playback-allowed} for more info
|
|
@@ -308,7 +315,7 @@ export declare class HMSSDK {
|
|
|
308
315
|
*
|
|
309
316
|
* @memberof HMSSDK
|
|
310
317
|
*/
|
|
311
|
-
remoteMuteAllAudio: () =>
|
|
318
|
+
remoteMuteAllAudio: () => Promise<any>;
|
|
312
319
|
/**
|
|
313
320
|
* - getRoom is a wrapper function on an existing native function also known as getRoom the returns
|
|
314
321
|
* current room object which is of type {@link HMSRoom}
|
|
@@ -382,6 +389,94 @@ export declare class HMSSDK {
|
|
|
382
389
|
* @memberof HMSSDK
|
|
383
390
|
*/
|
|
384
391
|
disableRTCStats: () => void;
|
|
392
|
+
/**
|
|
393
|
+
* - This wrapper function is used to start streaming device audio, currently available only for android.
|
|
394
|
+
*
|
|
395
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-share#how-to-stream-device-audio-from-the-app} for more info.
|
|
396
|
+
*
|
|
397
|
+
* @param {HMSAudioMixingMode}
|
|
398
|
+
* @memberof HMSSDK
|
|
399
|
+
*/
|
|
400
|
+
startAudioshare: (audioMixingMode: HMSAudioMixingMode) => Promise<any>;
|
|
401
|
+
/**
|
|
402
|
+
* - This wrapper function returns true if audio is being shared and vice versa, currently available only for android.
|
|
403
|
+
*
|
|
404
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-share#how-to-get-audio-share-status} for more info.
|
|
405
|
+
*
|
|
406
|
+
* @memberof HMSSDK
|
|
407
|
+
*/
|
|
408
|
+
isAudioShared: () => Promise<any>;
|
|
409
|
+
/**
|
|
410
|
+
* - This wrapper function is used to stop streaming device audio, currently available only for android.
|
|
411
|
+
*
|
|
412
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-share#how-to-stop-audio-sharing} for more info.
|
|
413
|
+
*
|
|
414
|
+
* @memberof HMSSDK
|
|
415
|
+
*/
|
|
416
|
+
stopAudioshare: () => Promise<any>;
|
|
417
|
+
/**
|
|
418
|
+
* - This wrapper function returns the current audio mixing mode, currently available only for android.
|
|
419
|
+
*
|
|
420
|
+
* @memberof HMSSDK
|
|
421
|
+
* @return HMSAudioMixingMode
|
|
422
|
+
*/
|
|
423
|
+
getAudioMixingMode: () => Promise<any>;
|
|
424
|
+
/**
|
|
425
|
+
* - This wrapper function used to change the mode while the user is streaming audio, currently available only for android.
|
|
426
|
+
*
|
|
427
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-share#how-to-change-mode} for more info
|
|
428
|
+
*
|
|
429
|
+
* @param {HMSAudioMixingMode}
|
|
430
|
+
* @memberof HMSSDK
|
|
431
|
+
*/
|
|
432
|
+
setAudioMixingMode: (audioMixingMode: HMSAudioMixingMode) => Promise<any>;
|
|
433
|
+
/**
|
|
434
|
+
* - This wrapper function returns the array of audio output devices which is of
|
|
435
|
+
* type {@link HMSAudioDevice[]}, currently available only for android.
|
|
436
|
+
*
|
|
437
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-output-routing#get-list-of-audio-device} for more info
|
|
438
|
+
*
|
|
439
|
+
* @memberof HMSSDK
|
|
440
|
+
* @return HMSAudioDevice[]
|
|
441
|
+
*/
|
|
442
|
+
getAudioDevicesList: () => Promise<any>;
|
|
443
|
+
/**
|
|
444
|
+
* - This wrapper function returns the current audio output device which is of
|
|
445
|
+
* type {@link HMSAudioDevice}, currently available only for android.
|
|
446
|
+
*
|
|
447
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-output-routing#get-current-focussed-device} for more info
|
|
448
|
+
*
|
|
449
|
+
* @memberof HMSSDK
|
|
450
|
+
* @return HMSAudioDevice
|
|
451
|
+
*/
|
|
452
|
+
getAudioOutputRouteType: () => Promise<any>;
|
|
453
|
+
/**
|
|
454
|
+
* - This wrapper function used to switch output to device other than the default, currently available only for android.
|
|
455
|
+
*
|
|
456
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-output-routing#switch-audio-focus-to-another-device} for more info
|
|
457
|
+
*
|
|
458
|
+
* @param {HMSAudioDevice}
|
|
459
|
+
* @memberof HMSSDK
|
|
460
|
+
*/
|
|
461
|
+
switchAudioOutput: (audioDevice: HMSAudioDevice) => any;
|
|
462
|
+
/**
|
|
463
|
+
* - This wrapper function used to change Audio Mode manually, currently available only for android.
|
|
464
|
+
*
|
|
465
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-mode-change} for more info
|
|
466
|
+
*
|
|
467
|
+
* @param {HMSAudioMode}
|
|
468
|
+
* @memberof HMSSDK
|
|
469
|
+
*/
|
|
470
|
+
setAudioMode: (audioMode: HMSAudioMode) => any;
|
|
471
|
+
/**
|
|
472
|
+
* - This is a wrapper function which adds a listener which is triggered when audio output device is switched, currently available only for android.
|
|
473
|
+
*
|
|
474
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-output-routing#adding-a-listener} for more info
|
|
475
|
+
*
|
|
476
|
+
* @param {Function}
|
|
477
|
+
* @memberof HMSSDK
|
|
478
|
+
*/
|
|
479
|
+
setAudioDeviceChangeListener: (callback: Function) => any;
|
|
385
480
|
/**
|
|
386
481
|
* - This is a prototype event listener that takes action and listens for updates related to that particular action
|
|
387
482
|
*
|
|
@@ -436,5 +531,10 @@ export declare class HMSSDK {
|
|
|
436
531
|
onLocalVideoStatsListener: (data: any) => void;
|
|
437
532
|
onRemoteAudioStatsListener: (data: any) => void;
|
|
438
533
|
onRemoteVideoStatsListener: (data: any) => void;
|
|
534
|
+
onAudioDeviceChangedListener: (data: {
|
|
535
|
+
id: string;
|
|
536
|
+
device: string;
|
|
537
|
+
audioDevicesList: string[];
|
|
538
|
+
}) => void;
|
|
439
539
|
}
|
|
440
540
|
export {};
|
|
@@ -16,5 +16,6 @@ export declare enum HMSUpdateListenerActions {
|
|
|
16
16
|
ON_LOCAL_AUDIO_STATS = "ON_LOCAL_AUDIO_STATS",
|
|
17
17
|
ON_LOCAL_VIDEO_STATS = "ON_LOCAL_VIDEO_STATS",
|
|
18
18
|
ON_REMOTE_AUDIO_STATS = "ON_REMOTE_AUDIO_STATS",
|
|
19
|
-
ON_REMOTE_VIDEO_STATS = "ON_REMOTE_VIDEO_STATS"
|
|
19
|
+
ON_REMOTE_VIDEO_STATS = "ON_REMOTE_VIDEO_STATS",
|
|
20
|
+
ON_AUDIO_DEVICE_CHANGED = "ON_AUDIO_DEVICE_CHANGED"
|
|
20
21
|
}
|
|
@@ -62,5 +62,8 @@ export * from './classes/HMSMessageRecipient';
|
|
|
62
62
|
export * from './classes/HMSMessageRecipientType';
|
|
63
63
|
export * from './classes/HMSNetworkQuality';
|
|
64
64
|
export * from './classes/HMSRtmpVideoResolution';
|
|
65
|
+
export * from './classes/HMSAudioDevice';
|
|
66
|
+
export * from './classes/HMSAudioMode';
|
|
67
|
+
export * from './classes/HMSAudioMixingMode';
|
|
65
68
|
import { HMSSDK as HmsManager } from './classes/HMSSDK';
|
|
66
69
|
export default HmsManager;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@100mslive/react-native-hms",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.92",
|
|
4
4
|
"description": "The React Native package for 100ms SDK",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -94,7 +94,6 @@
|
|
|
94
94
|
"jest": "^26.0.1",
|
|
95
95
|
"prettier": "^2.0.5",
|
|
96
96
|
"react-native-builder-bob": "^0.18.0",
|
|
97
|
-
"release-it": "^14.2.2",
|
|
98
97
|
"typescript": "^4.6.3"
|
|
99
98
|
},
|
|
100
99
|
"peerDependencies": {
|
|
@@ -119,23 +118,6 @@
|
|
|
119
118
|
"@commitlint/config-conventional"
|
|
120
119
|
]
|
|
121
120
|
},
|
|
122
|
-
"release-it": {
|
|
123
|
-
"git": {
|
|
124
|
-
"commitMessage": "chore: release ${version}",
|
|
125
|
-
"tagName": "v${version}"
|
|
126
|
-
},
|
|
127
|
-
"npm": {
|
|
128
|
-
"publish": true
|
|
129
|
-
},
|
|
130
|
-
"github": {
|
|
131
|
-
"release": true
|
|
132
|
-
},
|
|
133
|
-
"plugins": {
|
|
134
|
-
"@release-it/conventional-changelog": {
|
|
135
|
-
"preset": "angular"
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
121
|
"eslintConfig": {
|
|
140
122
|
"root": true,
|
|
141
123
|
"extends": [
|
package/react-native-hms.podspec
CHANGED
|
@@ -27,6 +27,7 @@ import { HMSRtmpStreamingState } from './HMSRtmpStreamingState';
|
|
|
27
27
|
import { HMSServerRecordingState } from './HMSServerRecordingState';
|
|
28
28
|
import { HMSMessage } from './HMSMessage';
|
|
29
29
|
import { HMSMessageRecipient } from './HMSMessageRecipient';
|
|
30
|
+
import { HMSException } from './HMSException';
|
|
30
31
|
|
|
31
32
|
export class HMSEncoder {
|
|
32
33
|
static encodeHmsRoom(room: HMSRoom, id: string) {
|
|
@@ -497,4 +498,15 @@ export class HMSEncoder {
|
|
|
497
498
|
recipientRoles: this.encodeHmsRoles(data?.recipientRoles),
|
|
498
499
|
});
|
|
499
500
|
}
|
|
501
|
+
|
|
502
|
+
static encodeHMSException(data: any) {
|
|
503
|
+
return new HMSException({
|
|
504
|
+
code: data?.error?.code,
|
|
505
|
+
description: data?.error?.description,
|
|
506
|
+
message: data?.error?.message,
|
|
507
|
+
name: data?.error?.name,
|
|
508
|
+
action: data?.error?.action,
|
|
509
|
+
isTerminal: data?.error?.isTerminal,
|
|
510
|
+
});
|
|
511
|
+
}
|
|
500
512
|
}
|
|
@@ -1,33 +1,24 @@
|
|
|
1
1
|
export class HMSException {
|
|
2
|
-
|
|
2
|
+
code: number;
|
|
3
|
+
description: string;
|
|
4
|
+
message: string;
|
|
5
|
+
name: string;
|
|
6
|
+
action: string;
|
|
7
|
+
isTerminal: boolean;
|
|
8
|
+
|
|
9
|
+
constructor(params: {
|
|
3
10
|
code: number;
|
|
4
11
|
description: string;
|
|
5
|
-
localizedDescription: string;
|
|
6
12
|
message: string;
|
|
7
13
|
name: string;
|
|
8
14
|
action: string;
|
|
9
|
-
|
|
10
|
-
public event: string;
|
|
11
|
-
|
|
12
|
-
constructor(params: {
|
|
13
|
-
error: {
|
|
14
|
-
code: number;
|
|
15
|
-
description: string;
|
|
16
|
-
localizedDescription: string;
|
|
17
|
-
message: string;
|
|
18
|
-
name: string;
|
|
19
|
-
action: string;
|
|
20
|
-
};
|
|
21
|
-
event: string;
|
|
15
|
+
isTerminal: boolean;
|
|
22
16
|
}) {
|
|
23
|
-
this.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
action: params.error.action,
|
|
30
|
-
};
|
|
31
|
-
this.event = params.event;
|
|
17
|
+
this.code = params.code;
|
|
18
|
+
this.description = params.description;
|
|
19
|
+
this.message = params.message;
|
|
20
|
+
this.name = params.name;
|
|
21
|
+
this.action = params.action;
|
|
22
|
+
this.isTerminal = params.isTerminal;
|
|
32
23
|
}
|
|
33
24
|
}
|
|
@@ -3,11 +3,11 @@ import type { HMSHLSRecordingConfig } from './HMSHLSRecordingConfig';
|
|
|
3
3
|
|
|
4
4
|
export class HMSHLSConfig {
|
|
5
5
|
hlsRecordingConfig?: HMSHLSRecordingConfig;
|
|
6
|
-
meetingURLVariants
|
|
6
|
+
meetingURLVariants?: Array<HMSHLSMeetingURLVariant>;
|
|
7
7
|
|
|
8
8
|
constructor(params: {
|
|
9
9
|
hlsRecordingConfig?: HMSHLSRecordingConfig;
|
|
10
|
-
meetingURLVariants
|
|
10
|
+
meetingURLVariants?: Array<HMSHLSMeetingURLVariant>;
|
|
11
11
|
}) {
|
|
12
12
|
this.hlsRecordingConfig = params.hlsRecordingConfig;
|
|
13
13
|
this.meetingURLVariants = params.meetingURLVariants;
|
package/src/classes/HMSLogger.ts
CHANGED
|
@@ -6,9 +6,9 @@ export const getLogger = () => {
|
|
|
6
6
|
return logger;
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
export const setLogger = (
|
|
9
|
+
export const setLogger = (id: string, hmsLogger?: HMSLogger) => {
|
|
10
10
|
logger = hmsLogger;
|
|
11
|
-
hmsLogger
|
|
11
|
+
hmsLogger?.verbose('#Function setLogger', { id });
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export class HMSLogger {
|
|
@@ -4,8 +4,9 @@ export class HMSPermissions {
|
|
|
4
4
|
unmute?: boolean;
|
|
5
5
|
mute?: boolean;
|
|
6
6
|
changeRole?: boolean;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
browserRecording?: boolean;
|
|
8
|
+
hlsStreaming?: boolean;
|
|
9
|
+
rtmpStreaming?: boolean;
|
|
9
10
|
|
|
10
11
|
constructor(params?: {
|
|
11
12
|
endRoom?: boolean;
|
|
@@ -13,8 +14,9 @@ export class HMSPermissions {
|
|
|
13
14
|
unmute?: boolean;
|
|
14
15
|
mute?: boolean;
|
|
15
16
|
changeRole?: boolean;
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
browserRecording?: boolean;
|
|
18
|
+
hlsStreaming?: boolean;
|
|
19
|
+
rtmpStreaming?: boolean;
|
|
18
20
|
}) {
|
|
19
21
|
if (params) {
|
|
20
22
|
this.endRoom = params.endRoom;
|
|
@@ -22,8 +24,9 @@ export class HMSPermissions {
|
|
|
22
24
|
this.unmute = params.unmute;
|
|
23
25
|
this.mute = params.mute;
|
|
24
26
|
this.changeRole = params.changeRole;
|
|
25
|
-
this.
|
|
26
|
-
this.
|
|
27
|
+
this.browserRecording = params.browserRecording;
|
|
28
|
+
this.hlsStreaming = params.hlsStreaming;
|
|
29
|
+
this.rtmpStreaming = params.rtmpStreaming;
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
}
|