@100mslive/react-native-hms 0.7.3 → 0.8.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 +37 -39
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.project +34 -0
- package/android/build.gradle +1 -2
- package/android/src/main/java/com/reactnativehmssdk/HmsDecoder.kt +268 -232
- package/android/src/main/java/com/reactnativehmssdk/HmsHelper.kt +122 -12
- package/android/src/main/java/com/reactnativehmssdk/HmsModule.kt +143 -508
- package/android/src/main/java/com/reactnativehmssdk/HmsSDK.kt +935 -0
- package/android/src/main/java/com/reactnativehmssdk/HmsView.kt +34 -22
- package/android/src/main/java/com/reactnativehmssdk/HmssdkPackage.kt +1 -2
- package/android/src/main/java/com/reactnativehmssdk/HmssdkViewManager.kt +9 -13
- package/ios/HmsDecoder.swift +168 -33
- package/ios/HmsHelper.swift +121 -1
- package/ios/HmsManager.m +20 -14
- package/ios/HmsManager.swift +122 -394
- package/ios/HmsSDK.swift +784 -0
- package/ios/HmsView.swift +16 -8
- package/lib/commonjs/classes/HMSAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioTrackSettings.js +3 -0
- package/lib/commonjs/classes/HMSAudioTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSBrowserRecordingState.js +23 -0
- package/lib/commonjs/classes/HMSBrowserRecordingState.js.map +1 -0
- package/lib/commonjs/classes/HMSCameraFacing.js +14 -0
- package/lib/commonjs/classes/HMSCameraFacing.js.map +1 -0
- package/lib/commonjs/classes/HMSConfig.js +3 -7
- package/lib/commonjs/classes/HMSConfig.js.map +1 -1
- package/lib/commonjs/classes/HMSEncoder.js +65 -35
- package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
- package/lib/commonjs/classes/HMSException.js +30 -0
- package/lib/commonjs/classes/HMSException.js.map +1 -0
- package/lib/commonjs/classes/HMSHelper.js +2 -2
- package/lib/commonjs/classes/HMSHelper.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalAudioTrack.js +39 -1
- package/lib/commonjs/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalVideoTrack.js +28 -2
- package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLogger.js +28 -1
- package/lib/commonjs/classes/HMSLogger.js.map +1 -1
- package/lib/commonjs/classes/HMSPeer.js +3 -0
- package/lib/commonjs/classes/HMSPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSPeerUpdate.js +1 -0
- package/lib/commonjs/classes/HMSPeerUpdate.js.map +1 -1
- package/lib/commonjs/classes/HMSPermissions.js +6 -0
- package/lib/commonjs/classes/HMSPermissions.js.map +1 -1
- package/lib/commonjs/classes/HMSRTMPConfig.js +26 -0
- package/lib/commonjs/classes/HMSRTMPConfig.js.map +1 -0
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js +21 -0
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRemotePeer.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js +21 -0
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRoom.js +9 -0
- package/lib/commonjs/classes/HMSRoom.js.map +1 -1
- package/lib/commonjs/classes/HMSRtmpStreamingState.js +23 -0
- package/lib/commonjs/classes/HMSRtmpStreamingState.js.map +1 -0
- package/lib/commonjs/classes/HMSSDK.js +419 -151
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HMSServerRecordingState.js +23 -0
- package/lib/commonjs/classes/HMSServerRecordingState.js.map +1 -0
- package/lib/commonjs/classes/HMSTrack.js +8 -18
- package/lib/commonjs/classes/HMSTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackSettings.js +3 -0
- package/lib/commonjs/classes/HMSTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackType.js +14 -0
- package/lib/commonjs/classes/HMSTrackType.js.map +1 -0
- package/lib/commonjs/classes/HMSVideoCodec.js +4 -4
- package/lib/commonjs/classes/HMSVideoCodec.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoResolution.js +23 -0
- package/lib/commonjs/classes/HMSVideoResolution.js.map +1 -0
- package/lib/commonjs/classes/HMSVideoSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrack.js +2 -0
- package/lib/commonjs/classes/HMSVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrackSettings.js +0 -3
- package/lib/commonjs/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HmsView.js +10 -7
- package/lib/commonjs/classes/HmsView.js.map +1 -1
- package/lib/commonjs/index.js +112 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/classes/HMSAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSAudioTrackSettings.js +3 -0
- package/lib/module/classes/HMSAudioTrackSettings.js.map +1 -1
- package/lib/module/classes/HMSBrowserRecordingState.js +14 -0
- package/lib/module/classes/HMSBrowserRecordingState.js.map +1 -0
- package/lib/module/classes/HMSCameraFacing.js +7 -0
- package/lib/module/classes/HMSCameraFacing.js.map +1 -0
- package/lib/module/classes/HMSConfig.js +3 -7
- package/lib/module/classes/HMSConfig.js.map +1 -1
- package/lib/module/classes/HMSEncoder.js +64 -35
- package/lib/module/classes/HMSEncoder.js.map +1 -1
- package/lib/module/classes/HMSException.js +21 -0
- package/lib/module/classes/HMSException.js.map +1 -0
- package/lib/module/classes/HMSHelper.js +2 -2
- package/lib/module/classes/HMSHelper.js.map +1 -1
- package/lib/module/classes/HMSLocalAudioTrack.js +37 -2
- package/lib/module/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSLocalPeer.js.map +1 -1
- package/lib/module/classes/HMSLocalVideoTrack.js +25 -2
- package/lib/module/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSLogger.js +28 -1
- package/lib/module/classes/HMSLogger.js.map +1 -1
- package/lib/module/classes/HMSPeer.js +3 -0
- package/lib/module/classes/HMSPeer.js.map +1 -1
- package/lib/module/classes/HMSPeerUpdate.js +1 -0
- package/lib/module/classes/HMSPeerUpdate.js.map +1 -1
- package/lib/module/classes/HMSPermissions.js +6 -0
- package/lib/module/classes/HMSPermissions.js.map +1 -1
- package/lib/module/classes/HMSRTMPConfig.js +17 -0
- package/lib/module/classes/HMSRTMPConfig.js.map +1 -0
- package/lib/module/classes/HMSRemoteAudioTrack.js +18 -0
- package/lib/module/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSRemotePeer.js.map +1 -1
- package/lib/module/classes/HMSRemoteVideoTrack.js +18 -0
- package/lib/module/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSRoom.js +9 -0
- package/lib/module/classes/HMSRoom.js.map +1 -1
- package/lib/module/classes/HMSRtmpStreamingState.js +14 -0
- package/lib/module/classes/HMSRtmpStreamingState.js.map +1 -0
- package/lib/module/classes/HMSSDK.js +408 -151
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HMSServerRecordingState.js +14 -0
- package/lib/module/classes/HMSServerRecordingState.js.map +1 -0
- package/lib/module/classes/HMSTrack.js +8 -16
- package/lib/module/classes/HMSTrack.js.map +1 -1
- package/lib/module/classes/HMSTrackSettings.js +3 -0
- package/lib/module/classes/HMSTrackSettings.js.map +1 -1
- package/lib/module/classes/HMSTrackType.js +7 -0
- package/lib/module/classes/HMSTrackType.js.map +1 -0
- package/lib/module/classes/HMSVideoCodec.js +4 -4
- package/lib/module/classes/HMSVideoCodec.js.map +1 -1
- package/lib/module/classes/HMSVideoResolution.js +14 -0
- package/lib/module/classes/HMSVideoResolution.js.map +1 -0
- package/lib/module/classes/HMSVideoSettings.js.map +1 -1
- package/lib/module/classes/HMSVideoTrack.js +2 -0
- package/lib/module/classes/HMSVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSVideoTrackSettings.js +0 -3
- package/lib/module/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/module/classes/HmsView.js +10 -7
- package/lib/module/classes/HmsView.js.map +1 -1
- package/lib/module/index.js +8 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/classes/HMSAudioTrack.d.ts +3 -0
- package/lib/typescript/classes/HMSAudioTrackSettings.d.ts +3 -0
- package/lib/typescript/classes/HMSBrowserRecordingState.d.ts +9 -0
- package/lib/typescript/classes/HMSCameraFacing.d.ts +4 -0
- package/lib/typescript/classes/HMSConfig.d.ts +2 -4
- package/lib/typescript/classes/HMSEncoder.d.ts +14 -12
- package/lib/typescript/classes/HMSException.d.ts +22 -0
- package/lib/typescript/classes/HMSLocalAudioTrack.d.ts +5 -0
- package/lib/typescript/classes/HMSLocalPeer.d.ts +6 -0
- package/lib/typescript/classes/HMSLocalVideoTrack.d.ts +4 -0
- package/lib/typescript/classes/HMSLogger.d.ts +11 -4
- package/lib/typescript/classes/HMSPeer.d.ts +2 -0
- package/lib/typescript/classes/HMSPeerUpdate.d.ts +1 -0
- package/lib/typescript/classes/HMSPermissions.d.ts +4 -0
- package/lib/typescript/classes/HMSRTMPConfig.d.ts +10 -0
- package/lib/typescript/classes/HMSRemoteAudioTrack.d.ts +4 -0
- package/lib/typescript/classes/HMSRemotePeer.d.ts +3 -0
- package/lib/typescript/classes/HMSRemoteVideoTrack.d.ts +4 -0
- package/lib/typescript/classes/HMSRoom.d.ts +9 -0
- package/lib/typescript/classes/HMSRtmpStreamingState.d.ts +9 -0
- package/lib/typescript/classes/HMSSDK.d.ts +41 -11
- package/lib/typescript/classes/HMSServerRecordingState.d.ts +9 -0
- package/lib/typescript/classes/HMSTrack.d.ts +6 -1
- package/lib/typescript/classes/HMSTrackSettings.d.ts +2 -0
- package/lib/typescript/classes/HMSTrackType.d.ts +4 -0
- package/lib/typescript/classes/HMSVideoCodec.d.ts +4 -4
- package/lib/typescript/classes/HMSVideoResolution.d.ts +8 -0
- package/lib/typescript/classes/HMSVideoSettings.d.ts +3 -3
- package/lib/typescript/classes/HMSVideoTrack.d.ts +5 -1
- package/lib/typescript/classes/HMSVideoTrackSettings.d.ts +13 -10
- package/lib/typescript/classes/HmsView.d.ts +2 -1
- package/lib/typescript/index.d.ts +8 -0
- package/package.json +1 -1
- package/src/classes/HMSAudioTrack.ts +3 -0
- package/src/classes/HMSAudioTrackSettings.ts +9 -1
- package/src/classes/HMSBrowserRecordingState.ts +11 -0
- package/src/classes/HMSCameraFacing.ts +4 -0
- package/src/classes/HMSConfig.ts +3 -7
- package/src/classes/HMSEncoder.ts +64 -28
- package/src/classes/HMSException.ts +33 -0
- package/src/classes/HMSHelper.ts +2 -2
- package/src/classes/HMSLocalAudioTrack.ts +35 -2
- package/src/classes/HMSLocalPeer.ts +6 -0
- package/src/classes/HMSLocalVideoTrack.ts +22 -2
- package/src/classes/HMSLogger.ts +19 -6
- package/src/classes/HMSPeer.ts +3 -0
- package/src/classes/HMSPeerUpdate.ts +1 -0
- package/src/classes/HMSPermissions.ts +6 -0
- package/src/classes/HMSRTMPConfig.ts +15 -0
- package/src/classes/HMSRemoteAudioTrack.ts +29 -2
- package/src/classes/HMSRemotePeer.ts +3 -0
- package/src/classes/HMSRemoteVideoTrack.ts +29 -2
- package/src/classes/HMSRoom.ts +12 -0
- package/src/classes/HMSRtmpStreamingState.ts +11 -0
- package/src/classes/{HMSSDK.ts → HMSSDK.tsx} +396 -97
- package/src/classes/HMSServerRecordingState.ts +11 -0
- package/src/classes/HMSTrack.ts +9 -15
- package/src/classes/HMSTrackSettings.ts +3 -0
- package/src/classes/HMSTrackType.ts +4 -0
- package/src/classes/HMSVideoCodec.ts +4 -4
- package/src/classes/HMSVideoResolution.ts +9 -0
- package/src/classes/HMSVideoSettings.ts +3 -3
- package/src/classes/HMSVideoTrack.ts +6 -1
- package/src/classes/HMSVideoTrackSettings.ts +13 -10
- package/src/classes/HmsView.tsx +4 -0
- package/src/index.ts +8 -0
- package/ios/Hmssdk.m +0 -8
- package/ios/Hmssdk.swift +0 -8
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { HMSAudioTrack } from './HMSAudioTrack';
|
|
2
2
|
import type { HMSAudioTrackSettings } from './HMSAudioTrackSettings';
|
|
3
|
+
import type { HMSTrackType } from './HMSTrackType';
|
|
3
4
|
export declare class HMSLocalAudioTrack extends HMSAudioTrack {
|
|
4
5
|
settings?: HMSAudioTrackSettings;
|
|
6
|
+
id: string;
|
|
5
7
|
/**
|
|
6
8
|
* Switches Audio of current user on/off depending upon the value of isMute
|
|
7
9
|
*
|
|
@@ -9,11 +11,14 @@ export declare class HMSLocalAudioTrack extends HMSAudioTrack {
|
|
|
9
11
|
* @memberof HMSLocalAudioTrack
|
|
10
12
|
*/
|
|
11
13
|
setMute(isMute: boolean): void;
|
|
14
|
+
getVolume: () => Promise<any>;
|
|
12
15
|
constructor(params: {
|
|
16
|
+
id: string;
|
|
13
17
|
trackId: string;
|
|
14
18
|
source?: number | string;
|
|
15
19
|
trackDescription?: string;
|
|
16
20
|
isMute?: boolean;
|
|
17
21
|
settings?: HMSAudioTrackSettings;
|
|
22
|
+
type?: HMSTrackType;
|
|
18
23
|
});
|
|
19
24
|
}
|
|
@@ -7,6 +7,7 @@ import type { HMSAudioTrackSettings } from './HMSAudioTrackSettings';
|
|
|
7
7
|
import { HMSLocalAudioTrack } from './HMSLocalAudioTrack';
|
|
8
8
|
import { HMSLocalVideoTrack } from './HMSLocalVideoTrack';
|
|
9
9
|
import type { HMSRole } from './HMSRole';
|
|
10
|
+
import type { HMSTrackType } from './HMSTrackType';
|
|
10
11
|
export declare class HMSLocalPeer extends HMSPeer {
|
|
11
12
|
private localAudio?;
|
|
12
13
|
private localVideo?;
|
|
@@ -18,23 +19,28 @@ export declare class HMSLocalPeer extends HMSPeer {
|
|
|
18
19
|
isLocal?: boolean;
|
|
19
20
|
customerUserID?: string;
|
|
20
21
|
customerDescription?: string;
|
|
22
|
+
metadata?: string;
|
|
21
23
|
audioTrack?: HMSAudioTrack;
|
|
22
24
|
videoTrack?: HMSVideoTrack;
|
|
23
25
|
role?: HMSRole;
|
|
24
26
|
auxiliaryTracks?: HMSTrack[];
|
|
25
27
|
localAudioTrackData?: {
|
|
28
|
+
id: string;
|
|
26
29
|
trackId: string;
|
|
27
30
|
source?: number | string;
|
|
28
31
|
trackDescription?: string;
|
|
29
32
|
isMute?: boolean;
|
|
30
33
|
settings?: HMSAudioTrackSettings;
|
|
34
|
+
type: HMSTrackType;
|
|
31
35
|
};
|
|
32
36
|
localVideoTrackData?: {
|
|
37
|
+
id: string;
|
|
33
38
|
trackId: string;
|
|
34
39
|
source?: number | string;
|
|
35
40
|
trackDescription?: string;
|
|
36
41
|
isMute?: boolean;
|
|
37
42
|
settings?: HMSVideoTrackSettings;
|
|
43
|
+
type: HMSTrackType;
|
|
38
44
|
};
|
|
39
45
|
});
|
|
40
46
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { HMSVideoTrack } from './HMSVideoTrack';
|
|
2
2
|
import type { HMSVideoTrackSettings } from './HMSVideoTrackSettings';
|
|
3
|
+
import type { HMSTrackType } from './HMSTrackType';
|
|
3
4
|
export declare class HMSLocalVideoTrack extends HMSVideoTrack {
|
|
4
5
|
settings?: HMSVideoTrackSettings;
|
|
5
6
|
startCapturing?: Function;
|
|
6
7
|
stopCapturing?: Function;
|
|
8
|
+
id: string;
|
|
7
9
|
/**
|
|
8
10
|
* switches camera between front/back
|
|
9
11
|
*
|
|
@@ -18,10 +20,12 @@ export declare class HMSLocalVideoTrack extends HMSVideoTrack {
|
|
|
18
20
|
*/
|
|
19
21
|
setMute(isMute: boolean): void;
|
|
20
22
|
constructor(params: {
|
|
23
|
+
id: string;
|
|
21
24
|
trackId: string;
|
|
22
25
|
source?: number | string;
|
|
23
26
|
trackDescription?: string;
|
|
24
27
|
isMute?: boolean;
|
|
25
28
|
settings?: HMSVideoTrackSettings;
|
|
29
|
+
type?: HMSTrackType;
|
|
26
30
|
});
|
|
27
31
|
}
|
|
@@ -3,13 +3,20 @@ export declare class HMSLogger {
|
|
|
3
3
|
private _verbose;
|
|
4
4
|
private _warning;
|
|
5
5
|
private _error;
|
|
6
|
+
private logs;
|
|
6
7
|
constructor(params?: {
|
|
7
|
-
verbose:
|
|
8
|
-
warning:
|
|
9
|
-
error:
|
|
8
|
+
verbose: boolean;
|
|
9
|
+
warning: boolean;
|
|
10
|
+
error: boolean;
|
|
10
11
|
});
|
|
11
12
|
verbose(message: string, data: any): void;
|
|
12
13
|
warn(message: string, data: any): void;
|
|
13
14
|
error(message: string, data: any): void;
|
|
14
|
-
|
|
15
|
+
getLogs(): {
|
|
16
|
+
type: "verbose" | "warn" | "error";
|
|
17
|
+
message: string;
|
|
18
|
+
data: any;
|
|
19
|
+
id: string;
|
|
20
|
+
}[];
|
|
21
|
+
updateLogLevel(level: HMSLogLevel, value: boolean): void;
|
|
15
22
|
}
|
|
@@ -8,6 +8,7 @@ export declare class HMSPeer {
|
|
|
8
8
|
isLocal?: boolean;
|
|
9
9
|
customerUserID?: string;
|
|
10
10
|
customerDescription?: string;
|
|
11
|
+
metadata?: string;
|
|
11
12
|
role?: HMSRole;
|
|
12
13
|
audioTrack?: HMSAudioTrack;
|
|
13
14
|
videoTrack?: HMSVideoTrack;
|
|
@@ -18,6 +19,7 @@ export declare class HMSPeer {
|
|
|
18
19
|
isLocal?: boolean;
|
|
19
20
|
customerUserID?: string;
|
|
20
21
|
customerDescription?: string;
|
|
22
|
+
metadata?: string;
|
|
21
23
|
role?: HMSRole;
|
|
22
24
|
audioTrack?: HMSAudioTrack;
|
|
23
25
|
videoTrack?: HMSVideoTrack;
|
|
@@ -3,6 +3,7 @@ export declare enum HMSPeerUpdate {
|
|
|
3
3
|
PEER_LEFT = "PEER_LEFT",
|
|
4
4
|
AUDIO_TOGGLED = "AUDIO_TOGGLED",
|
|
5
5
|
VIDEO_TOGGLED = "VIDEO_TOGGLED",
|
|
6
|
+
METADATA_CHANGED = "METADATA_CHANGED",
|
|
6
7
|
BECAME_DOMINANT_SPEAKER = "BECAME_DOMINANT_SPEAKER",
|
|
7
8
|
NO_DOMINANT_SPEAKER = "NO_DOMINANT_SPEAKER",
|
|
8
9
|
RESIGNED_DOMINANT_SPEAKER = "RESIGNED_DOMINANT_SPEAKER",
|
|
@@ -4,11 +4,15 @@ export declare class HMSPermissions {
|
|
|
4
4
|
unmute?: boolean;
|
|
5
5
|
mute?: boolean;
|
|
6
6
|
changeRole?: boolean;
|
|
7
|
+
recording?: boolean;
|
|
8
|
+
rtmp?: boolean;
|
|
7
9
|
constructor(params?: {
|
|
8
10
|
endRoom?: boolean;
|
|
9
11
|
removeOthers?: boolean;
|
|
10
12
|
unmute?: boolean;
|
|
11
13
|
mute?: boolean;
|
|
12
14
|
changeRole?: boolean;
|
|
15
|
+
recording?: boolean;
|
|
16
|
+
rtmp?: boolean;
|
|
13
17
|
});
|
|
14
18
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { HMSTrackType } from './HMSTrackType';
|
|
1
2
|
import { HMSAudioTrack } from './HMSAudioTrack';
|
|
2
3
|
export declare class HMSRemoteAudioTrack extends HMSAudioTrack {
|
|
3
4
|
/**
|
|
@@ -13,5 +14,8 @@ export declare class HMSRemoteAudioTrack extends HMSAudioTrack {
|
|
|
13
14
|
source?: number | string;
|
|
14
15
|
isMute?: boolean;
|
|
15
16
|
trackDescription?: string;
|
|
17
|
+
playbackAllowed?: boolean;
|
|
18
|
+
id: string;
|
|
19
|
+
type?: HMSTrackType;
|
|
16
20
|
});
|
|
17
21
|
}
|
|
@@ -16,6 +16,7 @@ export declare class HMSRemotePeer extends HMSPeer {
|
|
|
16
16
|
isLocal?: boolean;
|
|
17
17
|
customerUserID?: string;
|
|
18
18
|
customerDescription?: string;
|
|
19
|
+
metadata?: string;
|
|
19
20
|
audioTrack?: HMSAudioTrack;
|
|
20
21
|
videoTrack?: HMSVideoTrack;
|
|
21
22
|
role?: HMSRole;
|
|
@@ -26,6 +27,7 @@ export declare class HMSRemotePeer extends HMSPeer {
|
|
|
26
27
|
isMute?: boolean;
|
|
27
28
|
trackDescription?: string;
|
|
28
29
|
playbackAllowed?: boolean;
|
|
30
|
+
id: string;
|
|
29
31
|
};
|
|
30
32
|
remoteVideoTrackData?: {
|
|
31
33
|
trackId: string;
|
|
@@ -34,6 +36,7 @@ export declare class HMSRemotePeer extends HMSPeer {
|
|
|
34
36
|
isMute?: boolean;
|
|
35
37
|
layer?: any;
|
|
36
38
|
playbackAllowed?: boolean;
|
|
39
|
+
id: string;
|
|
37
40
|
};
|
|
38
41
|
});
|
|
39
42
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HMSVideoTrack } from './HMSVideoTrack';
|
|
2
|
+
import type { HMSTrackType } from './HMSTrackType';
|
|
2
3
|
export declare class HMSRemoteVideoTrack extends HMSVideoTrack {
|
|
3
4
|
layer?: any;
|
|
4
5
|
/**
|
|
@@ -15,5 +16,8 @@ export declare class HMSRemoteVideoTrack extends HMSVideoTrack {
|
|
|
15
16
|
trackDescription?: string;
|
|
16
17
|
isMute?: boolean;
|
|
17
18
|
layer?: any;
|
|
19
|
+
playbackAllowed?: boolean;
|
|
20
|
+
id: string;
|
|
21
|
+
type?: HMSTrackType;
|
|
18
22
|
});
|
|
19
23
|
}
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import type { HMSPeer } from './HMSPeer';
|
|
2
|
+
import type { HMSRtmpStreamingState } from './HMSRtmpStreamingState';
|
|
3
|
+
import type { HMSServerRecordingState } from './HMSServerRecordingState';
|
|
4
|
+
import type { HMSBrowserRecordingState } from './HMSBrowserRecordingState';
|
|
2
5
|
export declare class HMSRoom {
|
|
3
6
|
id: string;
|
|
4
7
|
name: string;
|
|
5
8
|
metaData?: string;
|
|
6
9
|
peers: HMSPeer[];
|
|
10
|
+
browserRecordingState: HMSBrowserRecordingState;
|
|
11
|
+
rtmpHMSRtmpStreamingState: HMSRtmpStreamingState;
|
|
12
|
+
serverRecordingState: HMSServerRecordingState;
|
|
7
13
|
constructor(params: {
|
|
8
14
|
id: string;
|
|
9
15
|
name: string;
|
|
10
16
|
metaData?: string;
|
|
11
17
|
peers: HMSPeer[];
|
|
18
|
+
browserRecordingState: HMSBrowserRecordingState;
|
|
19
|
+
rtmpHMSRtmpStreamingState: HMSRtmpStreamingState;
|
|
20
|
+
serverRecordingState: HMSServerRecordingState;
|
|
12
21
|
});
|
|
13
22
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ViewStyle } from 'react-native';
|
|
1
3
|
import { HMSUpdateListenerActions } from './HMSUpdateListenerActions';
|
|
2
4
|
import type { HMSConfig } from './HMSConfig';
|
|
3
5
|
import type { HMSLocalPeer } from './HMSLocalPeer';
|
|
@@ -5,13 +7,27 @@ import type { HMSRemotePeer } from './HMSRemotePeer';
|
|
|
5
7
|
import type { HMSRoom } from './HMSRoom';
|
|
6
8
|
import type { HMSRole } from './HMSRole';
|
|
7
9
|
import type { HMSTrack } from './HMSTrack';
|
|
10
|
+
import type { HMSTrackType } from './HMSTrackType';
|
|
8
11
|
import type { HMSLogger } from './HMSLogger';
|
|
12
|
+
import type { HMSPeer } from './HMSPeer';
|
|
13
|
+
import { HMSVideoViewMode } from './HMSVideoViewMode';
|
|
14
|
+
import type { HMSTrackSettings } from './HMSTrackSettings';
|
|
15
|
+
import type { HMSRTMPConfig } from './HMSRTMPConfig';
|
|
16
|
+
interface HmsComponentProps {
|
|
17
|
+
trackId: string;
|
|
18
|
+
sink: boolean;
|
|
19
|
+
style: ViewStyle;
|
|
20
|
+
mirror?: boolean;
|
|
21
|
+
scaleType: HMSVideoViewMode;
|
|
22
|
+
id?: string | null;
|
|
23
|
+
}
|
|
9
24
|
export declare class HMSSDK {
|
|
10
25
|
room?: HMSRoom;
|
|
11
26
|
localPeer?: HMSLocalPeer;
|
|
12
27
|
remotePeers?: HMSRemotePeer[];
|
|
13
28
|
knownRoles?: HMSRole[];
|
|
14
|
-
|
|
29
|
+
id: string;
|
|
30
|
+
private muteStatus;
|
|
15
31
|
onPreviewDelegate?: any;
|
|
16
32
|
onJoinDelegate?: any;
|
|
17
33
|
onRoomDelegate?: any;
|
|
@@ -25,6 +41,7 @@ export declare class HMSSDK {
|
|
|
25
41
|
onRoleChangeRequestDelegate?: any;
|
|
26
42
|
onChangeTrackStateRequestDelegate?: any;
|
|
27
43
|
onRemovedFromRoomDelegate?: any;
|
|
44
|
+
constructor(id: string);
|
|
28
45
|
/**
|
|
29
46
|
* - Returns an instance of [HMSSDK]{@link HMSSDK}
|
|
30
47
|
* - This function must be called to get an instance of HMSSDK class and only then user can interact with its methods
|
|
@@ -33,9 +50,15 @@ export declare class HMSSDK {
|
|
|
33
50
|
* @returns
|
|
34
51
|
* @memberof HMSSDK
|
|
35
52
|
*/
|
|
36
|
-
static build(
|
|
53
|
+
static build(params?: {
|
|
54
|
+
trackSettings?: HMSTrackSettings;
|
|
55
|
+
}): Promise<HMSSDK>;
|
|
56
|
+
static getLogger(): HMSLogger | undefined;
|
|
57
|
+
setLogger: (hmsLogger: HMSLogger) => void;
|
|
58
|
+
destroy: () => void;
|
|
37
59
|
attachPreviewListener: () => void;
|
|
38
60
|
attachListeners: () => void;
|
|
61
|
+
removeListeners: () => void;
|
|
39
62
|
/**
|
|
40
63
|
* takes an instance of [HMSConfig]{@link HMSConfig} and joins the room
|
|
41
64
|
* after joining the room user will start receiving the events and updates of the room
|
|
@@ -45,21 +68,28 @@ export declare class HMSSDK {
|
|
|
45
68
|
*/
|
|
46
69
|
join: (config: HMSConfig) => Promise<void>;
|
|
47
70
|
preview: (config: HMSConfig) => void;
|
|
71
|
+
HmsView: ({ sink, trackId, style, mirror, scaleType, }: HmsComponentProps) => JSX.Element;
|
|
48
72
|
/**
|
|
49
73
|
* Calls leave function of native sdk and session of current user is invalidated
|
|
50
74
|
*
|
|
51
75
|
* @memberof HMSSDK
|
|
52
76
|
*/
|
|
53
|
-
leave: () =>
|
|
54
|
-
sendBroadcastMessage: (message: string) =>
|
|
55
|
-
sendGroupMessage: (message: string, roles: HMSRole[]) =>
|
|
56
|
-
sendDirectMessage: (message: string, peerId: string) =>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
77
|
+
leave: () => Promise<any>;
|
|
78
|
+
sendBroadcastMessage: (message: string, type?: string | undefined) => Promise<any>;
|
|
79
|
+
sendGroupMessage: (message: string, roles: HMSRole[], type?: string | undefined) => Promise<any>;
|
|
80
|
+
sendDirectMessage: (message: string, peerId: string, type?: string | undefined) => Promise<any>;
|
|
81
|
+
changeMetadata: (metadata: string) => void;
|
|
82
|
+
startRTMPOrRecording: (data: HMSRTMPConfig) => Promise<any>;
|
|
83
|
+
stopRtmpAndRecording: () => Promise<any>;
|
|
84
|
+
changeRole: (peer: HMSPeer, role: HMSRole, force?: boolean) => Promise<any>;
|
|
85
|
+
changeTrackState: (track: HMSTrack, mute: boolean) => Promise<any>;
|
|
86
|
+
changeTrackStateRoles: (type: HMSTrackType, mute: boolean, source: string, roles: Array<HMSRole>) => Promise<any>;
|
|
87
|
+
removePeer: (peerId: string, reason: string) => Promise<any>;
|
|
88
|
+
endRoom: (lock: boolean, reason: string) => Promise<any>;
|
|
61
89
|
acceptRoleChange: () => void;
|
|
62
90
|
muteAllPeersAudio: (mute: boolean) => void;
|
|
91
|
+
getRoom: () => Promise<HMSRoom>;
|
|
92
|
+
setVolume: (track: HMSTrack, volume: number) => void;
|
|
63
93
|
/**
|
|
64
94
|
* - This is a prototype event listener that takes action and listens for updates related to that particular action
|
|
65
95
|
* - This method will be @deprecated in future and event listener will be passed in join method
|
|
@@ -84,7 +114,6 @@ export declare class HMSSDK {
|
|
|
84
114
|
* @memberof HMSSDK
|
|
85
115
|
*/
|
|
86
116
|
removeAllListeners: () => void;
|
|
87
|
-
setLogger: (hmsLogger: HMSLogger) => void;
|
|
88
117
|
onPreviewListener: (data: any) => void;
|
|
89
118
|
onJoinListener: (data: any) => void;
|
|
90
119
|
onRoomListener: (data: any) => void;
|
|
@@ -99,3 +128,4 @@ export declare class HMSSDK {
|
|
|
99
128
|
reconnectingListener: (data: any) => void;
|
|
100
129
|
reconnectedListener: (data: any) => void;
|
|
101
130
|
}
|
|
131
|
+
export {};
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
import type { HMSTrackType } from './HMSTrackType';
|
|
1
2
|
export declare class HMSTrack {
|
|
2
3
|
trackId: string;
|
|
3
4
|
source?: number | string;
|
|
4
5
|
trackDescription?: string;
|
|
5
6
|
mute?: boolean;
|
|
6
|
-
|
|
7
|
+
id: string;
|
|
8
|
+
type?: HMSTrackType;
|
|
9
|
+
isMute: () => boolean | undefined;
|
|
7
10
|
constructor(params: {
|
|
8
11
|
trackId: string;
|
|
9
12
|
source?: number | string;
|
|
10
13
|
trackDescription?: string;
|
|
11
14
|
isMute?: boolean;
|
|
15
|
+
id: string;
|
|
16
|
+
type?: HMSTrackType;
|
|
12
17
|
});
|
|
13
18
|
}
|
|
@@ -3,8 +3,10 @@ import type { HMSVideoTrackSettings } from './HMSVideoTrackSettings';
|
|
|
3
3
|
export declare class HMSTrackSettings {
|
|
4
4
|
video?: HMSVideoTrackSettings;
|
|
5
5
|
audio?: HMSAudioTrackSettings;
|
|
6
|
+
useHardwareEchoCancellation?: boolean;
|
|
6
7
|
constructor(params?: {
|
|
7
8
|
video?: HMSVideoTrackSettings;
|
|
8
9
|
audio?: HMSAudioTrackSettings;
|
|
10
|
+
useHardwareEchoCancellation?: boolean;
|
|
9
11
|
});
|
|
10
12
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { HMSVideoCodec } from '..';
|
|
2
2
|
export declare class HMSVideoSettings {
|
|
3
3
|
bitrate?: number;
|
|
4
4
|
frameRate: number;
|
|
5
5
|
width: number;
|
|
6
6
|
height: number;
|
|
7
|
-
codec:
|
|
7
|
+
codec: HMSVideoCodec;
|
|
8
8
|
constructor(params: {
|
|
9
9
|
bitrate?: number;
|
|
10
10
|
frameRate: number;
|
|
11
11
|
width: number;
|
|
12
12
|
height: number;
|
|
13
|
-
codec:
|
|
13
|
+
codec: HMSVideoCodec;
|
|
14
14
|
});
|
|
15
15
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HMSTrack } from './HMSTrack';
|
|
2
|
+
import type { HMSTrackType } from './HMSTrackType';
|
|
2
3
|
export declare class HMSVideoTrack extends HMSTrack {
|
|
3
|
-
isDegraded?:
|
|
4
|
+
isDegraded?: boolean;
|
|
4
5
|
addSink?: Function;
|
|
5
6
|
removeSink?: Function;
|
|
6
7
|
constructor(params: {
|
|
@@ -8,5 +9,8 @@ export declare class HMSVideoTrack extends HMSTrack {
|
|
|
8
9
|
source?: number | string;
|
|
9
10
|
trackDescription?: string;
|
|
10
11
|
isMute?: boolean;
|
|
12
|
+
id: string;
|
|
13
|
+
isDegraded?: boolean;
|
|
14
|
+
type?: HMSTrackType;
|
|
11
15
|
});
|
|
12
16
|
}
|
|
@@ -1,18 +1,21 @@
|
|
|
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
|
export declare class HMSVideoTrackSettings {
|
|
3
|
-
codec
|
|
4
|
-
resolution
|
|
5
|
-
maxBitrate
|
|
6
|
-
maxFrameRate
|
|
7
|
-
cameraFacing
|
|
6
|
+
codec: HMSVideoCodec;
|
|
7
|
+
resolution: HMSVideoResolution;
|
|
8
|
+
maxBitrate: number;
|
|
9
|
+
maxFrameRate: number;
|
|
10
|
+
cameraFacing: HMSCameraFacing;
|
|
8
11
|
trackDescription?: string;
|
|
9
12
|
simulcastSettings?: HMSSimulcastLayerSettings[];
|
|
10
13
|
constructor(params: {
|
|
11
|
-
codec
|
|
12
|
-
resolution
|
|
13
|
-
maxBitrate
|
|
14
|
-
maxFrameRate
|
|
15
|
-
cameraFacing
|
|
14
|
+
codec: HMSVideoCodec;
|
|
15
|
+
resolution: HMSVideoResolution;
|
|
16
|
+
maxBitrate: number;
|
|
17
|
+
maxFrameRate: number;
|
|
18
|
+
cameraFacing: HMSCameraFacing;
|
|
16
19
|
trackDescription?: string;
|
|
17
20
|
simulcastSettings?: HMSSimulcastLayerSettings[];
|
|
18
21
|
});
|
|
@@ -7,6 +7,7 @@ interface HmsComponentProps {
|
|
|
7
7
|
style: ViewStyle;
|
|
8
8
|
mirror?: boolean;
|
|
9
9
|
scaleType: HMSVideoViewMode;
|
|
10
|
+
id?: string | null;
|
|
10
11
|
}
|
|
11
|
-
export declare const HmsView: ({ sink, trackId, style, mirror, scaleType, }: HmsComponentProps) => JSX.Element;
|
|
12
|
+
export declare const HmsView: ({ sink, trackId, style, id, mirror, scaleType, }: HmsComponentProps) => JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -8,6 +8,7 @@ export * from './classes/HMSVideoSettings';
|
|
|
8
8
|
export * from './classes/HMSVideoCodec';
|
|
9
9
|
export * from './classes/HMSTrackSettings';
|
|
10
10
|
export * from './classes/HMSTrack';
|
|
11
|
+
export * from './classes/HMSTrackType';
|
|
11
12
|
export * from './classes/HMSSubscribeSettings';
|
|
12
13
|
export * from './classes/HMSSimulcastSettings';
|
|
13
14
|
export * from './classes/HMSSimulcastLayerSettings';
|
|
@@ -39,5 +40,12 @@ export * from './classes/HMSVideoViewMode';
|
|
|
39
40
|
export * from './classes/HMSChangeTrackStateRequest';
|
|
40
41
|
export * from './classes/HMSSpeaker';
|
|
41
42
|
export * from './classes/HMSSpeakerUpdate';
|
|
43
|
+
export * from './classes/HMSCameraFacing';
|
|
44
|
+
export * from './classes/HMSException';
|
|
45
|
+
export * from './classes/HMSRtmpStreamingState';
|
|
46
|
+
export * from './classes/HMSServerRecordingState';
|
|
47
|
+
export * from './classes/HMSBrowserRecordingState';
|
|
48
|
+
export * from './classes/HMSRTMPConfig';
|
|
49
|
+
export * from './classes/HMSVideoResolution';
|
|
42
50
|
import { HMSSDK as HmsManager } from './classes/HMSSDK';
|
|
43
51
|
export default HmsManager;
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HMSTrack } from './HMSTrack';
|
|
2
|
+
import type { HMSTrackType } from './HMSTrackType';
|
|
2
3
|
|
|
3
4
|
export class HMSAudioTrack extends HMSTrack {
|
|
4
5
|
constructor(params?: {
|
|
@@ -6,6 +7,8 @@ export class HMSAudioTrack extends HMSTrack {
|
|
|
6
7
|
source?: number | string;
|
|
7
8
|
trackDescription?: string;
|
|
8
9
|
isMute?: boolean;
|
|
10
|
+
id: string;
|
|
11
|
+
type?: HMSTrackType;
|
|
9
12
|
}) {
|
|
10
13
|
if (params) {
|
|
11
14
|
super(params);
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
+
import type { HMSAudioCodec } from './HMSAudioCodec';
|
|
2
|
+
|
|
1
3
|
export class HMSAudioTrackSettings {
|
|
2
4
|
maxBitrate?: number;
|
|
3
5
|
trackDescription?: string;
|
|
4
|
-
|
|
6
|
+
codec?: HMSAudioCodec;
|
|
7
|
+
constructor(params: {
|
|
8
|
+
maxBitrate: number;
|
|
9
|
+
trackDescription?: string;
|
|
10
|
+
codec: HMSAudioCodec;
|
|
11
|
+
}) {
|
|
5
12
|
this.maxBitrate = params.maxBitrate;
|
|
6
13
|
this.trackDescription = params.trackDescription;
|
|
14
|
+
this.codec = params.codec;
|
|
7
15
|
}
|
|
8
16
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HMSException } from './HMSException';
|
|
2
|
+
|
|
3
|
+
export class HMSBrowserRecordingState {
|
|
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/HMSConfig.ts
CHANGED
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
export class HMSConfig {
|
|
2
|
-
// endpoint: string;
|
|
3
2
|
username: string;
|
|
4
3
|
authToken: string;
|
|
5
|
-
roomID: string;
|
|
6
|
-
userID?: string;
|
|
7
4
|
endpoint?: string;
|
|
5
|
+
metadata?: string;
|
|
8
6
|
|
|
9
7
|
constructor(params: {
|
|
10
8
|
username: string;
|
|
11
|
-
roomID: string;
|
|
12
9
|
authToken: string;
|
|
13
|
-
userID?: string;
|
|
14
10
|
endpoint?: string;
|
|
11
|
+
metadata?: string;
|
|
15
12
|
}) {
|
|
16
|
-
this.roomID = params.roomID;
|
|
17
13
|
this.username = params.username;
|
|
18
14
|
this.authToken = params.authToken;
|
|
19
|
-
this.userID = params.userID;
|
|
20
15
|
this.endpoint = params.endpoint;
|
|
16
|
+
this.metadata = params.metadata;
|
|
21
17
|
}
|
|
22
18
|
}
|