@100mslive/react-native-hms 1.7.0 → 1.7.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 +30 -39
- package/android/.gradle/6.7.1/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/6.7.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/6.7.1/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.7.1/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/6.7.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.7.1/gc.properties +0 -0
- package/android/.gradle/6.9/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/6.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/6.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.9/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/6.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -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/.gradle/configuration-cache/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build.gradle +16 -9
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/gradlew +103 -104
- package/android/gradlew.bat +3 -18
- package/android/local.properties +0 -7
- package/android/src/main/java/com/reactnativehmssdk/HMSDecoder.kt +37 -9
- package/android/src/main/java/com/reactnativehmssdk/HMSHelper.kt +2 -1
- package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +7 -0
- package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +39 -10
- package/ios/HMSDecoder.swift +9 -10
- package/ios/HMSHelper.swift +6 -2
- package/ios/HMSManager.m +4 -0
- package/ios/HMSManager.swift +8 -0
- package/ios/HMSRNSDK.swift +54 -24
- package/lib/commonjs/classes/HMSAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSBrowserRecordingState.js +2 -0
- package/lib/commonjs/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSCameraControl.js +3 -5
- package/lib/commonjs/classes/HMSCameraControl.js.map +1 -1
- package/lib/commonjs/classes/HMSEncoder.js +42 -40
- package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
- package/lib/commonjs/classes/HMSEventEmitter.js +10 -0
- package/lib/commonjs/classes/HMSEventEmitter.js.map +1 -0
- package/lib/commonjs/classes/HMSHelper.js +1 -1
- package/lib/commonjs/classes/HMSHelper.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalAudioTrack.js +2 -2
- package/lib/commonjs/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalVideoTrack.js +2 -2
- package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLogger.js +4 -4
- package/lib/commonjs/classes/HMSLogger.js.map +1 -1
- package/lib/commonjs/classes/HMSManagerModule.js +18 -0
- package/lib/commonjs/classes/HMSManagerModule.js.map +1 -0
- package/lib/commonjs/classes/HMSMessage.js.map +1 -1
- package/lib/commonjs/classes/HMSNativeEventEmitter.js +6 -6
- package/lib/commonjs/classes/HMSNativeEventEmitter.js.map +1 -1
- package/lib/commonjs/classes/HMSNativeEventListener.js +13 -0
- package/lib/commonjs/classes/HMSNativeEventListener.js.map +1 -0
- package/lib/commonjs/classes/HMSPeer.js +2 -15
- package/lib/commonjs/classes/HMSPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSPeersCache.js +3 -5
- package/lib/commonjs/classes/HMSPeersCache.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js +2 -2
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRemotePeer.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js +5 -5
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRoom.js.map +1 -1
- package/lib/commonjs/classes/HMSRoomCache.js +10 -5
- package/lib/commonjs/classes/HMSRoomCache.js.map +1 -1
- package/lib/commonjs/classes/HMSSDK.js +165 -170
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HMSSessionStore.js +9 -10
- package/lib/commonjs/classes/HMSSessionStore.js.map +1 -1
- package/lib/commonjs/classes/HMSTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HmsView.js +1 -1
- package/lib/commonjs/classes/HmsView.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js +8 -8
- package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/RCTHMSHLSPlayer.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/hooks.js.map +1 -1
- package/lib/commonjs/hooks/useHMSPeerUpdates.js +77 -0
- package/lib/commonjs/hooks/useHMSPeerUpdates.js.map +1 -0
- package/lib/commonjs/index.js +25 -13
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/classes/HMSAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSBrowserRecordingState.js +2 -0
- package/lib/module/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/module/classes/HMSCameraControl.js +1 -4
- package/lib/module/classes/HMSCameraControl.js.map +1 -1
- package/lib/module/classes/HMSEncoder.js +40 -39
- package/lib/module/classes/HMSEncoder.js.map +1 -1
- package/lib/module/classes/HMSEventEmitter.js +3 -0
- package/lib/module/classes/HMSEventEmitter.js.map +1 -0
- package/lib/module/classes/HMSHelper.js +1 -1
- package/lib/module/classes/HMSHelper.js.map +1 -1
- package/lib/module/classes/HMSLocalAudioTrack.js +2 -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 +2 -2
- package/lib/module/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSLogger.js +4 -4
- package/lib/module/classes/HMSLogger.js.map +1 -1
- package/lib/module/classes/HMSManagerModule.js +11 -0
- package/lib/module/classes/HMSManagerModule.js.map +1 -0
- package/lib/module/classes/HMSMessage.js.map +1 -1
- package/lib/module/classes/HMSNativeEventEmitter.js +6 -6
- package/lib/module/classes/HMSNativeEventEmitter.js.map +1 -1
- package/lib/module/classes/HMSNativeEventListener.js +5 -0
- package/lib/module/classes/HMSNativeEventListener.js.map +1 -0
- package/lib/module/classes/HMSPeer.js +2 -15
- package/lib/module/classes/HMSPeer.js.map +1 -1
- package/lib/module/classes/HMSPeersCache.js +1 -4
- package/lib/module/classes/HMSPeersCache.js.map +1 -1
- package/lib/module/classes/HMSRemoteAudioTrack.js +2 -2
- package/lib/module/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSRemotePeer.js.map +1 -1
- package/lib/module/classes/HMSRemoteVideoTrack.js +5 -5
- package/lib/module/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSRoom.js.map +1 -1
- package/lib/module/classes/HMSRoomCache.js +8 -4
- package/lib/module/classes/HMSRoomCache.js.map +1 -1
- package/lib/module/classes/HMSSDK.js +113 -118
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HMSSessionStore.js +5 -7
- package/lib/module/classes/HMSSessionStore.js.map +1 -1
- package/lib/module/classes/HMSTrack.js.map +1 -1
- package/lib/module/classes/HMSVideoTrack.js.map +1 -1
- package/lib/module/classes/HmsView.js +1 -1
- package/lib/module/classes/HmsView.js.map +1 -1
- package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js +8 -8
- package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
- package/lib/module/components/HMSHLSPlayer/RCTHMSHLSPlayer.js.map +1 -1
- package/lib/module/components/HMSHLSPlayer/hooks.js.map +1 -1
- package/lib/module/hooks/useHMSPeerUpdates.js +67 -0
- package/lib/module/hooks/useHMSPeerUpdates.js.map +1 -0
- package/lib/module/index.js +6 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/classes/HMSAudioTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSBrowserRecordingState.d.ts +2 -0
- package/lib/typescript/classes/HMSEventEmitter.d.ts +2 -0
- package/lib/typescript/classes/HMSLocalAudioTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSLocalPeer.d.ts +4 -2
- package/lib/typescript/classes/HMSLocalVideoTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSManagerModule.d.ts +3 -0
- package/lib/typescript/classes/HMSMessage.d.ts +2 -3
- package/lib/typescript/classes/HMSNativeEventListener.d.ts +4 -0
- package/lib/typescript/classes/HMSPeer.d.ts +2 -3
- package/lib/typescript/classes/HMSRemoteAudioTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSRemotePeer.d.ts +4 -2
- package/lib/typescript/classes/HMSRemoteVideoTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSRoom.d.ts +1 -1
- package/lib/typescript/classes/HMSSDK.d.ts +8 -7
- package/lib/typescript/classes/HMSTrack.d.ts +3 -2
- package/lib/typescript/classes/HMSVideoTrack.d.ts +2 -1
- package/lib/typescript/classes/HmsView.d.ts +1 -1
- package/lib/typescript/components/HMSHLSPlayer/RCTHMSHLSPlayer.d.ts +1 -1
- package/lib/typescript/components/HMSHLSPlayer/hooks.d.ts +1 -1
- package/lib/typescript/hooks/useHMSPeerUpdates.d.ts +7 -0
- package/lib/typescript/index.d.ts +2 -1
- package/package.json +2 -2
- package/sdk-versions.json +2 -2
- package/src/classes/HMSAudioTrack.ts +2 -1
- package/src/classes/HMSBrowserRecordingState.ts +3 -0
- package/src/classes/HMSCameraControl.ts +1 -2
- package/src/classes/HMSEncoder.ts +7 -5
- package/src/classes/HMSEventEmitter.ts +3 -0
- package/src/classes/HMSLocalAudioTrack.ts +2 -1
- package/src/classes/HMSLocalPeer.ts +4 -2
- package/src/classes/HMSLocalVideoTrack.ts +2 -1
- package/src/classes/HMSManagerModule.ts +18 -0
- package/src/classes/HMSMessage.ts +2 -3
- package/src/classes/HMSNativeEventEmitter.ts +2 -1
- package/src/classes/HMSNativeEventListener.ts +8 -0
- package/src/classes/HMSPeer.ts +3 -26
- package/src/classes/HMSPeersCache.ts +2 -3
- package/src/classes/HMSRemoteAudioTrack.ts +2 -1
- package/src/classes/HMSRemotePeer.ts +4 -2
- package/src/classes/HMSRemoteVideoTrack.ts +2 -1
- package/src/classes/HMSRoom.ts +1 -1
- package/src/classes/HMSRoomCache.ts +11 -3
- package/src/classes/HMSSDK.tsx +47 -52
- package/src/classes/HMSSessionStore.ts +6 -8
- package/src/classes/HMSTrack.ts +3 -2
- package/src/classes/HMSVideoTrack.ts +2 -1
- package/src/classes/HmsView.tsx +4 -2
- package/src/components/HMSHLSPlayer/HMSHLSPlayer.tsx +36 -10
- package/src/components/HMSHLSPlayer/RCTHMSHLSPlayer.ts +2 -3
- package/src/components/HMSHLSPlayer/hooks.ts +3 -2
- package/src/hooks/useHMSPeerUpdates.ts +85 -0
- package/src/index.ts +6 -1
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcuserdata/yogesh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/Hmssdk.xcodeproj/xcuserdata/yogesh.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/lib/commonjs/classes/HMSMessageType.js +0 -13
- package/lib/commonjs/classes/HMSMessageType.js.map +0 -1
- package/lib/module/classes/HMSMessageType.js +0 -6
- package/lib/module/classes/HMSMessageType.js.map +0 -1
- package/lib/typescript/classes/HMSMessageType.d.ts +0 -4
- package/src/classes/HMSMessageType.ts +0 -4
|
@@ -5,20 +5,19 @@ import type { HMSTrack } from './HMSTrack';
|
|
|
5
5
|
import type { HMSVideoTrack } from './HMSVideoTrack';
|
|
6
6
|
export declare class HMSPeer {
|
|
7
7
|
peerID: string;
|
|
8
|
-
|
|
8
|
+
name: string;
|
|
9
9
|
private _isLocal;
|
|
10
10
|
private _customerUserID;
|
|
11
11
|
private _metadata;
|
|
12
12
|
private _role;
|
|
13
|
-
private _updateName;
|
|
14
13
|
private _updateIsLocal;
|
|
15
14
|
private _updateCustomerUserID;
|
|
16
15
|
private _updateMetadata;
|
|
17
16
|
private _updateRole;
|
|
18
17
|
constructor(params: {
|
|
19
18
|
peerID: string;
|
|
19
|
+
name: string;
|
|
20
20
|
});
|
|
21
|
-
get name(): string;
|
|
22
21
|
get isLocal(): boolean | undefined;
|
|
23
22
|
get networkQuality(): HMSNetworkQuality | undefined;
|
|
24
23
|
get customerUserID(): string | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { HMSTrackType } from './HMSTrackType';
|
|
2
2
|
import { HMSAudioTrack } from './HMSAudioTrack';
|
|
3
|
+
import type { HMSTrackSource } from './HMSTrackSource';
|
|
3
4
|
export declare class HMSRemoteAudioTrack extends HMSAudioTrack {
|
|
4
5
|
/**
|
|
5
6
|
* Switches Audio of remote user on/off depending upon the value of playbackAllowed
|
|
@@ -11,7 +12,7 @@ export declare class HMSRemoteAudioTrack extends HMSAudioTrack {
|
|
|
11
12
|
isPlaybackAllowed: () => Promise<any>;
|
|
12
13
|
constructor(params: {
|
|
13
14
|
trackId: string;
|
|
14
|
-
source?:
|
|
15
|
+
source?: HMSTrackSource;
|
|
15
16
|
isMute?: boolean;
|
|
16
17
|
trackDescription?: string;
|
|
17
18
|
playbackAllowed?: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HMSPeer } from './HMSPeer';
|
|
2
2
|
import { HMSRemoteAudioTrack } from './HMSRemoteAudioTrack';
|
|
3
3
|
import { HMSRemoteVideoTrack } from './HMSRemoteVideoTrack';
|
|
4
|
+
import type { HMSTrackSource } from './HMSTrackSource';
|
|
4
5
|
export declare class HMSRemotePeer extends HMSPeer {
|
|
5
6
|
private remoteAudio?;
|
|
6
7
|
private remoteVideo?;
|
|
@@ -8,9 +9,10 @@ export declare class HMSRemotePeer extends HMSPeer {
|
|
|
8
9
|
remoteVideoTrack: () => HMSRemoteVideoTrack | undefined;
|
|
9
10
|
constructor(params: {
|
|
10
11
|
peerID: string;
|
|
12
|
+
name: string;
|
|
11
13
|
remoteAudioTrackData?: {
|
|
12
14
|
trackId: string;
|
|
13
|
-
source?:
|
|
15
|
+
source?: HMSTrackSource;
|
|
14
16
|
isMute?: boolean;
|
|
15
17
|
trackDescription?: string;
|
|
16
18
|
playbackAllowed?: boolean;
|
|
@@ -18,7 +20,7 @@ export declare class HMSRemotePeer extends HMSPeer {
|
|
|
18
20
|
};
|
|
19
21
|
remoteVideoTrackData?: {
|
|
20
22
|
trackId: string;
|
|
21
|
-
source?:
|
|
23
|
+
source?: HMSTrackSource;
|
|
22
24
|
trackDescription?: string;
|
|
23
25
|
isMute?: boolean;
|
|
24
26
|
playbackAllowed?: boolean;
|
|
@@ -2,6 +2,7 @@ import { HMSVideoTrack } from './HMSVideoTrack';
|
|
|
2
2
|
import type { HMSTrackType } from './HMSTrackType';
|
|
3
3
|
import type { HMSLayer } from './HMSLayer';
|
|
4
4
|
import type { HMSSimulcastLayerDefinition } from './HMSSimulcastLayerDefinition';
|
|
5
|
+
import type { HMSTrackSource } from './HMSTrackSource';
|
|
5
6
|
export declare class HMSRemoteVideoTrack extends HMSVideoTrack {
|
|
6
7
|
/**
|
|
7
8
|
* Switches Video of remote user on/off depending upon the value of playbackAllowed
|
|
@@ -16,7 +17,7 @@ export declare class HMSRemoteVideoTrack extends HMSVideoTrack {
|
|
|
16
17
|
setLayer(layer: HMSLayer): Promise<any>;
|
|
17
18
|
constructor(params: {
|
|
18
19
|
trackId: string;
|
|
19
|
-
source?:
|
|
20
|
+
source?: HMSTrackSource;
|
|
20
21
|
trackDescription?: string;
|
|
21
22
|
isMute?: boolean;
|
|
22
23
|
playbackAllowed?: boolean;
|
|
@@ -19,6 +19,6 @@ export declare class HMSRoom {
|
|
|
19
19
|
get serverRecordingState(): HMSServerRecordingState;
|
|
20
20
|
get hlsStreamingState(): HMSHLSStreamingState;
|
|
21
21
|
get hlsRecordingState(): HMSHLSRecordingState | undefined;
|
|
22
|
-
get peerCount(): number;
|
|
22
|
+
get peerCount(): number | null;
|
|
23
23
|
get localPeer(): HMSLocalPeer;
|
|
24
24
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { HMSTrackType } from './HMSTrackType';
|
|
3
3
|
import { HMSUpdateListenerActions } from './HMSUpdateListenerActions';
|
|
4
|
-
import { HmsComponentProps } from './HmsView';
|
|
4
|
+
import type { HmsComponentProps } from './HmsView';
|
|
5
5
|
import type { HMSConfig } from './HMSConfig';
|
|
6
6
|
import type { HMSLocalPeer } from './HMSLocalPeer';
|
|
7
7
|
import type { HMSRemotePeer } from './HMSRemotePeer';
|
|
@@ -17,7 +17,6 @@ import type { HMSAudioDevice } from './HMSAudioDevice';
|
|
|
17
17
|
import type { HMSAudioMode } from './HMSAudioMode';
|
|
18
18
|
import type { HMSAudioMixingMode } from './HMSAudioMixingMode';
|
|
19
19
|
import type { HMSLogSettings } from './HMSLogSettings';
|
|
20
|
-
import { HMSMessageType } from './HMSMessageType';
|
|
21
20
|
import { HMSPIPListenerActions } from './HMSPIPListenerActions';
|
|
22
21
|
type HmsViewProps = Omit<HmsComponentProps, 'id'>;
|
|
23
22
|
interface PIPConfig {
|
|
@@ -75,6 +74,7 @@ export declare class HMSSDK {
|
|
|
75
74
|
appGroup?: String;
|
|
76
75
|
preferredExtension?: String;
|
|
77
76
|
logSettings?: HMSLogSettings;
|
|
77
|
+
isPrebuilt?: boolean;
|
|
78
78
|
}): Promise<HMSSDK>;
|
|
79
79
|
/**
|
|
80
80
|
* - Calls removeListeners that in turn breaks all connections with native listeners.
|
|
@@ -149,10 +149,11 @@ export declare class HMSSDK {
|
|
|
149
149
|
*
|
|
150
150
|
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/chat} for more info
|
|
151
151
|
*
|
|
152
|
-
* @param {message: string} and @param {type: string}
|
|
153
152
|
* @memberof HMSSDK
|
|
153
|
+
* @param message the message that is to be sent
|
|
154
|
+
* @param type the default type is set to CHAT. You can pass a custom type here for sending events like Emoji Reactions, Notifications, etc
|
|
154
155
|
*/
|
|
155
|
-
sendBroadcastMessage: (message: string, type?:
|
|
156
|
+
sendBroadcastMessage: (message: string, type?: string) => Promise<{
|
|
156
157
|
messageId: string | undefined;
|
|
157
158
|
}>;
|
|
158
159
|
/**
|
|
@@ -163,7 +164,7 @@ export declare class HMSSDK {
|
|
|
163
164
|
*
|
|
164
165
|
* @memberof HMSSDK
|
|
165
166
|
*/
|
|
166
|
-
sendGroupMessage: (message: string, roles: HMSRole[], type?:
|
|
167
|
+
sendGroupMessage: (message: string, roles: HMSRole[], type?: string) => Promise<{
|
|
167
168
|
messageId: string | undefined;
|
|
168
169
|
}>;
|
|
169
170
|
/**
|
|
@@ -174,7 +175,7 @@ export declare class HMSSDK {
|
|
|
174
175
|
*
|
|
175
176
|
* @memberof HMSSDK
|
|
176
177
|
*/
|
|
177
|
-
sendDirectMessage: (message: string, peer: HMSPeer, type?:
|
|
178
|
+
sendDirectMessage: (message: string, peer: HMSPeer, type?: string) => Promise<{
|
|
178
179
|
messageId: string | undefined;
|
|
179
180
|
}>;
|
|
180
181
|
/**
|
|
@@ -487,8 +488,8 @@ export declare class HMSSDK {
|
|
|
487
488
|
*
|
|
488
489
|
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-output-routing#switch-audio-focus-to-another-device} for more info
|
|
489
490
|
*
|
|
490
|
-
* @param {HMSAudioDevice}
|
|
491
491
|
* @memberof HMSSDK
|
|
492
|
+
* @param audioDevice
|
|
492
493
|
*/
|
|
493
494
|
switchAudioOutput: (audioDevice: HMSAudioDevice) => any;
|
|
494
495
|
switchAudioOutputUsingIOSUI: () => any;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { HMSTrackSource } from './HMSTrackSource';
|
|
1
2
|
import type { HMSTrackType } from './HMSTrackType';
|
|
2
3
|
export declare class HMSTrack {
|
|
3
4
|
trackId: string;
|
|
4
|
-
source?:
|
|
5
|
+
source?: HMSTrackSource;
|
|
5
6
|
trackDescription?: string;
|
|
6
7
|
mute?: boolean;
|
|
7
8
|
id: string;
|
|
@@ -9,7 +10,7 @@ export declare class HMSTrack {
|
|
|
9
10
|
isMute: () => boolean | undefined;
|
|
10
11
|
constructor(params: {
|
|
11
12
|
trackId: string;
|
|
12
|
-
source?:
|
|
13
|
+
source?: HMSTrackSource;
|
|
13
14
|
trackDescription?: string;
|
|
14
15
|
isMute?: boolean;
|
|
15
16
|
id: string;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { HMSTrack } from './HMSTrack';
|
|
2
|
+
import type { HMSTrackSource } from './HMSTrackSource';
|
|
2
3
|
import type { HMSTrackType } from './HMSTrackType';
|
|
3
4
|
export declare class HMSVideoTrack extends HMSTrack {
|
|
4
5
|
isDegraded?: boolean;
|
|
5
6
|
constructor(params: {
|
|
6
7
|
trackId: string;
|
|
7
|
-
source?:
|
|
8
|
+
source?: HMSTrackSource;
|
|
8
9
|
trackDescription?: string;
|
|
9
10
|
isMute?: boolean;
|
|
10
11
|
id: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StyleProp, NativeSyntheticEvent, ViewStyle, NativeMethods } from 'react-native';
|
|
1
|
+
import type { StyleProp, NativeSyntheticEvent, ViewStyle, NativeMethods } from 'react-native';
|
|
2
2
|
import type { HMSHLSPlayerPlaybackEvent, HMSHLSPlayerStatsEvent } from '../../types';
|
|
3
3
|
export type HmsHlsPlaybackEventHandler = (event: NativeSyntheticEvent<HMSHLSPlayerPlaybackEvent>) => void;
|
|
4
4
|
export type HmsHlsStatsEventHandler = (event: NativeSyntheticEvent<HMSHLSPlayerStatsEvent>) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DependencyList } from 'react';
|
|
1
|
+
import type { DependencyList } from 'react';
|
|
2
2
|
import type { HMSHLSPlayerStatsUpdateEventData } from '../../types';
|
|
3
3
|
import type { HMSHLSPlayerCue, HMSHLSPlayerPlaybackError, HMSHLSPlayerStatsError } from '../../stores/types';
|
|
4
4
|
export declare const useHMSHLSPlayerPlaybackState: () => import("../../types").HMSHLSPlayerPlaybackState;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { HMSPeer } from '../classes/HMSPeer';
|
|
3
|
+
import { HMSPeerUpdate } from '../classes/HMSPeerUpdate';
|
|
4
|
+
export declare const useHMSPeerUpdates: (effect: (data: {
|
|
5
|
+
peer: HMSPeer;
|
|
6
|
+
type: HMSPeerUpdate;
|
|
7
|
+
}) => void, deps?: React.DependencyList | undefined) => void;
|
|
@@ -73,7 +73,6 @@ export * from './classes/HMSAudioMixerSource';
|
|
|
73
73
|
export * from './classes/HMSTrackSettingsInitState';
|
|
74
74
|
export * from './classes/HMSLogSettings';
|
|
75
75
|
export * from './classes/HMSLogAlarmManager';
|
|
76
|
-
export * from './classes/HMSMessageType';
|
|
77
76
|
export * from './classes/HMSPIPListenerActions';
|
|
78
77
|
export * from './classes/HMSLayer';
|
|
79
78
|
export * from './classes/HMSSimulcastLayerDefinition';
|
|
@@ -84,7 +83,9 @@ export * from './classes/HMSIOSAudioMode';
|
|
|
84
83
|
export type { HMSSessionStore, HMSSessionStoreValue, } from './classes/HMSSessionStore';
|
|
85
84
|
export type { HmsViewComponent as HMSView } from './classes/HmsView';
|
|
86
85
|
import { HMSSDK as HmsManager } from './classes/HMSSDK';
|
|
86
|
+
export { default as HMSManagerModule } from './classes/HMSManagerModule';
|
|
87
87
|
export * from './components/HMSHLSPlayer';
|
|
88
|
+
export * from './hooks/useHMSPeerUpdates';
|
|
88
89
|
export * from './types';
|
|
89
90
|
export * from './stores/types';
|
|
90
91
|
export default HmsManager;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@100mslive/react-native-hms",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "Integrate Real Time Audio and Video conferencing, Interactive Live Streaming, and Chat in your apps with 100ms React Native SDK. With support for HLS and RTMP Live Streaming and Recording, Picture-in-Picture (PiP), one-to-one Video Call Modes, Audio Rooms, Video Player and much more, add immersive real-time communications to your apps.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"test": "jest",
|
|
27
27
|
"typescript": "tsc --noEmit",
|
|
28
28
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
29
|
-
"
|
|
29
|
+
"prepack": "bob build",
|
|
30
30
|
"release": "release-it",
|
|
31
31
|
"example": "yarn --cwd example",
|
|
32
32
|
"pods": "cd example && pod-install --quiet",
|
package/sdk-versions.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { HMSTrack } from './HMSTrack';
|
|
2
|
+
import type { HMSTrackSource } from './HMSTrackSource';
|
|
2
3
|
import type { HMSTrackType } from './HMSTrackType';
|
|
3
4
|
|
|
4
5
|
export class HMSAudioTrack extends HMSTrack {
|
|
5
6
|
constructor(params?: {
|
|
6
7
|
trackId: string;
|
|
7
|
-
source?:
|
|
8
|
+
source?: HMSTrackSource;
|
|
8
9
|
trackDescription?: string;
|
|
9
10
|
isMute?: boolean;
|
|
10
11
|
id: string;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import type { HMSException } from './HMSException';
|
|
2
2
|
|
|
3
3
|
export class HMSBrowserRecordingState {
|
|
4
|
+
initialising: boolean;
|
|
4
5
|
running: boolean;
|
|
5
6
|
error?: HMSException;
|
|
6
7
|
startedAt?: Date;
|
|
7
8
|
stoppedAt?: Date;
|
|
8
9
|
|
|
9
10
|
constructor(params: {
|
|
11
|
+
initialising: boolean;
|
|
10
12
|
running: boolean;
|
|
11
13
|
error?: HMSException;
|
|
12
14
|
startedAt?: Date;
|
|
13
15
|
stoppedAt?: Date;
|
|
14
16
|
}) {
|
|
17
|
+
this.initialising = params.initialising;
|
|
15
18
|
this.running = params.running;
|
|
16
19
|
this.error = params.error;
|
|
17
20
|
this.startedAt = params.startedAt;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import HMSManager from './HMSManagerModule';
|
|
2
2
|
|
|
3
3
|
import { HMSTrack } from './HMSTrack';
|
|
4
4
|
import { HMSAudioTrack } from './HMSAudioTrack';
|
|
@@ -40,8 +40,6 @@ import { HMSLayer } from './HMSLayer';
|
|
|
40
40
|
import { HMSSimulcastLayerDefinition } from './HMSSimulcastLayerDefinition';
|
|
41
41
|
import { HMSQualityLimitationReasons } from './HMSQualityLimitationReasons';
|
|
42
42
|
|
|
43
|
-
const { HMSManager } = NativeModules;
|
|
44
|
-
|
|
45
43
|
interface InitialData {
|
|
46
44
|
roles: Record<string, HMSRole>;
|
|
47
45
|
}
|
|
@@ -95,6 +93,7 @@ export class HMSEncoder {
|
|
|
95
93
|
static encodeHmsPeer(peer: any) {
|
|
96
94
|
const encodedObj = {
|
|
97
95
|
peerID: peer?.peerID,
|
|
96
|
+
name: peer?.name,
|
|
98
97
|
};
|
|
99
98
|
|
|
100
99
|
return new HMSPeer(encodedObj);
|
|
@@ -155,6 +154,7 @@ export class HMSEncoder {
|
|
|
155
154
|
static encodeHmsLocalPeer(peer: any, id: string) {
|
|
156
155
|
const encodedObj = {
|
|
157
156
|
peerID: peer?.peerID,
|
|
157
|
+
name: peer?.name,
|
|
158
158
|
localAudioTrackData: peer?.localAudioTrackData?.trackId
|
|
159
159
|
? {
|
|
160
160
|
id: id,
|
|
@@ -268,6 +268,7 @@ export class HMSEncoder {
|
|
|
268
268
|
static encodeHmsRemotePeer(peer: any, id: string) {
|
|
269
269
|
const encodedObj = {
|
|
270
270
|
peerID: peer?.peerID,
|
|
271
|
+
name: peer?.name,
|
|
271
272
|
remoteAudioTrackData: peer?.remoteAudioTrackData?.trackId
|
|
272
273
|
? {
|
|
273
274
|
id: id,
|
|
@@ -335,7 +336,7 @@ export class HMSEncoder {
|
|
|
335
336
|
return encodedRoles;
|
|
336
337
|
}
|
|
337
338
|
|
|
338
|
-
static encodeHmsRole(role: any) {
|
|
339
|
+
static encodeHmsRole(role: any): HMSRole {
|
|
339
340
|
if (!role) {
|
|
340
341
|
return new HMSRole(role);
|
|
341
342
|
}
|
|
@@ -362,7 +363,7 @@ export class HMSEncoder {
|
|
|
362
363
|
}
|
|
363
364
|
}
|
|
364
365
|
|
|
365
|
-
return rolesCache[role.name]
|
|
366
|
+
return rolesCache[role.name]!;
|
|
366
367
|
}
|
|
367
368
|
|
|
368
369
|
static encodeHmsRoleChangeRequest(data: any) {
|
|
@@ -438,6 +439,7 @@ export class HMSEncoder {
|
|
|
438
439
|
|
|
439
440
|
static encodeBrowserRecordingState(data: any) {
|
|
440
441
|
return new HMSBrowserRecordingState({
|
|
442
|
+
initialising: data?.initialising || false,
|
|
441
443
|
running: data?.running || false,
|
|
442
444
|
startedAt: HMSEncoder.encodeDate(data?.startedAt),
|
|
443
445
|
stoppedAt: HMSEncoder.encodeDate(data?.stoppedAt),
|
|
@@ -3,6 +3,7 @@ import { HMSAudioTrack } from './HMSAudioTrack';
|
|
|
3
3
|
import { getLogger } from './HMSLogger';
|
|
4
4
|
import type { HMSAudioTrackSettings } from './HMSAudioTrackSettings';
|
|
5
5
|
import type { HMSTrackType } from './HMSTrackType';
|
|
6
|
+
import type { HMSTrackSource } from './HMSTrackSource';
|
|
6
7
|
|
|
7
8
|
const {
|
|
8
9
|
/**
|
|
@@ -55,7 +56,7 @@ export class HMSLocalAudioTrack extends HMSAudioTrack {
|
|
|
55
56
|
constructor(params: {
|
|
56
57
|
id: string;
|
|
57
58
|
trackId: string;
|
|
58
|
-
source?:
|
|
59
|
+
source?: HMSTrackSource;
|
|
59
60
|
trackDescription?: string;
|
|
60
61
|
isMute?: boolean;
|
|
61
62
|
settings?: HMSAudioTrackSettings;
|
|
@@ -4,6 +4,7 @@ import type { HMSAudioTrackSettings } from './HMSAudioTrackSettings';
|
|
|
4
4
|
import { HMSLocalAudioTrack } from './HMSLocalAudioTrack';
|
|
5
5
|
import { HMSLocalVideoTrack } from './HMSLocalVideoTrack';
|
|
6
6
|
import type { HMSTrackType } from './HMSTrackType';
|
|
7
|
+
import type { HMSTrackSource } from './HMSTrackSource';
|
|
7
8
|
|
|
8
9
|
export class HMSLocalPeer extends HMSPeer {
|
|
9
10
|
private localAudio?: HMSLocalAudioTrack;
|
|
@@ -18,10 +19,11 @@ export class HMSLocalPeer extends HMSPeer {
|
|
|
18
19
|
|
|
19
20
|
constructor(params: {
|
|
20
21
|
peerID: string;
|
|
22
|
+
name: string;
|
|
21
23
|
localAudioTrackData?: {
|
|
22
24
|
id: string;
|
|
23
25
|
trackId: string;
|
|
24
|
-
source?:
|
|
26
|
+
source?: HMSTrackSource;
|
|
25
27
|
trackDescription?: string;
|
|
26
28
|
isMute?: boolean;
|
|
27
29
|
settings?: HMSAudioTrackSettings;
|
|
@@ -30,7 +32,7 @@ export class HMSLocalPeer extends HMSPeer {
|
|
|
30
32
|
localVideoTrackData?: {
|
|
31
33
|
id: string;
|
|
32
34
|
trackId: string;
|
|
33
|
-
source?:
|
|
35
|
+
source?: HMSTrackSource;
|
|
34
36
|
trackDescription?: string;
|
|
35
37
|
isMute?: boolean;
|
|
36
38
|
settings?: HMSVideoTrackSettings;
|
|
@@ -3,6 +3,7 @@ import { HMSVideoTrack } from './HMSVideoTrack';
|
|
|
3
3
|
import { getLogger } from './HMSLogger';
|
|
4
4
|
import type { HMSVideoTrackSettings } from './HMSVideoTrackSettings';
|
|
5
5
|
import type { HMSTrackType } from './HMSTrackType';
|
|
6
|
+
import type { HMSTrackSource } from './HMSTrackSource';
|
|
6
7
|
|
|
7
8
|
const {
|
|
8
9
|
/**
|
|
@@ -51,7 +52,7 @@ export class HMSLocalVideoTrack extends HMSVideoTrack {
|
|
|
51
52
|
constructor(params: {
|
|
52
53
|
id: string;
|
|
53
54
|
trackId: string;
|
|
54
|
-
source?:
|
|
55
|
+
source?: HMSTrackSource;
|
|
55
56
|
trackDescription?: string;
|
|
56
57
|
isMute?: boolean;
|
|
57
58
|
settings?: HMSVideoTrackSettings;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NativeModules } from 'react-native';
|
|
2
|
+
|
|
3
|
+
const { HMSManager } = NativeModules;
|
|
4
|
+
|
|
5
|
+
if (HMSManager == null) {
|
|
6
|
+
console.error(
|
|
7
|
+
`[@100mslive/react-native-hms] react-native-hms module was not found. Make sure you're running your app on the native platform and your code is linked properly (cd ios && pod install && cd ..).
|
|
8
|
+
|
|
9
|
+
For installation instructions, please refer to https://www.100ms.live/docs/react-native/v2/how-to-guides/install-the-sdk/integration`
|
|
10
|
+
.split('\n')
|
|
11
|
+
.map((line) => line.trim())
|
|
12
|
+
.join('\n')
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type HMSManagerProps = any;
|
|
17
|
+
|
|
18
|
+
export default HMSManager as HMSManagerProps;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { HMSMessageRecipient } from './HMSMessageRecipient';
|
|
2
|
-
import type { HMSMessageType } from './HMSMessageType';
|
|
3
2
|
import type { HMSPeer } from './HMSPeer';
|
|
4
3
|
|
|
5
4
|
export class HMSMessage {
|
|
6
5
|
public message: string;
|
|
7
6
|
public messageId: string;
|
|
8
|
-
public type:
|
|
7
|
+
public type: string;
|
|
9
8
|
public time: Date;
|
|
10
9
|
public sender?: HMSPeer;
|
|
11
10
|
public recipient: HMSMessageRecipient;
|
|
@@ -13,7 +12,7 @@ export class HMSMessage {
|
|
|
13
12
|
constructor(params: {
|
|
14
13
|
message: string;
|
|
15
14
|
messageId: string;
|
|
16
|
-
type:
|
|
15
|
+
type: string;
|
|
17
16
|
time: Date;
|
|
18
17
|
sender?: HMSPeer;
|
|
19
18
|
recipient: HMSMessageRecipient;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import HMSManager from './HMSManagerModule';
|
|
2
|
+
import { HMSNativeEventEmitter } from './HMSNativeEventEmitter';
|
|
3
|
+
|
|
4
|
+
export type { HMSEventSubscription as HMSNativeEventSubscription } from './HMSNativeEventEmitter';
|
|
5
|
+
|
|
6
|
+
const HMSNativeEventListener = new HMSNativeEventEmitter(HMSManager);
|
|
7
|
+
|
|
8
|
+
export default HMSNativeEventListener;
|
package/src/classes/HMSPeer.ts
CHANGED
|
@@ -8,19 +8,12 @@ import { HMSConstants } from './HMSConstants';
|
|
|
8
8
|
|
|
9
9
|
export class HMSPeer {
|
|
10
10
|
peerID: string;
|
|
11
|
-
|
|
11
|
+
name: string;
|
|
12
12
|
private _isLocal: boolean | undefined;
|
|
13
13
|
private _customerUserID: string | undefined;
|
|
14
14
|
private _metadata: string | undefined;
|
|
15
15
|
private _role: HMSRole | undefined;
|
|
16
16
|
|
|
17
|
-
private _updateName(value: string) {
|
|
18
|
-
// If `_name` is outdated, update it
|
|
19
|
-
if (this._name !== value) {
|
|
20
|
-
this._name = value;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
17
|
private _updateIsLocal(value: boolean) {
|
|
25
18
|
// If `_isLocal` is outdated, update it
|
|
26
19
|
if (this._isLocal !== value) {
|
|
@@ -49,25 +42,9 @@ export class HMSPeer {
|
|
|
49
42
|
}
|
|
50
43
|
}
|
|
51
44
|
|
|
52
|
-
constructor(params: { peerID: string }) {
|
|
45
|
+
constructor(params: { peerID: string; name: string }) {
|
|
53
46
|
this.peerID = params.peerID;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
get name(): string {
|
|
57
|
-
const hmsPeersCache = getHmsPeersCache();
|
|
58
|
-
|
|
59
|
-
const nameValue = hmsPeersCache
|
|
60
|
-
? hmsPeersCache.getProperty(this.peerID, 'name')
|
|
61
|
-
: getPeerPropertyFromNative(
|
|
62
|
-
HMSConstants.DEFAULT_SDK_ID,
|
|
63
|
-
this.peerID,
|
|
64
|
-
'name'
|
|
65
|
-
);
|
|
66
|
-
|
|
67
|
-
if (nameValue) {
|
|
68
|
-
this._updateName(nameValue);
|
|
69
|
-
}
|
|
70
|
-
return nameValue ?? this._name;
|
|
47
|
+
this.name = params.name;
|
|
71
48
|
}
|
|
72
49
|
|
|
73
50
|
get isLocal(): boolean | undefined {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import HMSManager from './HMSManagerModule';
|
|
2
|
+
|
|
2
3
|
import { HMSEncoder } from './HMSEncoder';
|
|
3
4
|
import { HMSPeerUpdate } from './HMSPeerUpdate';
|
|
4
5
|
import { HMSTrackUpdate } from './HMSTrackUpdate';
|
|
@@ -10,8 +11,6 @@ import type { HMSRole } from './HMSRole';
|
|
|
10
11
|
import type { HMSAudioTrack } from './HMSAudioTrack';
|
|
11
12
|
import type { HMSVideoTrack } from './HMSVideoTrack';
|
|
12
13
|
|
|
13
|
-
const { HMSManager } = NativeModules;
|
|
14
|
-
|
|
15
14
|
export let hmsPeersCache: HMSPeersCache | undefined;
|
|
16
15
|
|
|
17
16
|
export const getHmsPeersCache = () => {
|
|
@@ -2,6 +2,7 @@ import { NativeModules } from 'react-native';
|
|
|
2
2
|
import { getLogger } from './HMSLogger';
|
|
3
3
|
import type { HMSTrackType } from './HMSTrackType';
|
|
4
4
|
import { HMSAudioTrack } from './HMSAudioTrack';
|
|
5
|
+
import type { HMSTrackSource } from './HMSTrackSource';
|
|
5
6
|
|
|
6
7
|
const {
|
|
7
8
|
/**
|
|
@@ -54,7 +55,7 @@ export class HMSRemoteAudioTrack extends HMSAudioTrack {
|
|
|
54
55
|
|
|
55
56
|
constructor(params: {
|
|
56
57
|
trackId: string;
|
|
57
|
-
source?:
|
|
58
|
+
source?: HMSTrackSource;
|
|
58
59
|
isMute?: boolean;
|
|
59
60
|
trackDescription?: string;
|
|
60
61
|
playbackAllowed?: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HMSPeer } from './HMSPeer';
|
|
2
2
|
import { HMSRemoteAudioTrack } from './HMSRemoteAudioTrack';
|
|
3
3
|
import { HMSRemoteVideoTrack } from './HMSRemoteVideoTrack';
|
|
4
|
+
import type { HMSTrackSource } from './HMSTrackSource';
|
|
4
5
|
|
|
5
6
|
export class HMSRemotePeer extends HMSPeer {
|
|
6
7
|
private remoteAudio?: HMSRemoteAudioTrack;
|
|
@@ -16,9 +17,10 @@ export class HMSRemotePeer extends HMSPeer {
|
|
|
16
17
|
|
|
17
18
|
constructor(params: {
|
|
18
19
|
peerID: string;
|
|
20
|
+
name: string;
|
|
19
21
|
remoteAudioTrackData?: {
|
|
20
22
|
trackId: string;
|
|
21
|
-
source?:
|
|
23
|
+
source?: HMSTrackSource;
|
|
22
24
|
isMute?: boolean;
|
|
23
25
|
trackDescription?: string;
|
|
24
26
|
playbackAllowed?: boolean;
|
|
@@ -26,7 +28,7 @@ export class HMSRemotePeer extends HMSPeer {
|
|
|
26
28
|
};
|
|
27
29
|
remoteVideoTrackData?: {
|
|
28
30
|
trackId: string;
|
|
29
|
-
source?:
|
|
31
|
+
source?: HMSTrackSource;
|
|
30
32
|
trackDescription?: string;
|
|
31
33
|
isMute?: boolean;
|
|
32
34
|
playbackAllowed?: boolean;
|
|
@@ -5,6 +5,7 @@ import type { HMSTrackType } from './HMSTrackType';
|
|
|
5
5
|
import type { HMSLayer } from './HMSLayer';
|
|
6
6
|
import type { HMSSimulcastLayerDefinition } from './HMSSimulcastLayerDefinition';
|
|
7
7
|
import { HMSEncoder } from './HMSEncoder';
|
|
8
|
+
import type { HMSTrackSource } from './HMSTrackSource';
|
|
8
9
|
|
|
9
10
|
const {
|
|
10
11
|
/**
|
|
@@ -105,7 +106,7 @@ export class HMSRemoteVideoTrack extends HMSVideoTrack {
|
|
|
105
106
|
|
|
106
107
|
constructor(params: {
|
|
107
108
|
trackId: string;
|
|
108
|
-
source?:
|
|
109
|
+
source?: HMSTrackSource;
|
|
109
110
|
trackDescription?: string;
|
|
110
111
|
isMute?: boolean;
|
|
111
112
|
playbackAllowed?: boolean;
|