@100mslive/react-native-hms 0.9.92 → 0.9.93
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 +13 -7
- package/ios/HMSDecoder.swift +21 -24
- package/ios/HMSHelper.swift +42 -8
- package/ios/HMSManager.m +8 -0
- package/ios/HMSManager.swift +70 -22
- package/ios/HMSRNSDK.swift +237 -89
- package/ios/HMSView.swift +3 -4
- package/lib/commonjs/classes/HMSAudioFilePlayerNode.js +87 -0
- package/lib/commonjs/classes/HMSAudioFilePlayerNode.js.map +1 -0
- package/lib/commonjs/classes/HMSAudioMixerSource.js +26 -0
- package/lib/commonjs/classes/HMSAudioMixerSource.js.map +1 -0
- package/lib/commonjs/classes/HMSAudioNode.js +26 -0
- package/lib/commonjs/classes/HMSAudioNode.js.map +1 -0
- package/lib/commonjs/classes/HMSAudioTrackSettings.js +6 -0
- package/lib/commonjs/classes/HMSAudioTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSEncoder.js +3 -2
- package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
- package/lib/commonjs/classes/HMSException.js +7 -0
- package/lib/commonjs/classes/HMSException.js.map +1 -1
- package/lib/commonjs/classes/HMSMicNode.js +35 -0
- package/lib/commonjs/classes/HMSMicNode.js.map +1 -0
- package/lib/commonjs/classes/HMSSDK.js +12 -15
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HMSScreenBroadcastAudioReceiverNode.js +18 -0
- package/lib/commonjs/classes/HMSScreenBroadcastAudioReceiverNode.js.map +1 -0
- package/lib/commonjs/index.js +70 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/classes/HMSAudioFilePlayerNode.js +75 -0
- package/lib/module/classes/HMSAudioFilePlayerNode.js.map +1 -0
- package/lib/module/classes/HMSAudioMixerSource.js +17 -0
- package/lib/module/classes/HMSAudioMixerSource.js.map +1 -0
- package/lib/module/classes/HMSAudioNode.js +17 -0
- package/lib/module/classes/HMSAudioNode.js.map +1 -0
- package/lib/module/classes/HMSAudioTrackSettings.js +6 -0
- package/lib/module/classes/HMSAudioTrackSettings.js.map +1 -1
- package/lib/module/classes/HMSEncoder.js +3 -2
- package/lib/module/classes/HMSEncoder.js.map +1 -1
- package/lib/module/classes/HMSException.js +7 -0
- package/lib/module/classes/HMSException.js.map +1 -1
- package/lib/module/classes/HMSMicNode.js +23 -0
- package/lib/module/classes/HMSMicNode.js.map +1 -0
- package/lib/module/classes/HMSSDK.js +11 -14
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HMSScreenBroadcastAudioReceiverNode.js +8 -0
- package/lib/module/classes/HMSScreenBroadcastAudioReceiverNode.js.map +1 -0
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/classes/HMSAudioFilePlayerNode.d.ts +12 -0
- package/lib/typescript/classes/HMSAudioMixerSource.d.ts +8 -0
- package/lib/typescript/classes/HMSAudioNode.d.ts +6 -0
- package/lib/typescript/classes/HMSAudioTrackSettings.d.ts +4 -2
- package/lib/typescript/classes/HMSException.d.ts +8 -6
- package/lib/typescript/classes/HMSMicNode.d.ts +5 -0
- package/lib/typescript/classes/HMSSDK.d.ts +26 -26
- package/lib/typescript/classes/HMSScreenBroadcastAudioReceiverNode.d.ts +4 -0
- package/lib/typescript/index.d.ts +5 -0
- package/package.json +1 -1
- package/react-native-hms.podspec +2 -2
- package/src/classes/HMSAudioFilePlayerNode.ts +75 -0
- package/src/classes/HMSAudioMixerSource.ts +15 -0
- package/src/classes/HMSAudioNode.ts +12 -0
- package/src/classes/HMSAudioTrackSettings.ts +7 -4
- package/src/classes/HMSEncoder.ts +1 -0
- package/src/classes/HMSException.ts +9 -6
- package/src/classes/HMSMicNode.ts +23 -0
- package/src/classes/HMSSDK.tsx +38 -46
- package/src/classes/HMSScreenBroadcastAudioReceiverNode.ts +7 -0
- package/src/index.ts +5 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ViewStyle } from 'react-native';
|
|
3
|
+
import { HMSTrackType } from './HMSTrackType';
|
|
3
4
|
import { HMSUpdateListenerActions } from './HMSUpdateListenerActions';
|
|
4
5
|
import type { HMSConfig } from './HMSConfig';
|
|
5
6
|
import type { HMSLocalPeer } from './HMSLocalPeer';
|
|
@@ -7,7 +8,6 @@ import type { HMSRemotePeer } from './HMSRemotePeer';
|
|
|
7
8
|
import type { HMSRoom } from './HMSRoom';
|
|
8
9
|
import type { HMSRole } from './HMSRole';
|
|
9
10
|
import type { HMSTrack } from './HMSTrack';
|
|
10
|
-
import { HMSTrackType } from './HMSTrackType';
|
|
11
11
|
import type { HMSLogger } from './HMSLogger';
|
|
12
12
|
import type { HMSPeer } from './HMSPeer';
|
|
13
13
|
import type { HMSVideoViewMode } from './HMSVideoViewMode';
|
|
@@ -31,27 +31,27 @@ export declare class HMSSDK {
|
|
|
31
31
|
knownRoles?: HMSRole[];
|
|
32
32
|
id: string;
|
|
33
33
|
private muteStatus;
|
|
34
|
-
appStateSubscription
|
|
35
|
-
onPreviewDelegate
|
|
36
|
-
onJoinDelegate
|
|
37
|
-
onRoomDelegate
|
|
38
|
-
onPeerDelegate
|
|
39
|
-
onTrackDelegate
|
|
40
|
-
onErrorDelegate
|
|
41
|
-
onMessageDelegate
|
|
42
|
-
onSpeakerDelegate
|
|
43
|
-
onReconnectingDelegate
|
|
44
|
-
onReconnectedDelegate
|
|
45
|
-
onRoleChangeRequestDelegate
|
|
46
|
-
onChangeTrackStateRequestDelegate
|
|
47
|
-
onRemovedFromRoomDelegate
|
|
48
|
-
onRtcStatsDelegate
|
|
49
|
-
onLocalAudioStatsDelegate
|
|
50
|
-
onLocalVideoStatsDelegate
|
|
51
|
-
onRemoteAudioStatsDelegate
|
|
52
|
-
onRemoteVideoStatsDelegate
|
|
53
|
-
onAudioDeviceChangedDelegate
|
|
54
|
-
constructor(
|
|
34
|
+
private appStateSubscription?;
|
|
35
|
+
private onPreviewDelegate?;
|
|
36
|
+
private onJoinDelegate?;
|
|
37
|
+
private onRoomDelegate?;
|
|
38
|
+
private onPeerDelegate?;
|
|
39
|
+
private onTrackDelegate?;
|
|
40
|
+
private onErrorDelegate?;
|
|
41
|
+
private onMessageDelegate?;
|
|
42
|
+
private onSpeakerDelegate?;
|
|
43
|
+
private onReconnectingDelegate?;
|
|
44
|
+
private onReconnectedDelegate?;
|
|
45
|
+
private onRoleChangeRequestDelegate?;
|
|
46
|
+
private onChangeTrackStateRequestDelegate?;
|
|
47
|
+
private onRemovedFromRoomDelegate?;
|
|
48
|
+
private onRtcStatsDelegate?;
|
|
49
|
+
private onLocalAudioStatsDelegate?;
|
|
50
|
+
private onLocalVideoStatsDelegate?;
|
|
51
|
+
private onRemoteAudioStatsDelegate?;
|
|
52
|
+
private onRemoteVideoStatsDelegate?;
|
|
53
|
+
private onAudioDeviceChangedDelegate?;
|
|
54
|
+
private constructor();
|
|
55
55
|
/**
|
|
56
56
|
* - Returns an instance of [HMSSDK]{@link HMSSDK}
|
|
57
57
|
* - This function must be called to get an instance of HMSSDK class and only then user can interact with its methods.
|
|
@@ -60,7 +60,7 @@ export declare class HMSSDK {
|
|
|
60
60
|
* @returns
|
|
61
61
|
* @memberof HMSSDK
|
|
62
62
|
*/
|
|
63
|
-
static build(
|
|
63
|
+
static build(params?: {
|
|
64
64
|
trackSettings?: HMSTrackSettings;
|
|
65
65
|
appGroup?: String;
|
|
66
66
|
preferredExtension?: String;
|
|
@@ -188,7 +188,7 @@ export declare class HMSSDK {
|
|
|
188
188
|
*
|
|
189
189
|
* - it is advised to use a json object in string format to store multiple dataPoints in metadata.
|
|
190
190
|
*
|
|
191
|
-
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-metadata} for more info
|
|
191
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/advanced-features/change-metadata} for more info
|
|
192
192
|
*
|
|
193
193
|
* @param {string}
|
|
194
194
|
* @memberof HMSSDK
|
|
@@ -320,7 +320,7 @@ export declare class HMSSDK {
|
|
|
320
320
|
* - getRoom is a wrapper function on an existing native function also known as getRoom the returns
|
|
321
321
|
* current room object which is of type {@link HMSRoom}
|
|
322
322
|
*
|
|
323
|
-
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/room} for more info
|
|
323
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/join#get-room} for more info
|
|
324
324
|
*
|
|
325
325
|
* @memberof HMSSDK
|
|
326
326
|
* @return HMSRoom
|
|
@@ -329,7 +329,7 @@ export declare class HMSSDK {
|
|
|
329
329
|
/**
|
|
330
330
|
* - This function sets the volume of any peer in the room
|
|
331
331
|
*
|
|
332
|
-
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/set-volume} for more info
|
|
332
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/advanced-features/set-volume} for more info
|
|
333
333
|
*
|
|
334
334
|
* @memberof HMSSDK
|
|
335
335
|
*/
|
|
@@ -65,5 +65,10 @@ export * from './classes/HMSRtmpVideoResolution';
|
|
|
65
65
|
export * from './classes/HMSAudioDevice';
|
|
66
66
|
export * from './classes/HMSAudioMode';
|
|
67
67
|
export * from './classes/HMSAudioMixingMode';
|
|
68
|
+
export * from './classes/HMSAudioNode';
|
|
69
|
+
export * from './classes/HMSMicNode';
|
|
70
|
+
export * from './classes/HMSScreenBroadcastAudioReceiverNode';
|
|
71
|
+
export * from './classes/HMSAudioFilePlayerNode';
|
|
72
|
+
export * from './classes/HMSAudioMixerSource';
|
|
68
73
|
import { HMSSDK as HmsManager } from './classes/HMSSDK';
|
|
69
74
|
export default HmsManager;
|
package/package.json
CHANGED
package/react-native-hms.podspec
CHANGED
|
@@ -16,6 +16,6 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
17
17
|
|
|
18
18
|
s.dependency "React-Core"
|
|
19
|
-
s.dependency "HMSSDK", "0.
|
|
20
|
-
s.dependency 'HMSBroadcastExtensionSDK', '0.0.
|
|
19
|
+
s.dependency "HMSSDK", "0.4.2"
|
|
20
|
+
s.dependency 'HMSBroadcastExtensionSDK', '0.0.3'
|
|
21
21
|
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { NativeModules } from 'react-native';
|
|
2
|
+
import { HMSAudioNode } from './HMSAudioNode';
|
|
3
|
+
|
|
4
|
+
const {
|
|
5
|
+
/**
|
|
6
|
+
* @ignore
|
|
7
|
+
*/
|
|
8
|
+
HMSManager,
|
|
9
|
+
} = NativeModules;
|
|
10
|
+
|
|
11
|
+
export class HMSAudioFilePlayerNode extends HMSAudioNode {
|
|
12
|
+
constructor(name: string) {
|
|
13
|
+
super(name);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
setVolume(volume: number) {
|
|
17
|
+
HMSManager.setAudioShareVolume({
|
|
18
|
+
id: this.sdkId,
|
|
19
|
+
audioNode: this.name,
|
|
20
|
+
volume,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async play(fileUrl: string, loops?: boolean, interrupts?: boolean) {
|
|
25
|
+
return await HMSManager.playAudioShare({
|
|
26
|
+
id: this.sdkId,
|
|
27
|
+
audioNode: this.name,
|
|
28
|
+
fileUrl,
|
|
29
|
+
loops,
|
|
30
|
+
interrupts,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
pause() {
|
|
35
|
+
HMSManager.pauseAudioShare({
|
|
36
|
+
id: this.sdkId,
|
|
37
|
+
audioNode: this.name,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
resume() {
|
|
42
|
+
HMSManager.resumeAudioShare({
|
|
43
|
+
id: this.sdkId,
|
|
44
|
+
audioNode: this.name,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
stop() {
|
|
49
|
+
HMSManager.stopAudioShare({
|
|
50
|
+
id: this.sdkId,
|
|
51
|
+
audioNode: this.name,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async isPlaying() {
|
|
56
|
+
return await HMSManager.audioShareIsPlaying({
|
|
57
|
+
id: this.sdkId,
|
|
58
|
+
audioNode: this.name,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async currentDuration() {
|
|
63
|
+
return await HMSManager.audioShareCurrentTime({
|
|
64
|
+
id: this.sdkId,
|
|
65
|
+
audioNode: this.name,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
async duration() {
|
|
70
|
+
return await HMSManager.audioShareDuration({
|
|
71
|
+
id: this.sdkId,
|
|
72
|
+
audioNode: this.name,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HMSAudioNode } from './HMSAudioNode';
|
|
2
|
+
|
|
3
|
+
export class HMSAudioMixerSource {
|
|
4
|
+
node: HMSAudioNode[];
|
|
5
|
+
|
|
6
|
+
constructor(params: { node: HMSAudioNode[] }) {
|
|
7
|
+
this.node = params.node;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
toList(): string[] {
|
|
11
|
+
const nodeName: string[] = [];
|
|
12
|
+
this.node.forEach((audioNode) => nodeName.push(audioNode.toString()));
|
|
13
|
+
return nodeName;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import type { HMSAudioCodec } from './HMSAudioCodec';
|
|
2
2
|
|
|
3
3
|
export class HMSAudioTrackSettings {
|
|
4
|
-
maxBitrate
|
|
5
|
-
trackDescription?: string;
|
|
6
|
-
|
|
4
|
+
maxBitrate: number;
|
|
5
|
+
trackDescription?: string; // ios only
|
|
6
|
+
audioSource?: string[]; // ios only
|
|
7
|
+
codec?: HMSAudioCodec; // android only
|
|
7
8
|
constructor(params: {
|
|
8
9
|
maxBitrate: number;
|
|
9
10
|
trackDescription?: string;
|
|
10
|
-
|
|
11
|
+
audioSource?: string[];
|
|
12
|
+
codec?: HMSAudioCodec;
|
|
11
13
|
}) {
|
|
12
14
|
this.maxBitrate = params.maxBitrate;
|
|
13
15
|
this.trackDescription = params.trackDescription;
|
|
16
|
+
this.audioSource = params.audioSource;
|
|
14
17
|
this.codec = params.codec;
|
|
15
18
|
}
|
|
16
19
|
}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
export class HMSException {
|
|
2
2
|
code: number;
|
|
3
3
|
description: string;
|
|
4
|
-
message
|
|
5
|
-
name
|
|
6
|
-
action
|
|
4
|
+
message?: string; // `message` is available only on Android
|
|
5
|
+
name?: string; // `name` is available only on Android
|
|
6
|
+
action?: string; // `action` is available only on Android
|
|
7
7
|
isTerminal: boolean;
|
|
8
|
+
canRetry?: boolean; // `canRetry` is available only on Android
|
|
8
9
|
|
|
9
10
|
constructor(params: {
|
|
10
11
|
code: number;
|
|
11
12
|
description: string;
|
|
12
|
-
message
|
|
13
|
-
name
|
|
14
|
-
action
|
|
13
|
+
message?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
action?: string;
|
|
15
16
|
isTerminal: boolean;
|
|
17
|
+
canRetry?: boolean;
|
|
16
18
|
}) {
|
|
17
19
|
this.code = params.code;
|
|
18
20
|
this.description = params.description;
|
|
@@ -20,5 +22,6 @@ export class HMSException {
|
|
|
20
22
|
this.name = params.name;
|
|
21
23
|
this.action = params.action;
|
|
22
24
|
this.isTerminal = params.isTerminal;
|
|
25
|
+
this.canRetry = params.canRetry;
|
|
23
26
|
}
|
|
24
27
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { NativeModules } from 'react-native';
|
|
2
|
+
import { HMSAudioNode } from './HMSAudioNode';
|
|
3
|
+
|
|
4
|
+
const {
|
|
5
|
+
/**
|
|
6
|
+
* @ignore
|
|
7
|
+
*/
|
|
8
|
+
HMSManager,
|
|
9
|
+
} = NativeModules;
|
|
10
|
+
|
|
11
|
+
export class HMSMicNode extends HMSAudioNode {
|
|
12
|
+
constructor() {
|
|
13
|
+
super('mic_node');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
setVolume(volume: number) {
|
|
17
|
+
return HMSManager.setAudioShareVolume({
|
|
18
|
+
id: this.sdkId,
|
|
19
|
+
audioNode: this.name,
|
|
20
|
+
volume,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
package/src/classes/HMSSDK.tsx
CHANGED
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
NativeModules,
|
|
5
|
-
Platform,
|
|
6
|
-
ViewStyle,
|
|
7
|
-
AppState,
|
|
8
|
-
} from 'react-native';
|
|
9
|
-
import { HMSUpdateListenerActions } from './HMSUpdateListenerActions';
|
|
2
|
+
import { AppState, NativeEventEmitter, NativeModules, Platform, ViewStyle } from 'react-native';
|
|
3
|
+
|
|
10
4
|
import { HMSEncoder } from './HMSEncoder';
|
|
11
5
|
import { HMSHelper } from './HMSHelper';
|
|
12
|
-
import { HmsViewComponent } from './HmsView';
|
|
13
6
|
import { HMSLocalAudioStats } from './HMSLocalAudioStats';
|
|
14
7
|
import { HMSLocalVideoStats } from './HMSLocalVideoStats';
|
|
15
|
-
import {
|
|
8
|
+
import { getLogger, logger, setLogger } from './HMSLogger';
|
|
16
9
|
import { HMSRemoteAudioStats } from './HMSRemoteAudioStats';
|
|
17
|
-
import {
|
|
10
|
+
import { HMSRemoteVideoStats } from './HMSRemoteVideoStats';
|
|
11
|
+
import { HMSTrackType } from './HMSTrackType';
|
|
12
|
+
import { HMSUpdateListenerActions } from './HMSUpdateListenerActions';
|
|
13
|
+
import { HmsViewComponent } from './HmsView';
|
|
14
|
+
|
|
18
15
|
import type { HMSConfig } from './HMSConfig';
|
|
19
16
|
import type { HMSLocalPeer } from './HMSLocalPeer';
|
|
20
17
|
import type { HMSRemotePeer } from './HMSRemotePeer';
|
|
21
18
|
import type { HMSRoom } from './HMSRoom';
|
|
22
19
|
import type { HMSRole } from './HMSRole';
|
|
23
20
|
import type { HMSTrack } from './HMSTrack';
|
|
24
|
-
import { HMSTrackType } from './HMSTrackType';
|
|
25
21
|
import type { HMSLogger } from './HMSLogger';
|
|
26
22
|
import type { HMSPeer } from './HMSPeer';
|
|
27
23
|
import type { HMSVideoViewMode } from './HMSVideoViewMode';
|
|
@@ -58,29 +54,29 @@ export class HMSSDK {
|
|
|
58
54
|
knownRoles?: HMSRole[];
|
|
59
55
|
id: string;
|
|
60
56
|
private muteStatus: boolean | undefined;
|
|
61
|
-
appStateSubscription?: any;
|
|
62
|
-
|
|
63
|
-
onPreviewDelegate?: any;
|
|
64
|
-
onJoinDelegate?: any;
|
|
65
|
-
onRoomDelegate?: any;
|
|
66
|
-
onPeerDelegate?: any;
|
|
67
|
-
onTrackDelegate?: any;
|
|
68
|
-
onErrorDelegate?: any;
|
|
69
|
-
onMessageDelegate?: any;
|
|
70
|
-
onSpeakerDelegate?: any;
|
|
71
|
-
onReconnectingDelegate?: any;
|
|
72
|
-
onReconnectedDelegate?: any;
|
|
73
|
-
onRoleChangeRequestDelegate?: any;
|
|
74
|
-
onChangeTrackStateRequestDelegate?: any;
|
|
75
|
-
onRemovedFromRoomDelegate?: any;
|
|
76
|
-
onRtcStatsDelegate?: any;
|
|
77
|
-
onLocalAudioStatsDelegate?: any;
|
|
78
|
-
onLocalVideoStatsDelegate?: any;
|
|
79
|
-
onRemoteAudioStatsDelegate?: any;
|
|
80
|
-
onRemoteVideoStatsDelegate?: any;
|
|
81
|
-
onAudioDeviceChangedDelegate?: any;
|
|
82
|
-
|
|
83
|
-
constructor(id: string) {
|
|
57
|
+
private appStateSubscription?: any;
|
|
58
|
+
|
|
59
|
+
private onPreviewDelegate?: any;
|
|
60
|
+
private onJoinDelegate?: any;
|
|
61
|
+
private onRoomDelegate?: any;
|
|
62
|
+
private onPeerDelegate?: any;
|
|
63
|
+
private onTrackDelegate?: any;
|
|
64
|
+
private onErrorDelegate?: any;
|
|
65
|
+
private onMessageDelegate?: any;
|
|
66
|
+
private onSpeakerDelegate?: any;
|
|
67
|
+
private onReconnectingDelegate?: any;
|
|
68
|
+
private onReconnectedDelegate?: any;
|
|
69
|
+
private onRoleChangeRequestDelegate?: any;
|
|
70
|
+
private onChangeTrackStateRequestDelegate?: any;
|
|
71
|
+
private onRemovedFromRoomDelegate?: any;
|
|
72
|
+
private onRtcStatsDelegate?: any;
|
|
73
|
+
private onLocalAudioStatsDelegate?: any;
|
|
74
|
+
private onLocalVideoStatsDelegate?: any;
|
|
75
|
+
private onRemoteAudioStatsDelegate?: any;
|
|
76
|
+
private onRemoteVideoStatsDelegate?: any;
|
|
77
|
+
private onAudioDeviceChangedDelegate?: any;
|
|
78
|
+
|
|
79
|
+
private constructor(id: string) {
|
|
84
80
|
this.id = id;
|
|
85
81
|
}
|
|
86
82
|
|
|
@@ -92,19 +88,15 @@ export class HMSSDK {
|
|
|
92
88
|
* @returns
|
|
93
89
|
* @memberof HMSSDK
|
|
94
90
|
*/
|
|
95
|
-
static async build({
|
|
96
|
-
trackSettings,
|
|
97
|
-
appGroup,
|
|
98
|
-
preferredExtension,
|
|
99
|
-
}: {
|
|
91
|
+
static async build(params?: {
|
|
100
92
|
trackSettings?: HMSTrackSettings;
|
|
101
93
|
appGroup?: String;
|
|
102
94
|
preferredExtension?: String;
|
|
103
95
|
}) {
|
|
104
96
|
let id = await HMSManager.build({
|
|
105
|
-
trackSettings: trackSettings,
|
|
106
|
-
appGroup: appGroup,
|
|
107
|
-
preferredExtension: preferredExtension,
|
|
97
|
+
trackSettings: params?.trackSettings,
|
|
98
|
+
appGroup: params?.appGroup, // required for iOS Screenshare, not required for Android
|
|
99
|
+
preferredExtension: params?.preferredExtension, // required for iOS Screenshare, not required for Android
|
|
108
100
|
});
|
|
109
101
|
HmsSdk = new HMSSDK(id);
|
|
110
102
|
HmsSdk.attachPreviewListener();
|
|
@@ -532,7 +524,7 @@ export class HMSSDK {
|
|
|
532
524
|
*
|
|
533
525
|
* - it is advised to use a json object in string format to store multiple dataPoints in metadata.
|
|
534
526
|
*
|
|
535
|
-
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/change-metadata} for more info
|
|
527
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/advanced-features/change-metadata} for more info
|
|
536
528
|
*
|
|
537
529
|
* @param {string}
|
|
538
530
|
* @memberof HMSSDK
|
|
@@ -790,7 +782,7 @@ export class HMSSDK {
|
|
|
790
782
|
* - getRoom is a wrapper function on an existing native function also known as getRoom the returns
|
|
791
783
|
* current room object which is of type {@link HMSRoom}
|
|
792
784
|
*
|
|
793
|
-
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/room} for more info
|
|
785
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/join#get-room} for more info
|
|
794
786
|
*
|
|
795
787
|
* @memberof HMSSDK
|
|
796
788
|
* @return HMSRoom
|
|
@@ -809,7 +801,7 @@ export class HMSSDK {
|
|
|
809
801
|
/**
|
|
810
802
|
* - This function sets the volume of any peer in the room
|
|
811
803
|
*
|
|
812
|
-
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/set-volume} for more info
|
|
804
|
+
* checkout {@link https://www.100ms.live/docs/react-native/v2/advanced-features/set-volume} for more info
|
|
813
805
|
*
|
|
814
806
|
* @memberof HMSSDK
|
|
815
807
|
*/
|
package/src/index.ts
CHANGED
|
@@ -65,6 +65,11 @@ export * from './classes/HMSRtmpVideoResolution';
|
|
|
65
65
|
export * from './classes/HMSAudioDevice';
|
|
66
66
|
export * from './classes/HMSAudioMode';
|
|
67
67
|
export * from './classes/HMSAudioMixingMode';
|
|
68
|
+
export * from './classes/HMSAudioNode';
|
|
69
|
+
export * from './classes/HMSMicNode';
|
|
70
|
+
export * from './classes/HMSScreenBroadcastAudioReceiverNode';
|
|
71
|
+
export * from './classes/HMSAudioFilePlayerNode';
|
|
72
|
+
export * from './classes/HMSAudioMixerSource';
|
|
68
73
|
|
|
69
74
|
import { HMSSDK as HmsManager } from './classes/HMSSDK';
|
|
70
75
|
export default HmsManager;
|