@100mslive/react-native-hms 0.9.91 → 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.
Files changed (69) hide show
  1. package/README.md +13 -7
  2. package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +1 -1
  3. package/ios/HMSDecoder.swift +21 -24
  4. package/ios/HMSHelper.swift +42 -8
  5. package/ios/HMSManager.m +11 -0
  6. package/ios/HMSManager.swift +87 -18
  7. package/ios/HMSRNSDK.swift +308 -119
  8. package/ios/HMSView.swift +3 -4
  9. package/lib/commonjs/classes/HMSAudioFilePlayerNode.js +87 -0
  10. package/lib/commonjs/classes/HMSAudioFilePlayerNode.js.map +1 -0
  11. package/lib/commonjs/classes/HMSAudioMixerSource.js +26 -0
  12. package/lib/commonjs/classes/HMSAudioMixerSource.js.map +1 -0
  13. package/lib/commonjs/classes/HMSAudioNode.js +26 -0
  14. package/lib/commonjs/classes/HMSAudioNode.js.map +1 -0
  15. package/lib/commonjs/classes/HMSAudioTrackSettings.js +6 -0
  16. package/lib/commonjs/classes/HMSAudioTrackSettings.js.map +1 -1
  17. package/lib/commonjs/classes/HMSEncoder.js +3 -2
  18. package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
  19. package/lib/commonjs/classes/HMSException.js +7 -0
  20. package/lib/commonjs/classes/HMSException.js.map +1 -1
  21. package/lib/commonjs/classes/HMSMicNode.js +35 -0
  22. package/lib/commonjs/classes/HMSMicNode.js.map +1 -0
  23. package/lib/commonjs/classes/HMSSDK.js +22 -34
  24. package/lib/commonjs/classes/HMSSDK.js.map +1 -1
  25. package/lib/commonjs/classes/HMSScreenBroadcastAudioReceiverNode.js +18 -0
  26. package/lib/commonjs/classes/HMSScreenBroadcastAudioReceiverNode.js.map +1 -0
  27. package/lib/commonjs/index.js +70 -0
  28. package/lib/commonjs/index.js.map +1 -1
  29. package/lib/module/classes/HMSAudioFilePlayerNode.js +75 -0
  30. package/lib/module/classes/HMSAudioFilePlayerNode.js.map +1 -0
  31. package/lib/module/classes/HMSAudioMixerSource.js +17 -0
  32. package/lib/module/classes/HMSAudioMixerSource.js.map +1 -0
  33. package/lib/module/classes/HMSAudioNode.js +17 -0
  34. package/lib/module/classes/HMSAudioNode.js.map +1 -0
  35. package/lib/module/classes/HMSAudioTrackSettings.js +6 -0
  36. package/lib/module/classes/HMSAudioTrackSettings.js.map +1 -1
  37. package/lib/module/classes/HMSEncoder.js +3 -2
  38. package/lib/module/classes/HMSEncoder.js.map +1 -1
  39. package/lib/module/classes/HMSException.js +7 -0
  40. package/lib/module/classes/HMSException.js.map +1 -1
  41. package/lib/module/classes/HMSMicNode.js +23 -0
  42. package/lib/module/classes/HMSMicNode.js.map +1 -0
  43. package/lib/module/classes/HMSSDK.js +21 -33
  44. package/lib/module/classes/HMSSDK.js.map +1 -1
  45. package/lib/module/classes/HMSScreenBroadcastAudioReceiverNode.js +8 -0
  46. package/lib/module/classes/HMSScreenBroadcastAudioReceiverNode.js.map +1 -0
  47. package/lib/module/index.js +5 -0
  48. package/lib/module/index.js.map +1 -1
  49. package/lib/typescript/classes/HMSAudioFilePlayerNode.d.ts +12 -0
  50. package/lib/typescript/classes/HMSAudioMixerSource.d.ts +8 -0
  51. package/lib/typescript/classes/HMSAudioNode.d.ts +6 -0
  52. package/lib/typescript/classes/HMSAudioTrackSettings.d.ts +4 -2
  53. package/lib/typescript/classes/HMSException.d.ts +8 -6
  54. package/lib/typescript/classes/HMSMicNode.d.ts +5 -0
  55. package/lib/typescript/classes/HMSSDK.d.ts +28 -26
  56. package/lib/typescript/classes/HMSScreenBroadcastAudioReceiverNode.d.ts +4 -0
  57. package/lib/typescript/index.d.ts +5 -0
  58. package/package.json +1 -1
  59. package/react-native-hms.podspec +2 -1
  60. package/src/classes/HMSAudioFilePlayerNode.ts +75 -0
  61. package/src/classes/HMSAudioMixerSource.ts +15 -0
  62. package/src/classes/HMSAudioNode.ts +12 -0
  63. package/src/classes/HMSAudioTrackSettings.ts +7 -4
  64. package/src/classes/HMSEncoder.ts +1 -0
  65. package/src/classes/HMSException.ts +9 -6
  66. package/src/classes/HMSMicNode.ts +23 -0
  67. package/src/classes/HMSSDK.tsx +47 -58
  68. package/src/classes/HMSScreenBroadcastAudioReceiverNode.ts +7 -0
  69. 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?: any;
35
- onPreviewDelegate?: any;
36
- onJoinDelegate?: any;
37
- onRoomDelegate?: any;
38
- onPeerDelegate?: any;
39
- onTrackDelegate?: any;
40
- onErrorDelegate?: any;
41
- onMessageDelegate?: any;
42
- onSpeakerDelegate?: any;
43
- onReconnectingDelegate?: any;
44
- onReconnectedDelegate?: any;
45
- onRoleChangeRequestDelegate?: any;
46
- onChangeTrackStateRequestDelegate?: any;
47
- onRemovedFromRoomDelegate?: any;
48
- onRtcStatsDelegate?: any;
49
- onLocalAudioStatsDelegate?: any;
50
- onLocalVideoStatsDelegate?: any;
51
- onRemoteAudioStatsDelegate?: any;
52
- onRemoteVideoStatsDelegate?: any;
53
- onAudioDeviceChangedDelegate?: any;
54
- constructor(id: string);
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.
@@ -61,7 +61,9 @@ export declare class HMSSDK {
61
61
  * @memberof HMSSDK
62
62
  */
63
63
  static build(params?: {
64
- trackSettings: HMSTrackSettings;
64
+ trackSettings?: HMSTrackSettings;
65
+ appGroup?: String;
66
+ preferredExtension?: String;
65
67
  }): Promise<HMSSDK>;
66
68
  /**
67
69
  * - Returns the instance of logger which can be used to manipulate log levels.
@@ -186,7 +188,7 @@ export declare class HMSSDK {
186
188
  *
187
189
  * - it is advised to use a json object in string format to store multiple dataPoints in metadata.
188
190
  *
189
- * 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
190
192
  *
191
193
  * @param {string}
192
194
  * @memberof HMSSDK
@@ -318,7 +320,7 @@ export declare class HMSSDK {
318
320
  * - getRoom is a wrapper function on an existing native function also known as getRoom the returns
319
321
  * current room object which is of type {@link HMSRoom}
320
322
  *
321
- * 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
322
324
  *
323
325
  * @memberof HMSSDK
324
326
  * @return HMSRoom
@@ -327,7 +329,7 @@ export declare class HMSSDK {
327
329
  /**
328
330
  * - This function sets the volume of any peer in the room
329
331
  *
330
- * 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
331
333
  *
332
334
  * @memberof HMSSDK
333
335
  */
@@ -0,0 +1,4 @@
1
+ import { HMSAudioNode } from './HMSAudioNode';
2
+ export declare class HMSScreenBroadcastAudioReceiverNode extends HMSAudioNode {
3
+ constructor();
4
+ }
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@100mslive/react-native-hms",
3
- "version": "0.9.91",
3
+ "version": "0.9.93",
4
4
  "description": "The React Native package for 100ms SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -16,5 +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.3.3"
19
+ s.dependency "HMSSDK", "0.4.2"
20
+ s.dependency 'HMSBroadcastExtensionSDK', '0.0.3'
20
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
+ }
@@ -0,0 +1,12 @@
1
+ export class HMSAudioNode {
2
+ name: string;
3
+ sdkId: string = '12345';
4
+
5
+ constructor(name: string) {
6
+ this.name = name;
7
+ }
8
+
9
+ toString(): string {
10
+ return this.name;
11
+ }
12
+ }
@@ -1,16 +1,19 @@
1
1
  import type { HMSAudioCodec } from './HMSAudioCodec';
2
2
 
3
3
  export class HMSAudioTrackSettings {
4
- maxBitrate?: number;
5
- trackDescription?: string;
6
- codec?: HMSAudioCodec;
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
- codec: HMSAudioCodec;
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
  }
@@ -507,6 +507,7 @@ export class HMSEncoder {
507
507
  name: data?.error?.name,
508
508
  action: data?.error?.action,
509
509
  isTerminal: data?.error?.isTerminal,
510
+ canRetry: data?.error?.canRetry,
510
511
  });
511
512
  }
512
513
  }
@@ -1,18 +1,20 @@
1
1
  export class HMSException {
2
2
  code: number;
3
3
  description: string;
4
- message: string;
5
- name: string;
6
- action: string;
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: string;
13
- name: string;
14
- action: string;
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
+ }
@@ -1,27 +1,23 @@
1
1
  import React from 'react';
2
- import {
3
- NativeEventEmitter,
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 { HMSRemoteVideoStats } from './HMSRemoteVideoStats';
8
+ import { getLogger, logger, setLogger } from './HMSLogger';
16
9
  import { HMSRemoteAudioStats } from './HMSRemoteAudioStats';
17
- import { logger, getLogger, setLogger } from './HMSLogger';
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,8 +88,16 @@ export class HMSSDK {
92
88
  * @returns
93
89
  * @memberof HMSSDK
94
90
  */
95
- static async build(params?: { trackSettings: HMSTrackSettings }) {
96
- let id = await HMSManager.build(params?.trackSettings || {});
91
+ static async build(params?: {
92
+ trackSettings?: HMSTrackSettings;
93
+ appGroup?: String;
94
+ preferredExtension?: String;
95
+ }) {
96
+ let id = await HMSManager.build({
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
100
+ });
97
101
  HmsSdk = new HMSSDK(id);
98
102
  HmsSdk.attachPreviewListener();
99
103
  HmsSdk.attachListeners();
@@ -520,7 +524,7 @@ export class HMSSDK {
520
524
  *
521
525
  * - it is advised to use a json object in string format to store multiple dataPoints in metadata.
522
526
  *
523
- * 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
524
528
  *
525
529
  * @param {string}
526
530
  * @memberof HMSSDK
@@ -778,7 +782,7 @@ export class HMSSDK {
778
782
  * - getRoom is a wrapper function on an existing native function also known as getRoom the returns
779
783
  * current room object which is of type {@link HMSRoom}
780
784
  *
781
- * 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
782
786
  *
783
787
  * @memberof HMSSDK
784
788
  * @return HMSRoom
@@ -797,7 +801,7 @@ export class HMSSDK {
797
801
  /**
798
802
  * - This function sets the volume of any peer in the room
799
803
  *
800
- * 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
801
805
  *
802
806
  * @memberof HMSSDK
803
807
  */
@@ -847,12 +851,7 @@ export class HMSSDK {
847
851
  */
848
852
  startScreenshare = async () => {
849
853
  logger?.verbose('#Function startScreenshare', { id: this.id });
850
- if (Platform.OS === 'android') {
851
- return await HMSManager.startScreenshare({ id: this.id });
852
- } else {
853
- console.log('API currently not available for iOS');
854
- return 'API currently not available for iOS';
855
- }
854
+ return await HMSManager.startScreenshare({ id: this.id });
856
855
  };
857
856
 
858
857
  /**
@@ -864,12 +863,7 @@ export class HMSSDK {
864
863
  */
865
864
  isScreenShared = async () => {
866
865
  logger?.verbose('#Function isScreenShared', { id: this.id });
867
- if (Platform.OS === 'android') {
868
- return await HMSManager.isScreenShared({ id: this.id });
869
- } else {
870
- console.log('API currently not available for iOS');
871
- return 'API currently not available for iOS';
872
- }
866
+ return await HMSManager.isScreenShared({ id: this.id });
873
867
  };
874
868
 
875
869
  /**
@@ -881,12 +875,7 @@ export class HMSSDK {
881
875
  */
882
876
  stopScreenshare = async () => {
883
877
  logger?.verbose('#Function stopScreenshare', { id: this.id });
884
- if (Platform.OS === 'android') {
885
- return await HMSManager.stopScreenshare({ id: this.id });
886
- } else {
887
- console.log('API currently not available for iOS');
888
- return 'API currently not available for iOS';
889
- }
878
+ return await HMSManager.stopScreenshare({ id: this.id });
890
879
  };
891
880
 
892
881
  /**
@@ -0,0 +1,7 @@
1
+ import { HMSAudioNode } from './HMSAudioNode';
2
+
3
+ export class HMSScreenBroadcastAudioReceiverNode extends HMSAudioNode {
4
+ constructor() {
5
+ super('screen_broadcast_audio_receiver_node');
6
+ }
7
+ }
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;