@100mslive/react-native-hms 1.7.1 → 1.8.0

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 (124) hide show
  1. package/android/.gradle/6.7.1/executionHistory/executionHistory.bin +0 -0
  2. package/android/.gradle/6.7.1/executionHistory/executionHistory.lock +0 -0
  3. package/android/.gradle/6.7.1/fileHashes/fileHashes.bin +0 -0
  4. package/android/.gradle/6.7.1/fileHashes/fileHashes.lock +0 -0
  5. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  6. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  7. package/android/.gradle/checksums/checksums.lock +0 -0
  8. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  9. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  10. package/android/local.properties +1 -0
  11. package/android/src/main/java/com/reactnativehmssdk/HMSAudioshareActivity.kt +1 -0
  12. package/android/src/main/java/com/reactnativehmssdk/HMSDecoder.kt +40 -18
  13. package/android/src/main/java/com/reactnativehmssdk/HMSHLSPlayer.kt +113 -68
  14. package/android/src/main/java/com/reactnativehmssdk/HMSHLSPlayerManager.kt +17 -4
  15. package/android/src/main/java/com/reactnativehmssdk/HMSHelper.kt +34 -18
  16. package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +363 -159
  17. package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +367 -151
  18. package/android/src/main/java/com/reactnativehmssdk/HMSSDKViewManager.kt +26 -7
  19. package/android/src/main/java/com/reactnativehmssdk/HMSView.kt +32 -12
  20. package/android/src/main/java/com/reactnativehmssdk/HmsScreenshareActivity.kt +1 -0
  21. package/android/src/main/java/com/reactnativehmssdk/PipActionReceiver.kt +10 -6
  22. package/android/src/main/res/layout/player_view.xml +3 -2
  23. package/ios/HMSDecoder.swift +5 -7
  24. package/ios/HMSHLSPlayerManager.swift +18 -2
  25. package/ios/HMSManager.m +227 -70
  26. package/ios/HMSManager.swift +2 -2
  27. package/ios/HMSRNSDK.swift +67 -126
  28. package/ios/HMSView.swift +17 -3
  29. package/lib/commonjs/classes/HMSEncoder.js +15 -6
  30. package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
  31. package/lib/commonjs/classes/HMSHelper.js +1 -1
  32. package/lib/commonjs/classes/HMSHelper.js.map +1 -1
  33. package/lib/commonjs/classes/HMSLocalAudioTrack.js +2 -2
  34. package/lib/commonjs/classes/HMSLocalAudioTrack.js.map +1 -1
  35. package/lib/commonjs/classes/HMSLocalPeer.js.map +1 -1
  36. package/lib/commonjs/classes/HMSLocalVideoTrack.js +2 -2
  37. package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
  38. package/lib/commonjs/classes/HMSLogger.js +4 -4
  39. package/lib/commonjs/classes/HMSLogger.js.map +1 -1
  40. package/lib/commonjs/classes/HMSMessage.js.map +1 -1
  41. package/lib/commonjs/classes/HMSNativeEventEmitter.js +6 -6
  42. package/lib/commonjs/classes/HMSNativeEventEmitter.js.map +1 -1
  43. package/lib/commonjs/classes/HMSPeer.js +2 -15
  44. package/lib/commonjs/classes/HMSPeer.js.map +1 -1
  45. package/lib/commonjs/classes/HMSRemoteAudioTrack.js +2 -2
  46. package/lib/commonjs/classes/HMSRemoteAudioTrack.js.map +1 -1
  47. package/lib/commonjs/classes/HMSRemotePeer.js.map +1 -1
  48. package/lib/commonjs/classes/HMSRemoteVideoTrack.js +5 -5
  49. package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
  50. package/lib/commonjs/classes/HMSSDK.js +126 -112
  51. package/lib/commonjs/classes/HMSSDK.js.map +1 -1
  52. package/lib/commonjs/classes/HMSSessionStore.js +3 -3
  53. package/lib/commonjs/classes/HMSSessionStore.js.map +1 -1
  54. package/lib/commonjs/classes/HmsView.js +0 -3
  55. package/lib/commonjs/classes/HmsView.js.map +1 -1
  56. package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js +10 -5
  57. package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
  58. package/lib/commonjs/hooks/useHMSPeerUpdates.js +2 -2
  59. package/lib/commonjs/hooks/useHMSPeerUpdates.js.map +1 -1
  60. package/lib/commonjs/index.js +0 -12
  61. package/lib/commonjs/index.js.map +1 -1
  62. package/lib/commonjs/types.js +1 -0
  63. package/lib/commonjs/types.js.map +1 -1
  64. package/lib/module/classes/HMSEncoder.js +15 -6
  65. package/lib/module/classes/HMSEncoder.js.map +1 -1
  66. package/lib/module/classes/HMSHelper.js +1 -1
  67. package/lib/module/classes/HMSHelper.js.map +1 -1
  68. package/lib/module/classes/HMSLocalAudioTrack.js +2 -2
  69. package/lib/module/classes/HMSLocalAudioTrack.js.map +1 -1
  70. package/lib/module/classes/HMSLocalPeer.js.map +1 -1
  71. package/lib/module/classes/HMSLocalVideoTrack.js +2 -2
  72. package/lib/module/classes/HMSLocalVideoTrack.js.map +1 -1
  73. package/lib/module/classes/HMSLogger.js +4 -4
  74. package/lib/module/classes/HMSLogger.js.map +1 -1
  75. package/lib/module/classes/HMSMessage.js.map +1 -1
  76. package/lib/module/classes/HMSNativeEventEmitter.js +6 -6
  77. package/lib/module/classes/HMSNativeEventEmitter.js.map +1 -1
  78. package/lib/module/classes/HMSPeer.js +2 -15
  79. package/lib/module/classes/HMSPeer.js.map +1 -1
  80. package/lib/module/classes/HMSRemoteAudioTrack.js +2 -2
  81. package/lib/module/classes/HMSRemoteAudioTrack.js.map +1 -1
  82. package/lib/module/classes/HMSRemotePeer.js.map +1 -1
  83. package/lib/module/classes/HMSRemoteVideoTrack.js +5 -5
  84. package/lib/module/classes/HMSRemoteVideoTrack.js.map +1 -1
  85. package/lib/module/classes/HMSSDK.js +126 -112
  86. package/lib/module/classes/HMSSDK.js.map +1 -1
  87. package/lib/module/classes/HMSSessionStore.js +3 -3
  88. package/lib/module/classes/HMSSessionStore.js.map +1 -1
  89. package/lib/module/classes/HmsView.js +0 -3
  90. package/lib/module/classes/HmsView.js.map +1 -1
  91. package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js +11 -6
  92. package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
  93. package/lib/module/hooks/useHMSPeerUpdates.js +2 -2
  94. package/lib/module/hooks/useHMSPeerUpdates.js.map +1 -1
  95. package/lib/module/index.js +0 -1
  96. package/lib/module/index.js.map +1 -1
  97. package/lib/module/types.js +1 -0
  98. package/lib/module/types.js.map +1 -1
  99. package/lib/typescript/classes/HMSEncoder.d.ts +1 -0
  100. package/lib/typescript/classes/HMSLocalPeer.d.ts +1 -0
  101. package/lib/typescript/classes/HMSMessage.d.ts +2 -3
  102. package/lib/typescript/classes/HMSPeer.d.ts +2 -3
  103. package/lib/typescript/classes/HMSRemotePeer.d.ts +1 -0
  104. package/lib/typescript/classes/HMSSDK.d.ts +29 -18
  105. package/lib/typescript/index.d.ts +1 -2
  106. package/lib/typescript/types.d.ts +3 -1
  107. package/package.json +2 -2
  108. package/sdk-versions.json +2 -2
  109. package/src/classes/HMSEncoder.ts +12 -0
  110. package/src/classes/HMSLocalPeer.ts +1 -0
  111. package/src/classes/HMSMessage.ts +2 -3
  112. package/src/classes/HMSPeer.ts +3 -26
  113. package/src/classes/HMSRemotePeer.ts +1 -0
  114. package/src/classes/HMSSDK.tsx +54 -33
  115. package/src/classes/HmsView.tsx +0 -4
  116. package/src/components/HMSHLSPlayer/HMSHLSPlayer.tsx +15 -13
  117. package/src/index.ts +4 -2
  118. package/src/types.ts +2 -0
  119. package/lib/commonjs/classes/HMSMessageType.js +0 -13
  120. package/lib/commonjs/classes/HMSMessageType.js.map +0 -1
  121. package/lib/module/classes/HMSMessageType.js +0 -6
  122. package/lib/module/classes/HMSMessageType.js.map +0 -1
  123. package/lib/typescript/classes/HMSMessageType.d.ts +0 -4
  124. package/src/classes/HMSMessageType.ts +0 -4
@@ -39,6 +39,7 @@ import { HMSRemoteVideoStats } from './HMSRemoteVideoStats';
39
39
  import { HMSLayer } from './HMSLayer';
40
40
  import { HMSSimulcastLayerDefinition } from './HMSSimulcastLayerDefinition';
41
41
  import { HMSQualityLimitationReasons } from './HMSQualityLimitationReasons';
42
+ import { HMSTrackType } from './HMSTrackType';
42
43
 
43
44
  interface InitialData {
44
45
  roles: Record<string, HMSRole>;
@@ -93,6 +94,7 @@ export class HMSEncoder {
93
94
  static encodeHmsPeer(peer: any) {
94
95
  const encodedObj = {
95
96
  peerID: peer?.peerID,
97
+ name: peer?.name,
96
98
  };
97
99
 
98
100
  return new HMSPeer(encodedObj);
@@ -153,6 +155,7 @@ export class HMSEncoder {
153
155
  static encodeHmsLocalPeer(peer: any, id: string) {
154
156
  const encodedObj = {
155
157
  peerID: peer?.peerID,
158
+ name: peer?.name,
156
159
  localAudioTrackData: peer?.localAudioTrackData?.trackId
157
160
  ? {
158
161
  id: id,
@@ -266,6 +269,7 @@ export class HMSEncoder {
266
269
  static encodeHmsRemotePeer(peer: any, id: string) {
267
270
  const encodedObj = {
268
271
  peerID: peer?.peerID,
272
+ name: peer?.name,
269
273
  remoteAudioTrackData: peer?.remoteAudioTrackData?.trackId
270
274
  ? {
271
275
  id: id,
@@ -323,6 +327,14 @@ export class HMSEncoder {
323
327
  });
324
328
  }
325
329
 
330
+ static encodeHmsPreviewForRoleTracks(previewTracks: any[], id: string) {
331
+ return previewTracks?.map((track) => {
332
+ return track.type === HMSTrackType.VIDEO
333
+ ? this.encodeHmsLocalVideoTrack(track, id)
334
+ : this.encodeHmsLocalAudioTrack(track, id);
335
+ });
336
+ }
337
+
326
338
  static encodeHmsRoles(roles: any[]) {
327
339
  const encodedRoles: HMSRole[] = [];
328
340
 
@@ -19,6 +19,7 @@ export class HMSLocalPeer extends HMSPeer {
19
19
 
20
20
  constructor(params: {
21
21
  peerID: string;
22
+ name: string;
22
23
  localAudioTrackData?: {
23
24
  id: string;
24
25
  trackId: string;
@@ -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: HMSMessageType;
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: HMSMessageType;
15
+ type: string;
17
16
  time: Date;
18
17
  sender?: HMSPeer;
19
18
  recipient: HMSMessageRecipient;
@@ -8,19 +8,12 @@ import { HMSConstants } from './HMSConstants';
8
8
 
9
9
  export class HMSPeer {
10
10
  peerID: string;
11
- private _name: string = '';
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 {
@@ -17,6 +17,7 @@ export class HMSRemotePeer extends HMSPeer {
17
17
 
18
18
  constructor(params: {
19
19
  peerID: string;
20
+ name: string;
20
21
  remoteAudioTrackData?: {
21
22
  trackId: string;
22
23
  source?: HMSTrackSource;
@@ -26,7 +26,6 @@ import type { HMSAudioDevice } from './HMSAudioDevice';
26
26
  import type { HMSAudioMode } from './HMSAudioMode';
27
27
  import type { HMSAudioMixingMode } from './HMSAudioMixingMode';
28
28
  import type { HMSLogSettings } from './HMSLogSettings';
29
- import { HMSMessageType } from './HMSMessageType';
30
29
  import { HMSPIPListenerActions } from './HMSPIPListenerActions';
31
30
  import HMSNativeEventListener from './HMSNativeEventListener';
32
31
  import type { HMSNativeEventSubscription } from './HMSNativeEventListener';
@@ -208,30 +207,6 @@ export class HMSSDK {
208
207
  HMSManager.preview({ ...config, id: this.id });
209
208
  };
210
209
 
211
- /**
212
- * - previewForRole can be used when there is role change request for current localPeer and we want
213
- * to show the localPeer how the tracks look before publishing them to room.
214
- *
215
- * - It requires a role of type [HMSRole]{@link HMSRole} for which we want to preview the tracks.
216
- *
217
- * checkout {@link https://www.100ms.live/docs/react-native} for more info
218
- *
219
- * @param {HMSRole}
220
- * @memberof HMSSDK
221
- */
222
- previewForRole = async (role: HMSRole) => {
223
- logger?.verbose('#Function previewForRole', {
224
- role,
225
- id: this.id,
226
- });
227
- if (Platform.OS === 'ios') {
228
- return await HMSManager.previewForRole({ role: role?.name, id: this.id });
229
- } else {
230
- console.log('API currently not available for android');
231
- return 'API currently not available for android';
232
- }
233
- };
234
-
235
210
  /**
236
211
  * - HmsView is react component that takes trackId and starts showing that track on a tile.
237
212
  * - The appearance of tile is completely customizable with style prop.
@@ -298,13 +273,11 @@ export class HMSSDK {
298
273
  *
299
274
  * checkout {@link https://www.100ms.live/docs/react-native/v2/features/chat} for more info
300
275
  *
301
- * @param {message: string} and @param {type: string}
302
276
  * @memberof HMSSDK
277
+ * @param message the message that is to be sent
278
+ * @param type the default type is set to CHAT. You can pass a custom type here for sending events like Emoji Reactions, Notifications, etc
303
279
  */
304
- sendBroadcastMessage = async (
305
- message: string,
306
- type: HMSMessageType = HMSMessageType.CHAT
307
- ) => {
280
+ sendBroadcastMessage = async (message: string, type: string = 'chat') => {
308
281
  logger?.verbose('#Function sendBroadcastMessage', {
309
282
  message,
310
283
  type: type || null,
@@ -331,7 +304,7 @@ export class HMSSDK {
331
304
  sendGroupMessage = async (
332
305
  message: string,
333
306
  roles: HMSRole[],
334
- type: HMSMessageType = HMSMessageType.CHAT
307
+ type: string = 'chat'
335
308
  ) => {
336
309
  logger?.verbose('#Function sendGroupMessage', {
337
310
  message,
@@ -361,7 +334,7 @@ export class HMSSDK {
361
334
  sendDirectMessage = async (
362
335
  message: string,
363
336
  peer: HMSPeer,
364
- type: HMSMessageType = HMSMessageType.CHAT
337
+ type: string = 'chat'
365
338
  ) => {
366
339
  logger?.verbose('#Function sendDirectMessage', {
367
340
  message,
@@ -659,6 +632,54 @@ export class HMSSDK {
659
632
  return await HMSManager.changeName(data);
660
633
  };
661
634
 
635
+ /**
636
+ * -Preview for a specific Role before changing it.
637
+ *
638
+ * By previewing before doing a Role Change, users can see their expected Audio & Video tracks which will be visible to other Peers in Room post changing the Role.
639
+ *
640
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/change-role} for more info
641
+ *
642
+ * @param {role: string}
643
+ * @memberof HMSSDK
644
+ */
645
+ previewForRole = async (role: string) => {
646
+ logger?.verbose('#Function previewForRole', {
647
+ role,
648
+ id: this.id,
649
+ });
650
+ const data = await HMSManager.previewForRole({
651
+ role,
652
+ id: this.id,
653
+ });
654
+
655
+ const previewTracks = HMSEncoder.encodeHmsPreviewForRoleTracks(
656
+ data.tracks,
657
+ this.id
658
+ );
659
+
660
+ return previewTracks;
661
+ };
662
+
663
+ /**
664
+ * Cancel the Previewing for Role invocation.
665
+ *
666
+ * If a [previewForRole] call was performed previously then calling this method clears the tracks created anticipating a Change of Role
667
+ *
668
+ * checkout {@link https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/change-role} for more info
669
+ *
670
+ * @memberof HMSSDK
671
+ */
672
+ cancelPreview = async () => {
673
+ logger?.verbose('#Function cancelPreview', {
674
+ id: this.id,
675
+ });
676
+ const data: { data: string } = await HMSManager.cancelPreview({
677
+ id: this.id,
678
+ });
679
+
680
+ return data;
681
+ };
682
+
662
683
  /**
663
684
  * - Calling this function will accept the most recent roleChange request made by anyone in the room
664
685
  *
@@ -1003,8 +1024,8 @@ export class HMSSDK {
1003
1024
  *
1004
1025
  * checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-output-routing#switch-audio-focus-to-another-device} for more info
1005
1026
  *
1006
- * @param {HMSAudioDevice}
1007
1027
  * @memberof HMSSDK
1028
+ * @param audioDevice
1008
1029
  */
1009
1030
  switchAudioOutput = (audioDevice: HMSAudioDevice) => {
1010
1031
  logger?.verbose('#Function switchAudioOutput', {
@@ -91,10 +91,6 @@ export const HmsViewComponent = React.forwardRef<any, HmsComponentProps>(
91
91
  const capture = async () => {
92
92
  const viewManagerConfig = UIManager.getViewManagerConfig('HMSView');
93
93
 
94
- if (!viewManagerConfig.Commands.capture) {
95
- return Promise.reject('Capture command not available on HMSView');
96
- }
97
-
98
94
  let requestId = _nextRequestId++;
99
95
  let requestMap = _requestMap;
100
96
 
@@ -1,4 +1,4 @@
1
- import React, { useImperativeHandle, useRef } from 'react';
1
+ import React, { useImperativeHandle, useRef, useState } from 'react';
2
2
  import { View, StyleSheet, UIManager, findNodeHandle } from 'react-native';
3
3
  import type { StyleProp, ViewStyle } from 'react-native';
4
4
 
@@ -50,18 +50,13 @@ const _HMSHLSPlayer: React.ForwardRefRenderFunction<
50
50
  HMSHLSPlayerRefProperties,
51
51
  HMSHLSPlayerProps
52
52
  > = (
53
- {
54
- url = '',
55
- style,
56
- containerStyle,
57
- aspectRatio = 9 / 16,
58
- enableStats,
59
- enableControls = false,
60
- },
53
+ { url = '', style, containerStyle, enableStats, enableControls = false },
61
54
  ref
62
55
  ) => {
63
56
  const hmsHlsPlayerRef = useRef<RCTHMSHLSPlayerRef | null>(null);
64
57
 
58
+ const [aspectRatio, setAspectRatio] = useState(16 / 9);
59
+
65
60
  useImperativeHandle(
66
61
  ref,
67
62
  () => ({
@@ -205,6 +200,11 @@ const _HMSHLSPlayer: React.ForwardRefRenderFunction<
205
200
  setHMSHLSPlayerPlaybackError(data.error);
206
201
  } else {
207
202
  setHMSHLSPlayerPlaybackState(data.state);
203
+ if (data.state === 'onVideoSizeChanged') {
204
+ if (typeof data.aspectRatio === 'number') {
205
+ setAspectRatio(data.aspectRatio);
206
+ }
207
+ }
208
208
  }
209
209
  };
210
210
 
@@ -225,7 +225,10 @@ const _HMSHLSPlayer: React.ForwardRefRenderFunction<
225
225
  <RCTHMSHLSPlayer
226
226
  ref={hmsHlsPlayerRef}
227
227
  url={url}
228
- style={[styles.player, { aspectRatio }]}
228
+ style={[
229
+ styles.player,
230
+ { aspectRatio: aspectRatio, flex: aspectRatio < 1 ? 1 : undefined },
231
+ ]}
229
232
  enableStats={enableStats}
230
233
  enableControls={enableControls}
231
234
  onHmsHlsPlaybackEvent={handleHLSPlaybackEvent}
@@ -254,8 +257,7 @@ const styles = StyleSheet.create({
254
257
  },
255
258
  player: {
256
259
  width: '100%',
257
- maxHeight: '100%',
258
- maxWidth: '100%',
259
- aspectRatio: 9 / 16,
260
+ aspectRatio: 16 / 9,
261
+ flex: 1,
260
262
  },
261
263
  });
package/src/index.ts CHANGED
@@ -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';
@@ -85,7 +84,10 @@ export type {
85
84
  HMSSessionStore,
86
85
  HMSSessionStoreValue,
87
86
  } from './classes/HMSSessionStore';
88
- export type { HmsViewComponent as HMSView } from './classes/HmsView';
87
+ export type {
88
+ HmsViewComponent as HMSView,
89
+ HmsComponentProps as HMSViewProps,
90
+ } from './classes/HmsView';
89
91
 
90
92
  import { HMSSDK as HmsManager } from './classes/HMSSDK';
91
93
 
package/src/types.ts CHANGED
@@ -34,10 +34,12 @@ export enum HMSHLSPlayerPlaybackState {
34
34
  PLAYING = 'playing',
35
35
  STOPPED = 'stopped',
36
36
  UNKNOWN = 'unknown',
37
+ onVideoSizeChanged = 'onVideoSizeChanged',
37
38
  }
38
39
 
39
40
  export type HMSHLSPlayerPlaybackStateChangeEventData = {
40
41
  state: HMSHLSPlayerPlaybackState;
42
+ aspectRatio: number | undefined;
41
43
  };
42
44
 
43
45
  type HMSHLSPlayerPlaybackCueEvent = HMSHLSPlayerEvent<
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.HMSMessageType = void 0;
7
- let HMSMessageType = /*#__PURE__*/function (HMSMessageType) {
8
- HMSMessageType["CHAT"] = "chat";
9
- HMSMessageType["METADATA"] = "metadata";
10
- return HMSMessageType;
11
- }({});
12
- exports.HMSMessageType = HMSMessageType;
13
- //# sourceMappingURL=HMSMessageType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["HMSMessageType","exports"],"sources":["HMSMessageType.ts"],"sourcesContent":["export enum HMSMessageType {\n CHAT = 'chat',\n METADATA = 'metadata',\n}\n"],"mappings":";;;;;;IAAYA,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAAAC,OAAA,CAAAD,cAAA,GAAAA,cAAA"}
@@ -1,6 +0,0 @@
1
- export let HMSMessageType = /*#__PURE__*/function (HMSMessageType) {
2
- HMSMessageType["CHAT"] = "chat";
3
- HMSMessageType["METADATA"] = "metadata";
4
- return HMSMessageType;
5
- }({});
6
- //# sourceMappingURL=HMSMessageType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["HMSMessageType"],"sources":["HMSMessageType.ts"],"sourcesContent":["export enum HMSMessageType {\n CHAT = 'chat',\n METADATA = 'metadata',\n}\n"],"mappings":"AAAA,WAAYA,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA"}
@@ -1,4 +0,0 @@
1
- export declare enum HMSMessageType {
2
- CHAT = "chat",
3
- METADATA = "metadata"
4
- }
@@ -1,4 +0,0 @@
1
- export enum HMSMessageType {
2
- CHAT = 'chat',
3
- METADATA = 'metadata',
4
- }