@100mslive/react-native-hms 0.8.4 → 0.9.2
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 +247 -26
- 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/gradle.xml +13 -0
- package/android/.idea/misc.xml +9 -0
- package/android/.idea/modules/android.iml +18 -0
- package/android/.idea/modules.xml +8 -0
- package/android/.idea/sonarlint/issuestore/f/0/f07866736216be0ee2aba49e392191aeae700a35 +0 -0
- package/android/.idea/sonarlint/issuestore/index.pb +3 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/build.gradle +4 -2
- package/android/local.properties +8 -0
- package/android/src/main/java/com/reactnativehmssdk/HmsDecoder.kt +67 -5
- package/android/src/main/java/com/reactnativehmssdk/HmsHelper.kt +67 -64
- package/android/src/main/java/com/reactnativehmssdk/HmsModule.kt +97 -6
- package/android/src/main/java/com/reactnativehmssdk/HmsSDK.kt +302 -118
- package/android/src/main/java/com/reactnativehmssdk/HmsScreenshareActivity.kt +77 -0
- package/android/src/main/java/com/reactnativehmssdk/HmsView.kt +28 -3
- package/android/src/main/java/com/reactnativehmssdk/HmssdkViewManager.kt +10 -1
- package/android/src/main/res/layout/hms_view.xml +19 -0
- package/ios/HmsDecoder.swift +250 -123
- package/ios/HmsHelper.swift +70 -38
- package/ios/HmsManager.m +11 -3
- package/ios/HmsManager.swift +123 -66
- package/ios/HmsSDK.swift +384 -195
- package/ios/HmsView.swift +50 -68
- package/ios/VideoCollectionViewCell.swift +4 -4
- package/lib/commonjs/classes/HMSBrowserRecordingState.js +6 -0
- package/lib/commonjs/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSEncoder.js +180 -3
- package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSConfig.js +23 -0
- package/lib/commonjs/classes/HMSHLSConfig.js.map +1 -0
- package/lib/commonjs/classes/HMSHLSMeetingURLVariant.js +23 -0
- package/lib/commonjs/classes/HMSHLSMeetingURLVariant.js.map +1 -0
- package/lib/commonjs/classes/HMSHLSRecordingConfig.js +23 -0
- package/lib/commonjs/classes/HMSHLSRecordingConfig.js.map +1 -0
- package/lib/commonjs/classes/HMSHLSRecordingState.js +29 -0
- package/lib/commonjs/classes/HMSHLSRecordingState.js.map +1 -0
- package/lib/commonjs/classes/HMSHLSStreamingState.js +23 -0
- package/lib/commonjs/classes/HMSHLSStreamingState.js.map +1 -0
- package/lib/commonjs/classes/HMSHLSVariant.js +29 -0
- package/lib/commonjs/classes/HMSHLSVariant.js.map +1 -0
- package/lib/commonjs/classes/HMSLocalAudioStats.js +26 -0
- package/lib/commonjs/classes/HMSLocalAudioStats.js.map +1 -0
- package/lib/commonjs/classes/HMSLocalVideoStats.js +32 -0
- package/lib/commonjs/classes/HMSLocalVideoStats.js.map +1 -0
- package/lib/commonjs/classes/HMSLogger.js +48 -21
- package/lib/commonjs/classes/HMSLogger.js.map +1 -1
- package/lib/commonjs/classes/HMSMessage.js +4 -1
- package/lib/commonjs/classes/HMSMessage.js.map +1 -1
- package/lib/commonjs/classes/HMSMessageRecipient.js +26 -0
- package/lib/commonjs/classes/HMSMessageRecipient.js.map +1 -0
- package/lib/commonjs/classes/HMSMessageRecipientType.js +15 -0
- package/lib/commonjs/classes/HMSMessageRecipientType.js.map +1 -0
- package/lib/commonjs/classes/HMSPeerUpdate.js +1 -7
- package/lib/commonjs/classes/HMSPeerUpdate.js.map +1 -1
- package/lib/commonjs/classes/HMSPermissions.js +2 -2
- package/lib/commonjs/classes/HMSPermissions.js.map +1 -1
- package/lib/commonjs/classes/HMSRTCStats.js +38 -0
- package/lib/commonjs/classes/HMSRTCStats.js.map +1 -0
- package/lib/commonjs/classes/HMSRTCStatsReport.js +26 -0
- package/lib/commonjs/classes/HMSRTCStatsReport.js.map +1 -0
- package/lib/commonjs/classes/HMSRemoteAudioStats.js +32 -0
- package/lib/commonjs/classes/HMSRemoteAudioStats.js.map +1 -0
- package/lib/commonjs/classes/HMSRemoteVideoStats.js +38 -0
- package/lib/commonjs/classes/HMSRemoteVideoStats.js.map +1 -0
- package/lib/commonjs/classes/HMSRoom.js +9 -0
- package/lib/commonjs/classes/HMSRoom.js.map +1 -1
- package/lib/commonjs/classes/HMSRoomUpdate.js +7 -0
- package/lib/commonjs/classes/HMSRoomUpdate.js.map +1 -1
- package/lib/commonjs/classes/HMSRtmpStreamingState.js +6 -0
- package/lib/commonjs/classes/HMSRtmpStreamingState.js.map +1 -1
- package/lib/commonjs/classes/HMSSDK.js +488 -114
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HMSServerRecordingState.js +3 -0
- package/lib/commonjs/classes/HMSServerRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSUpdateListenerActions.js +5 -0
- package/lib/commonjs/classes/HMSUpdateListenerActions.js.map +1 -1
- package/lib/commonjs/classes/HmsView.js +26 -4
- package/lib/commonjs/classes/HmsView.js.map +1 -1
- package/lib/commonjs/index.js +196 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/classes/HMSBrowserRecordingState.js +6 -0
- package/lib/module/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/module/classes/HMSEncoder.js +172 -3
- package/lib/module/classes/HMSEncoder.js.map +1 -1
- package/lib/module/classes/HMSHLSConfig.js +14 -0
- package/lib/module/classes/HMSHLSConfig.js.map +1 -0
- package/lib/module/classes/HMSHLSMeetingURLVariant.js +14 -0
- package/lib/module/classes/HMSHLSMeetingURLVariant.js.map +1 -0
- package/lib/module/classes/HMSHLSRecordingConfig.js +14 -0
- package/lib/module/classes/HMSHLSRecordingConfig.js.map +1 -0
- package/lib/module/classes/HMSHLSRecordingState.js +20 -0
- package/lib/module/classes/HMSHLSRecordingState.js.map +1 -0
- package/lib/module/classes/HMSHLSStreamingState.js +14 -0
- package/lib/module/classes/HMSHLSStreamingState.js.map +1 -0
- package/lib/module/classes/HMSHLSVariant.js +20 -0
- package/lib/module/classes/HMSHLSVariant.js.map +1 -0
- package/lib/module/classes/HMSLocalAudioStats.js +17 -0
- package/lib/module/classes/HMSLocalAudioStats.js.map +1 -0
- package/lib/module/classes/HMSLocalVideoStats.js +23 -0
- package/lib/module/classes/HMSLocalVideoStats.js.map +1 -0
- package/lib/module/classes/HMSLogger.js +48 -21
- package/lib/module/classes/HMSLogger.js.map +1 -1
- package/lib/module/classes/HMSMessage.js +4 -1
- package/lib/module/classes/HMSMessage.js.map +1 -1
- package/lib/module/classes/HMSMessageRecipient.js +17 -0
- package/lib/module/classes/HMSMessageRecipient.js.map +1 -0
- package/lib/module/classes/HMSMessageRecipientType.js +8 -0
- package/lib/module/classes/HMSMessageRecipientType.js.map +1 -0
- package/lib/module/classes/HMSPeerUpdate.js +1 -7
- package/lib/module/classes/HMSPeerUpdate.js.map +1 -1
- package/lib/module/classes/HMSPermissions.js +2 -2
- package/lib/module/classes/HMSPermissions.js.map +1 -1
- package/lib/module/classes/HMSRTCStats.js +29 -0
- package/lib/module/classes/HMSRTCStats.js.map +1 -0
- package/lib/module/classes/HMSRTCStatsReport.js +17 -0
- package/lib/module/classes/HMSRTCStatsReport.js.map +1 -0
- package/lib/module/classes/HMSRemoteAudioStats.js +23 -0
- package/lib/module/classes/HMSRemoteAudioStats.js.map +1 -0
- package/lib/module/classes/HMSRemoteVideoStats.js +29 -0
- package/lib/module/classes/HMSRemoteVideoStats.js.map +1 -0
- package/lib/module/classes/HMSRoom.js +9 -0
- package/lib/module/classes/HMSRoom.js.map +1 -1
- package/lib/module/classes/HMSRoomUpdate.js +7 -0
- package/lib/module/classes/HMSRoomUpdate.js.map +1 -1
- package/lib/module/classes/HMSRtmpStreamingState.js +6 -0
- package/lib/module/classes/HMSRtmpStreamingState.js.map +1 -1
- package/lib/module/classes/HMSSDK.js +476 -115
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HMSServerRecordingState.js +3 -0
- package/lib/module/classes/HMSServerRecordingState.js.map +1 -1
- package/lib/module/classes/HMSUpdateListenerActions.js +5 -0
- package/lib/module/classes/HMSUpdateListenerActions.js.map +1 -1
- package/lib/module/classes/HmsView.js +23 -4
- package/lib/module/classes/HmsView.js.map +1 -1
- package/lib/module/index.js +14 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/classes/HMSBrowserRecordingState.d.ts +4 -0
- package/lib/typescript/classes/HMSEncoder.d.ts +23 -0
- package/lib/typescript/classes/HMSHLSConfig.d.ts +10 -0
- package/lib/typescript/classes/HMSHLSMeetingURLVariant.d.ts +8 -0
- package/lib/typescript/classes/HMSHLSRecordingConfig.d.ts +8 -0
- package/lib/typescript/classes/HMSHLSRecordingState.d.ts +12 -0
- package/lib/typescript/classes/HMSHLSStreamingState.d.ts +9 -0
- package/lib/typescript/classes/HMSHLSVariant.d.ts +12 -0
- package/lib/typescript/classes/HMSLocalAudioStats.d.ts +10 -0
- package/lib/typescript/classes/HMSLocalVideoStats.d.ts +15 -0
- package/lib/typescript/classes/HMSLogger.d.ts +2 -0
- package/lib/typescript/classes/HMSMessage.d.ts +8 -4
- package/lib/typescript/classes/HMSMessageRecipient.d.ts +13 -0
- package/lib/typescript/classes/HMSMessageRecipientType.d.ts +5 -0
- package/lib/typescript/classes/HMSPeerUpdate.d.ts +2 -8
- package/lib/typescript/classes/HMSPermissions.d.ts +2 -2
- package/lib/typescript/classes/HMSRTCStats.d.ts +18 -0
- package/lib/typescript/classes/HMSRTCStatsReport.d.ts +11 -0
- package/lib/typescript/classes/HMSRemoteAudioStats.d.ts +14 -0
- package/lib/typescript/classes/HMSRemoteVideoStats.d.ts +19 -0
- package/lib/typescript/classes/HMSRoom.d.ts +8 -0
- package/lib/typescript/classes/HMSRoomUpdate.d.ts +8 -1
- package/lib/typescript/classes/HMSRtmpStreamingState.d.ts +4 -0
- package/lib/typescript/classes/HMSSDK.d.ts +325 -14
- package/lib/typescript/classes/HMSServerRecordingState.d.ts +2 -0
- package/lib/typescript/classes/HMSUpdateListenerActions.d.ts +6 -1
- package/lib/typescript/index.d.ts +14 -0
- package/package.json +1 -2
- package/react-native-hms.podspec +1 -1
- package/src/classes/HMSBrowserRecordingState.ts +10 -1
- package/src/classes/HMSEncoder.ts +193 -3
- package/src/classes/HMSHLSConfig.ts +15 -0
- package/src/classes/HMSHLSMeetingURLVariant.ts +9 -0
- package/src/classes/HMSHLSRecordingConfig.ts +9 -0
- package/src/classes/HMSHLSRecordingState.ts +18 -0
- package/src/classes/HMSHLSStreamingState.ts +11 -0
- package/src/classes/HMSHLSVariant.ts +18 -0
- package/src/classes/HMSLocalAudioStats.ts +15 -0
- package/src/classes/HMSLocalVideoStats.ts +23 -0
- package/src/classes/HMSLogger.ts +17 -3
- package/src/classes/HMSMessage.ts +11 -5
- package/src/classes/HMSMessageRecipient.ts +19 -0
- package/src/classes/HMSMessageRecipientType.ts +5 -0
- package/src/classes/HMSPeerUpdate.ts +1 -7
- package/src/classes/HMSPermissions.ts +3 -3
- package/src/classes/HMSRTCStats.ts +27 -0
- package/src/classes/HMSRTCStatsReport.ts +17 -0
- package/src/classes/HMSRemoteAudioStats.ts +21 -0
- package/src/classes/HMSRemoteVideoStats.ts +29 -0
- package/src/classes/HMSRoom.ts +11 -0
- package/src/classes/HMSRoomUpdate.ts +7 -0
- package/src/classes/HMSRtmpStreamingState.ts +10 -1
- package/src/classes/HMSSDK.tsx +618 -30
- package/src/classes/HMSServerRecordingState.ts +7 -1
- package/src/classes/HMSUpdateListenerActions.ts +5 -0
- package/src/classes/HmsView.tsx +32 -4
- package/src/index.ts +14 -0
|
@@ -4,6 +4,7 @@ export declare class HMSLogger {
|
|
|
4
4
|
private _warning;
|
|
5
5
|
private _error;
|
|
6
6
|
private logs;
|
|
7
|
+
private onLog?;
|
|
7
8
|
constructor(params?: {
|
|
8
9
|
verbose: boolean;
|
|
9
10
|
warning: boolean;
|
|
@@ -18,5 +19,6 @@ export declare class HMSLogger {
|
|
|
18
19
|
data: any;
|
|
19
20
|
id: string;
|
|
20
21
|
}[];
|
|
22
|
+
setLogListener(callback: Function): void;
|
|
21
23
|
updateLogLevel(level: HMSLogLevel, value: boolean): void;
|
|
22
24
|
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import type { HMSMessageRecipient } from './HMSMessageRecipient';
|
|
2
|
+
import type { HMSPeer } from './HMSPeer';
|
|
1
3
|
export declare class HMSMessage {
|
|
2
4
|
message: string;
|
|
3
5
|
type: string;
|
|
4
|
-
time
|
|
5
|
-
sender
|
|
6
|
+
time: Date;
|
|
7
|
+
sender: HMSPeer;
|
|
8
|
+
recipient: HMSMessageRecipient;
|
|
6
9
|
constructor(params: {
|
|
7
10
|
message: string;
|
|
8
11
|
type: string;
|
|
9
|
-
time
|
|
10
|
-
sender
|
|
12
|
+
time: string;
|
|
13
|
+
sender: HMSPeer;
|
|
14
|
+
recipient: HMSMessageRecipient;
|
|
11
15
|
});
|
|
12
16
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HMSMessageRecipientType } from './HMSMessageRecipientType';
|
|
2
|
+
import type { HMSPeer } from './HMSPeer';
|
|
3
|
+
import type { HMSRole } from './HMSRole';
|
|
4
|
+
export declare class HMSMessageRecipient {
|
|
5
|
+
recipientType?: HMSMessageRecipientType;
|
|
6
|
+
recipientPeer?: HMSPeer;
|
|
7
|
+
recipientRoles?: HMSRole[];
|
|
8
|
+
constructor(params: {
|
|
9
|
+
recipientType: HMSMessageRecipientType;
|
|
10
|
+
recipientPeer?: HMSPeer;
|
|
11
|
+
recipientRoles?: HMSRole[];
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
export declare enum HMSPeerUpdate {
|
|
2
2
|
PEER_JOINED = "PEER_JOINED",
|
|
3
3
|
PEER_LEFT = "PEER_LEFT",
|
|
4
|
-
AUDIO_TOGGLED = "AUDIO_TOGGLED",
|
|
5
|
-
VIDEO_TOGGLED = "VIDEO_TOGGLED",
|
|
6
4
|
METADATA_CHANGED = "METADATA_CHANGED",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
RESIGNED_DOMINANT_SPEAKER = "RESIGNED_DOMINANT_SPEAKER",
|
|
10
|
-
STARTED_SPEAKING = "STARTED_SPEAKING",
|
|
11
|
-
STOPPED_SPEAKING = "STOPPED_SPEAKING",
|
|
12
|
-
ROLE_CHANGED = "ROLE_CHANGED"
|
|
5
|
+
ROLE_CHANGED = "ROLE_CHANGED",
|
|
6
|
+
NAME_CHANGED = "NAME_CHANGED"
|
|
13
7
|
}
|
|
@@ -5,7 +5,7 @@ export declare class HMSPermissions {
|
|
|
5
5
|
mute?: boolean;
|
|
6
6
|
changeRole?: boolean;
|
|
7
7
|
recording?: boolean;
|
|
8
|
-
|
|
8
|
+
streaming?: boolean;
|
|
9
9
|
constructor(params?: {
|
|
10
10
|
endRoom?: boolean;
|
|
11
11
|
removeOthers?: boolean;
|
|
@@ -13,6 +13,6 @@ export declare class HMSPermissions {
|
|
|
13
13
|
mute?: boolean;
|
|
14
14
|
changeRole?: boolean;
|
|
15
15
|
recording?: boolean;
|
|
16
|
-
|
|
16
|
+
streaming?: boolean;
|
|
17
17
|
});
|
|
18
18
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare class HMSRTCStats {
|
|
2
|
+
bitrateReceived?: number;
|
|
3
|
+
bitrateSent?: number;
|
|
4
|
+
bytesReceived?: number;
|
|
5
|
+
bytesSent?: number;
|
|
6
|
+
packetsLost?: number;
|
|
7
|
+
packetsReceived?: number;
|
|
8
|
+
roundTripTime?: number;
|
|
9
|
+
constructor(params: {
|
|
10
|
+
bitrateReceived?: number;
|
|
11
|
+
bitrateSent?: number;
|
|
12
|
+
bytesReceived?: number;
|
|
13
|
+
bytesSent?: number;
|
|
14
|
+
packetsLost?: number;
|
|
15
|
+
packetsReceived?: number;
|
|
16
|
+
roundTripTime?: number;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HMSRTCStats } from './HMSRTCStats';
|
|
2
|
+
export declare class HMSRTCStatsReport {
|
|
3
|
+
video?: HMSRTCStats;
|
|
4
|
+
audio?: HMSRTCStats;
|
|
5
|
+
combined?: HMSRTCStats;
|
|
6
|
+
constructor(params: {
|
|
7
|
+
video?: HMSRTCStats;
|
|
8
|
+
audio?: HMSRTCStats;
|
|
9
|
+
combined?: HMSRTCStats;
|
|
10
|
+
});
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class HMSRemoteAudioStats {
|
|
2
|
+
bitrate?: number;
|
|
3
|
+
packetsReceived?: number;
|
|
4
|
+
packetsLost?: number;
|
|
5
|
+
bytesReceived?: number;
|
|
6
|
+
jitter?: number;
|
|
7
|
+
constructor(params: {
|
|
8
|
+
bitrate?: number;
|
|
9
|
+
packetsReceived?: number;
|
|
10
|
+
packetsLost?: number;
|
|
11
|
+
bytesReceived?: number;
|
|
12
|
+
jitter?: number;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HMSVideoResolution } from './HMSVideoResolution';
|
|
2
|
+
export declare class HMSRemoteVideoStats {
|
|
3
|
+
bitrate?: number;
|
|
4
|
+
packetsReceived?: number;
|
|
5
|
+
packetsLost?: number;
|
|
6
|
+
bytesReceived?: number;
|
|
7
|
+
jitter?: number;
|
|
8
|
+
resolution?: HMSVideoResolution;
|
|
9
|
+
frameRate?: number;
|
|
10
|
+
constructor(params: {
|
|
11
|
+
bitrate?: number;
|
|
12
|
+
packetsReceived?: number;
|
|
13
|
+
packetsLost?: number;
|
|
14
|
+
bytesReceived?: number;
|
|
15
|
+
jitter?: number;
|
|
16
|
+
resolution?: HMSVideoResolution;
|
|
17
|
+
frameRate?: number;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
@@ -2,6 +2,8 @@ import type { HMSPeer } from './HMSPeer';
|
|
|
2
2
|
import type { HMSRtmpStreamingState } from './HMSRtmpStreamingState';
|
|
3
3
|
import type { HMSServerRecordingState } from './HMSServerRecordingState';
|
|
4
4
|
import type { HMSBrowserRecordingState } from './HMSBrowserRecordingState';
|
|
5
|
+
import type { HMSHLSStreamingState } from './HMSHLSStreamingState';
|
|
6
|
+
import type { HMSHLSRecordingState } from './HMSHLSRecordingState';
|
|
5
7
|
export declare class HMSRoom {
|
|
6
8
|
id: string;
|
|
7
9
|
name: string;
|
|
@@ -10,6 +12,9 @@ export declare class HMSRoom {
|
|
|
10
12
|
browserRecordingState: HMSBrowserRecordingState;
|
|
11
13
|
rtmpHMSRtmpStreamingState: HMSRtmpStreamingState;
|
|
12
14
|
serverRecordingState: HMSServerRecordingState;
|
|
15
|
+
hlsStreamingState: HMSHLSStreamingState;
|
|
16
|
+
hlsRecordingState?: HMSHLSRecordingState;
|
|
17
|
+
peerCount: number;
|
|
13
18
|
constructor(params: {
|
|
14
19
|
id: string;
|
|
15
20
|
name: string;
|
|
@@ -18,5 +23,8 @@ export declare class HMSRoom {
|
|
|
18
23
|
browserRecordingState: HMSBrowserRecordingState;
|
|
19
24
|
rtmpHMSRtmpStreamingState: HMSRtmpStreamingState;
|
|
20
25
|
serverRecordingState: HMSServerRecordingState;
|
|
26
|
+
hlsStreamingState: HMSHLSStreamingState;
|
|
27
|
+
hlsRecordingState?: HMSHLSRecordingState;
|
|
28
|
+
peerCount: number;
|
|
21
29
|
});
|
|
22
30
|
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
export declare enum HMSRoomUpdate {
|
|
2
2
|
ROOM_MUTED = "ROOM_MUTED",
|
|
3
|
-
ROOM_UNMUTED = "ROOM_UNMUTED"
|
|
3
|
+
ROOM_UNMUTED = "ROOM_UNMUTED",
|
|
4
|
+
ROOM_TYPE_CHANGED = "ROOM_TYPE_CHANGED",
|
|
5
|
+
META_DATA_CHANGED = "META_DATA_CHANGED",
|
|
6
|
+
SERVER_RECORDING_STATE_UPDATED = "SERVER_RECORDING_STATE_UPDATED",
|
|
7
|
+
RTMP_STREAMING_STATE_UPDATED = "RTMP_STREAMING_STATE_UPDATED",
|
|
8
|
+
BROWSER_RECORDING_STATE_UPDATED = "BROWSER_RECORDING_STATE_UPDATED",
|
|
9
|
+
HLS_STREAMING_STATE_UPDATED = "HLS_STREAMING_STATE_UPDATED",
|
|
10
|
+
ROOM_ID_UPDATED = "ROOM_ID_UPDATED"
|
|
4
11
|
}
|
|
@@ -2,8 +2,12 @@ import type { HMSException } from './HMSException';
|
|
|
2
2
|
export declare class HMSRtmpStreamingState {
|
|
3
3
|
running: string;
|
|
4
4
|
error: HMSException;
|
|
5
|
+
startedAt: Date;
|
|
6
|
+
stoppedAt: Date;
|
|
5
7
|
constructor(params: {
|
|
6
8
|
running: string;
|
|
7
9
|
error: HMSException;
|
|
10
|
+
startedAt: Date;
|
|
11
|
+
stoppedAt: Date;
|
|
8
12
|
});
|
|
9
13
|
}
|
|
@@ -13,6 +13,7 @@ import type { HMSPeer } from './HMSPeer';
|
|
|
13
13
|
import { HMSVideoViewMode } from './HMSVideoViewMode';
|
|
14
14
|
import type { HMSTrackSettings } from './HMSTrackSettings';
|
|
15
15
|
import type { HMSRTMPConfig } from './HMSRTMPConfig';
|
|
16
|
+
import type { HMSHLSConfig } from './HMSHLSConfig';
|
|
16
17
|
interface HmsComponentProps {
|
|
17
18
|
trackId: string;
|
|
18
19
|
sink: boolean;
|
|
@@ -28,6 +29,7 @@ export declare class HMSSDK {
|
|
|
28
29
|
knownRoles?: HMSRole[];
|
|
29
30
|
id: string;
|
|
30
31
|
private muteStatus;
|
|
32
|
+
appStateSubscription?: any;
|
|
31
33
|
onPreviewDelegate?: any;
|
|
32
34
|
onJoinDelegate?: any;
|
|
33
35
|
onRoomDelegate?: any;
|
|
@@ -41,58 +43,349 @@ export declare class HMSSDK {
|
|
|
41
43
|
onRoleChangeRequestDelegate?: any;
|
|
42
44
|
onChangeTrackStateRequestDelegate?: any;
|
|
43
45
|
onRemovedFromRoomDelegate?: any;
|
|
46
|
+
onRtcStatsDelegate?: any;
|
|
47
|
+
onLocalAudioStatsDelegate?: any;
|
|
48
|
+
onLocalVideoStatsDelegate?: any;
|
|
49
|
+
onRemoteAudioStatsDelegate?: any;
|
|
50
|
+
onRemoteVideoStatsDelegate?: any;
|
|
44
51
|
constructor(id: string);
|
|
45
52
|
/**
|
|
46
53
|
* - Returns an instance of [HMSSDK]{@link HMSSDK}
|
|
47
|
-
* - This function must be called to get an instance of HMSSDK class and only then user can interact with its methods
|
|
54
|
+
* - This function must be called to get an instance of HMSSDK class and only then user can interact with its methods.
|
|
48
55
|
*
|
|
49
56
|
* @static
|
|
50
57
|
* @returns
|
|
51
58
|
* @memberof HMSSDK
|
|
52
59
|
*/
|
|
53
60
|
static build(params?: {
|
|
54
|
-
trackSettings
|
|
61
|
+
trackSettings: HMSTrackSettings;
|
|
55
62
|
}): Promise<HMSSDK>;
|
|
63
|
+
/**
|
|
64
|
+
* - Returns the instance of logger which can be used to manipulate log levels.
|
|
65
|
+
* @returns @instance HMSLogger
|
|
66
|
+
* @memberof HMSSDK
|
|
67
|
+
*/
|
|
56
68
|
static getLogger(): HMSLogger | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* - Updates the logger for this instance of HMSSDK
|
|
71
|
+
* @param {HMSLogger} hmsLogger
|
|
72
|
+
* @memberof HMSSDK
|
|
73
|
+
*/
|
|
57
74
|
setLogger: (hmsLogger: HMSLogger) => void;
|
|
75
|
+
/**
|
|
76
|
+
* - Calls removeListeners that in turn breaks all connections with native listeners.
|
|
77
|
+
*
|
|
78
|
+
* @memberof HMSSDK
|
|
79
|
+
*/
|
|
58
80
|
destroy: () => void;
|
|
81
|
+
/**
|
|
82
|
+
* - Attaches preview listener for native callbacks.
|
|
83
|
+
* Note:this function connects sdk to native side and not app to sdk.
|
|
84
|
+
*
|
|
85
|
+
* @memberof HMSSDK
|
|
86
|
+
*/
|
|
59
87
|
attachPreviewListener: () => void;
|
|
88
|
+
/**
|
|
89
|
+
* - Attaches all the listeners to native callbacks.
|
|
90
|
+
* Note: this function connects sdk to native side and not app to sdk.
|
|
91
|
+
* @memberof HMSSDK
|
|
92
|
+
*/
|
|
60
93
|
attachListeners: () => void;
|
|
94
|
+
/**
|
|
95
|
+
* Disconnects all the listeners of this sdk from native listeners.
|
|
96
|
+
* Note: this function is only called from destroy function and should only be called when the current instance of {@link HMSSDK} is not required anymore.
|
|
97
|
+
* @memberof HMSSDK
|
|
98
|
+
*/
|
|
61
99
|
removeListeners: () => void;
|
|
62
100
|
/**
|
|
63
|
-
* takes an instance of [HMSConfig]{@link HMSConfig} and joins the room
|
|
64
|
-
* after joining the room user will start receiving the events and updates of the room
|
|
101
|
+
* takes an instance of [HMSConfig]{@link HMSConfig} and joins the room.
|
|
102
|
+
* after joining the room user will start receiving the events and updates of the room.
|
|
103
|
+
*
|
|
104
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/join} for more info
|
|
65
105
|
*
|
|
66
106
|
* @param {HMSConfig} config
|
|
67
107
|
* @memberof HMSSDK
|
|
68
108
|
*/
|
|
69
109
|
join: (config: HMSConfig) => Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* - preview function is used to initiate a preview for the localPeer.
|
|
112
|
+
* - We can call this function and wait for a response in previewListener, the response will contain previewTracks for local peer.
|
|
113
|
+
*
|
|
114
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/preview} for more info
|
|
115
|
+
*
|
|
116
|
+
* @param {HMSConfig} config
|
|
117
|
+
* @memberof HMSSDK
|
|
118
|
+
*/
|
|
70
119
|
preview: (config: HMSConfig) => void;
|
|
120
|
+
/**
|
|
121
|
+
* - previewForRole can be used when there is role change request for current localPeer and we want
|
|
122
|
+
* to show the localPeer how the tracks look before publishing them to room.
|
|
123
|
+
*
|
|
124
|
+
* - It requires a role of type [HMSRole]{@link HMSRole} for which we want to preview the tracks.
|
|
125
|
+
*
|
|
126
|
+
* checkout {@link https://www.100ms.live/docs/react-native} for more info
|
|
127
|
+
*
|
|
128
|
+
* @param {HMSRole}
|
|
129
|
+
* @memberof HMSSDK
|
|
130
|
+
*/
|
|
131
|
+
previewForRole: (role: HMSRole) => Promise<any>;
|
|
132
|
+
/**
|
|
133
|
+
* - HmsView is react component that takes one track and starts showing that track on a tile.
|
|
134
|
+
* - The appearance of tile is completely customizable with style prop.
|
|
135
|
+
* - setting sink true or false for a video tile will add or remove sink for a video.
|
|
136
|
+
* - scale type can determine how the incoming video will fit in the canvas check {@link HMSVideoViewMode} for more information.
|
|
137
|
+
*
|
|
138
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/render-video} for more info
|
|
139
|
+
*
|
|
140
|
+
* @param {HmsComponentProps}
|
|
141
|
+
* @memberof HMSSDK
|
|
142
|
+
*/
|
|
71
143
|
HmsView: ({ sink, trackId, style, mirror, scaleType, }: HmsComponentProps) => JSX.Element;
|
|
72
144
|
/**
|
|
73
|
-
* Calls leave function of native sdk and session of current user is invalidated
|
|
145
|
+
* Calls leave function of native sdk and session of current user is invalidated.
|
|
146
|
+
*
|
|
147
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/leave} for more info
|
|
74
148
|
*
|
|
75
149
|
* @memberof HMSSDK
|
|
76
150
|
*/
|
|
77
151
|
leave: () => Promise<any>;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
152
|
+
/**
|
|
153
|
+
* - This function sends message to all the peers in the room, the get the message in onMessage listener.
|
|
154
|
+
*
|
|
155
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/chat} for more info
|
|
156
|
+
*
|
|
157
|
+
* @param {message: string} and @param {type: string}
|
|
158
|
+
* @memberof HMSSDK
|
|
159
|
+
*/
|
|
160
|
+
sendBroadcastMessage: (message: string, type?: string) => Promise<any>;
|
|
161
|
+
/**
|
|
162
|
+
* - sendGroupMessage sends a message to specific set of roles, whoever has any of those role in room
|
|
163
|
+
* will get the message in onMessage listener.
|
|
164
|
+
*
|
|
165
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/chat} for more info
|
|
166
|
+
*
|
|
167
|
+
* @memberof HMSSDK
|
|
168
|
+
*/
|
|
169
|
+
sendGroupMessage: (message: string, roles: HMSRole[], type?: string) => Promise<any>;
|
|
170
|
+
/**
|
|
171
|
+
* - sendDirectMessage sends a private message to a single peer, only that peer will get the message
|
|
172
|
+
* in onMessage Listener.
|
|
173
|
+
*
|
|
174
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/chat} for more info
|
|
175
|
+
*
|
|
176
|
+
* @memberof HMSSDK
|
|
177
|
+
*/
|
|
178
|
+
sendDirectMessage: (message: string, peer: HMSPeer, type?: string) => Promise<any>;
|
|
179
|
+
/**
|
|
180
|
+
* - changeMetadata changes a specific field in localPeer which is [metadata] it is a string that can
|
|
181
|
+
* be used for various functionalities like raiseHand, beRightBack and many more that explains the
|
|
182
|
+
* current status of the peer.
|
|
183
|
+
*
|
|
184
|
+
* - it is advised to use a json object in string format to store multiple dataPoints in metadata.
|
|
185
|
+
*
|
|
186
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-metadata} for more info
|
|
187
|
+
*
|
|
188
|
+
* @param {string}
|
|
189
|
+
* @memberof HMSSDK
|
|
190
|
+
*/
|
|
81
191
|
changeMetadata: (metadata: string) => void;
|
|
192
|
+
/**
|
|
193
|
+
* - startRTMPOrRecording takes a configuration object {@link HMSRTMPConfig} and stats the RTMP recording
|
|
194
|
+
* - this object of {@link HMSRTMPConfig} sets the urls for streaming and weather to set recording on or not
|
|
195
|
+
* - we get the response of this function in onRoomUpdate as RTMP_STREAMING_STATE_UPDATED.
|
|
196
|
+
*
|
|
197
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/recording} for more info
|
|
198
|
+
*
|
|
199
|
+
* @memberof HMSSDK
|
|
200
|
+
*/
|
|
82
201
|
startRTMPOrRecording: (data: HMSRTMPConfig) => Promise<any>;
|
|
202
|
+
/**
|
|
203
|
+
* - this function stops all the ongoing RTMP streaming and recording.
|
|
204
|
+
* - we get the response of this function in onRoomUpdate as RTMP_STREAMING_STATE_UPDATED.
|
|
205
|
+
*
|
|
206
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/recording} for more info
|
|
207
|
+
*
|
|
208
|
+
* @memberof HMSSDK
|
|
209
|
+
*/
|
|
83
210
|
stopRtmpAndRecording: () => Promise<any>;
|
|
211
|
+
/**
|
|
212
|
+
* - This function starts HLSStreaming.
|
|
213
|
+
* - we get the response of this function in onRoomUpdate as HLS_STREAMING_STATE_UPDATED.
|
|
214
|
+
*
|
|
215
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/hls-streaming} for more info
|
|
216
|
+
*
|
|
217
|
+
* @param {HMSHLSConfig}
|
|
218
|
+
* @memberof HMSSDK
|
|
219
|
+
*/
|
|
220
|
+
startHLSStreaming: (data: HMSHLSConfig) => Promise<any>;
|
|
221
|
+
/**
|
|
222
|
+
* - stopHLSStreaming function stops the ongoing HLSStreams.
|
|
223
|
+
* - we get the response of this function in onRoomUpdate as HLS_STREAMING_STATE_UPDATED.
|
|
224
|
+
*
|
|
225
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/hls-streaming} for more info
|
|
226
|
+
*
|
|
227
|
+
* @memberof HMSSDK
|
|
228
|
+
*/
|
|
229
|
+
stopHLSStreaming: () => Promise<any>;
|
|
230
|
+
/**
|
|
231
|
+
* - This function can be used in a situation when we want to change role hence manipulate their
|
|
232
|
+
* access and rights in the current room, it takes the peer {@link HMSPeer} whom role we want to change,
|
|
233
|
+
* role {@link HMSRole} which will be the new role for that peer and weather to forcefully change
|
|
234
|
+
* the role or ask the to accept the role change request using a boolean force.
|
|
235
|
+
*
|
|
236
|
+
* - if we change the role forcefully the peer's role will be updated without asking the peer
|
|
237
|
+
* otherwise the user will get the roleChangeRequest in roleChangeRequest listener.
|
|
238
|
+
* for more information on this checkout {@link onRoleChangeRequestListener}
|
|
239
|
+
*
|
|
240
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-role} for more info
|
|
241
|
+
*
|
|
242
|
+
* @memberof HMSSDK
|
|
243
|
+
*/
|
|
84
244
|
changeRole: (peer: HMSPeer, role: HMSRole, force?: boolean) => Promise<any>;
|
|
245
|
+
/**
|
|
246
|
+
* - This function can be used to manipulate mute status of any track.
|
|
247
|
+
* - Targeted peer affected by this action will get a callback in {@link onChangeTrackStateRequestListener}.
|
|
248
|
+
*
|
|
249
|
+
* * checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-track-state} for more info
|
|
250
|
+
*
|
|
251
|
+
* @param {HMSTrack}
|
|
252
|
+
* @memberof HMSSDK
|
|
253
|
+
*/
|
|
85
254
|
changeTrackState: (track: HMSTrack, mute: boolean) => Promise<any>;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
255
|
+
/**
|
|
256
|
+
* - changeTrackStateForRoles is an enhancement on the functionality of {@link changeTrackState}.
|
|
257
|
+
* - We can change mute status for all the tracks of peers having a particular role.
|
|
258
|
+
* - @param source determines the source of the track ex. video, audio etc.
|
|
259
|
+
* - The peers affected by this action will get a callback in {@link onChangeTrackStateRequestListener}.
|
|
260
|
+
*
|
|
261
|
+
* @memberof HMSSDK
|
|
262
|
+
*/
|
|
263
|
+
changeTrackStateForRoles: (mute: boolean, type?: HMSTrackType | undefined, source?: string | undefined, roles?: HMSRole[] | undefined) => Promise<any>;
|
|
264
|
+
/**
|
|
265
|
+
* - removePeer can forcefully disconnect a Peer from the room.
|
|
266
|
+
* - the user who's removed from this action will get a callback in {@link onRemovedFromRoomListener}.
|
|
267
|
+
*
|
|
268
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/remove-peer} for more info
|
|
269
|
+
*
|
|
270
|
+
* @memberof HMSSDK
|
|
271
|
+
*/
|
|
272
|
+
removePeer: (peer: HMSPeer, reason: string) => Promise<any>;
|
|
273
|
+
/**
|
|
274
|
+
* - endRoom can be used in a situation where we want to disconnect all the peers from current room
|
|
275
|
+
* and end the call.
|
|
276
|
+
* - everyone in the room will get an update of this action in {@link onRemovedFromRoomListener}.
|
|
277
|
+
*
|
|
278
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/end-room} for more info
|
|
279
|
+
*
|
|
280
|
+
* @memberof HMSSDK
|
|
281
|
+
*/
|
|
282
|
+
endRoom: (reason: string, lock?: boolean) => Promise<any>;
|
|
283
|
+
/**
|
|
284
|
+
* - This function can be used to change name of localPeer.
|
|
285
|
+
*
|
|
286
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-name} for more info
|
|
287
|
+
*
|
|
288
|
+
* @memberof HMSSDK
|
|
289
|
+
*/
|
|
290
|
+
changeName: (name: string) => Promise<any>;
|
|
291
|
+
/**
|
|
292
|
+
* - Calling this function will accept the most recent roleChange request made by anyone in the room
|
|
293
|
+
*
|
|
294
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-role} for more info
|
|
295
|
+
*
|
|
296
|
+
* @memberof HMSSDK
|
|
297
|
+
*/
|
|
89
298
|
acceptRoleChange: () => Promise<any>;
|
|
90
|
-
|
|
299
|
+
/**
|
|
300
|
+
* - setPlaybackForAllAudio is an extension of the abilities of {@link setPlaybackAllowed} in
|
|
301
|
+
* {@link HMSRemoteAudioTrack}, it sets mute status for all peers in the room
|
|
302
|
+
*
|
|
303
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/playback-allowed} for more info
|
|
304
|
+
*
|
|
305
|
+
* @memberof HMSSDK
|
|
306
|
+
*/
|
|
307
|
+
setPlaybackForAllAudio: (mute: boolean) => void;
|
|
308
|
+
/**
|
|
309
|
+
* - This function mutes audio for all peers in the room.
|
|
310
|
+
*
|
|
311
|
+
* @memberof HMSSDK
|
|
312
|
+
*/
|
|
313
|
+
remoteMuteAllAudio: () => void;
|
|
314
|
+
/**
|
|
315
|
+
* - getRoom is a wrapper function on an existing native function also known as getRoom the returns
|
|
316
|
+
* current room object which is of type {@link HMSRoom}
|
|
317
|
+
*
|
|
318
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/room} for more info
|
|
319
|
+
*
|
|
320
|
+
* @memberof HMSSDK
|
|
321
|
+
* @return HMSRoom
|
|
322
|
+
*/
|
|
91
323
|
getRoom: () => Promise<HMSRoom>;
|
|
324
|
+
/**
|
|
325
|
+
* - This function sets the volume of any peer in the room
|
|
326
|
+
*
|
|
327
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/set-volume} for more info
|
|
328
|
+
*
|
|
329
|
+
* @memberof HMSSDK
|
|
330
|
+
*/
|
|
92
331
|
setVolume: (track: HMSTrack, volume: number) => void;
|
|
332
|
+
resetVolume: () => void;
|
|
333
|
+
/**
|
|
334
|
+
* - This is a temporary solution for the situation when mic access is taken from the app and
|
|
335
|
+
* user returns to the app with no mic access. It will re-acquire the mic by setting the volume
|
|
336
|
+
* from native side
|
|
337
|
+
*
|
|
338
|
+
* @memberof HMSSDK
|
|
339
|
+
*/
|
|
340
|
+
addAppStateListener: () => void;
|
|
341
|
+
/**
|
|
342
|
+
* - This function is used to start screenshare, currently available only for android
|
|
343
|
+
*
|
|
344
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/screenshare} for more info
|
|
345
|
+
*
|
|
346
|
+
* @memberof HMSSDK
|
|
347
|
+
*/
|
|
348
|
+
startScreenshare: () => Promise<any>;
|
|
349
|
+
/**
|
|
350
|
+
* - Returns a boolean stating if the screen is currently shared or not
|
|
351
|
+
*
|
|
352
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/screenshare} for more info
|
|
353
|
+
*
|
|
354
|
+
* @memberof HMSSDK
|
|
355
|
+
*/
|
|
356
|
+
isScreenShared: () => Promise<any>;
|
|
357
|
+
/**
|
|
358
|
+
* - stops the screenShare, currently available for android only.
|
|
359
|
+
*
|
|
360
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/screenshare} for more info
|
|
361
|
+
*
|
|
362
|
+
* @memberof HMSSDK
|
|
363
|
+
*/
|
|
364
|
+
stopScreenshare: () => Promise<any>;
|
|
365
|
+
/**
|
|
366
|
+
* - enableRTCStats sets a boolean in native side which in turn allows several events to be passed
|
|
367
|
+
* through the bridge these events are {@link RTCStatsListener}, {@link onRemoteVideoStatsListener},
|
|
368
|
+
* {@link onRemoteAudioStatsListener}, {@link onLocalAudioStatsListener} and {@link onLocalVideoStatsListener}
|
|
369
|
+
*
|
|
370
|
+
* - These listeners get various dataPoints for current peers and their connectivity to the room
|
|
371
|
+
* such as jitter, latency etc.
|
|
372
|
+
*
|
|
373
|
+
* - currently available for iOS only
|
|
374
|
+
*
|
|
375
|
+
* @memberof HMSSDK
|
|
376
|
+
*/
|
|
377
|
+
enableRTCStats: () => void;
|
|
378
|
+
/**
|
|
379
|
+
* - disable RTCStats sets the same boolean to false that was set true by enableRTCStats.
|
|
380
|
+
* that activates a check which filters out the events acquired in native listeners and don't
|
|
381
|
+
* let them pass through bridge
|
|
382
|
+
*
|
|
383
|
+
* - currently available for iOS only.
|
|
384
|
+
* @memberof HMSSDK
|
|
385
|
+
*/
|
|
386
|
+
disableRTCStats: () => void;
|
|
93
387
|
/**
|
|
94
388
|
* - This is a prototype event listener that takes action and listens for updates related to that particular action
|
|
95
|
-
* - This method will be @deprecated in future and event listener will be passed in join method
|
|
96
389
|
*
|
|
97
390
|
* @param {string} action
|
|
98
391
|
* @param {*} callback
|
|
@@ -101,7 +394,6 @@ export declare class HMSSDK {
|
|
|
101
394
|
addEventListener: (action: HMSUpdateListenerActions, callback: any) => void;
|
|
102
395
|
/**
|
|
103
396
|
* - This is a prototype event listener that takes action and listens for updates related to that particular action
|
|
104
|
-
* - This method will be @deprecated in future and event listener will be passed in join method
|
|
105
397
|
*
|
|
106
398
|
* @param {string} action
|
|
107
399
|
* @param {*} callback
|
|
@@ -114,6 +406,20 @@ export declare class HMSSDK {
|
|
|
114
406
|
* @memberof HMSSDK
|
|
115
407
|
*/
|
|
116
408
|
removeAllListeners: () => void;
|
|
409
|
+
/**
|
|
410
|
+
* - Below are all the listeners that are connected to native side.
|
|
411
|
+
*
|
|
412
|
+
* - All of the are connected when build function is called, we can connect them to the app by
|
|
413
|
+
* calling {@link addEventListener} with corresponding event type.
|
|
414
|
+
*
|
|
415
|
+
* - Before passing the data to the eventListener of the app these listeners encode the data in
|
|
416
|
+
* ts classes for a proper structuring of the data.
|
|
417
|
+
*
|
|
418
|
+
* - Even When event listeners of the app are disconnected using {@link removeEventListener} or
|
|
419
|
+
* {@link removeAllListeners} or not even connected in first place, these functions still run to
|
|
420
|
+
* maintain the current state of the instance of {@link HMSSDK}.
|
|
421
|
+
*
|
|
422
|
+
*/
|
|
117
423
|
onPreviewListener: (data: any) => void;
|
|
118
424
|
onJoinListener: (data: any) => void;
|
|
119
425
|
onRoomListener: (data: any) => void;
|
|
@@ -127,5 +433,10 @@ export declare class HMSSDK {
|
|
|
127
433
|
onRemovedFromRoomListener: (data: any) => void;
|
|
128
434
|
reconnectingListener: (data: any) => void;
|
|
129
435
|
reconnectedListener: (data: any) => void;
|
|
436
|
+
RTCStatsListener: (data: any) => void;
|
|
437
|
+
onLocalAudioStatsListener: (data: any) => void;
|
|
438
|
+
onLocalVideoStatsListener: (data: any) => void;
|
|
439
|
+
onRemoteAudioStatsListener: (data: any) => void;
|
|
440
|
+
onRemoteVideoStatsListener: (data: any) => void;
|
|
130
441
|
}
|
|
131
442
|
export {};
|
|
@@ -11,5 +11,10 @@ export declare enum HMSUpdateListenerActions {
|
|
|
11
11
|
RECONNECTED = "RECONNECTED",
|
|
12
12
|
ON_ROLE_CHANGE_REQUEST = "ON_ROLE_CHANGE_REQUEST",
|
|
13
13
|
ON_CHANGE_TRACK_STATE_REQUEST = "ON_CHANGE_TRACK_STATE_REQUEST",
|
|
14
|
-
ON_REMOVED_FROM_ROOM = "ON_REMOVED_FROM_ROOM"
|
|
14
|
+
ON_REMOVED_FROM_ROOM = "ON_REMOVED_FROM_ROOM",
|
|
15
|
+
ON_RTC_STATS = "ON_RTC_STATS",
|
|
16
|
+
ON_LOCAL_AUDIO_STATS = "ON_LOCAL_AUDIO_STATS",
|
|
17
|
+
ON_LOCAL_VIDEO_STATS = "ON_LOCAL_VIDEO_STATS",
|
|
18
|
+
ON_REMOTE_AUDIO_STATS = "ON_REMOTE_AUDIO_STATS",
|
|
19
|
+
ON_REMOTE_VIDEO_STATS = "ON_REMOTE_VIDEO_STATS"
|
|
15
20
|
}
|