@100mslive/react-native-hms 1.9.0 → 1.9.1-beta.1

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 (92) hide show
  1. package/android/local.properties +1 -8
  2. package/android/src/main/java/com/reactnativehmssdk/HMSAudioshareActivity.kt +1 -1
  3. package/android/src/main/java/com/reactnativehmssdk/HMSHLSPlayer.kt +4 -3
  4. package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +27 -22
  5. package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +226 -249
  6. package/android/src/main/java/com/reactnativehmssdk/HMSView.kt +24 -4
  7. package/android/src/main/java/com/reactnativehmssdk/HmsScreenshareActivity.kt +1 -1
  8. package/ios/HMSHLSPlayerManager.swift +20 -11
  9. package/ios/HMSManager.m +40 -10
  10. package/ios/HMSManager.swift +20 -20
  11. package/ios/HMSRNSDK.swift +86 -85
  12. package/lib/commonjs/classes/HMSPIPConfig.js +4 -0
  13. package/lib/commonjs/classes/HMSPIPConfig.js.map +1 -0
  14. package/lib/commonjs/classes/HMSSDK.js +0 -2
  15. package/lib/commonjs/classes/HMSSDK.js.map +1 -1
  16. package/lib/commonjs/classes/HmsView.js +14 -1
  17. package/lib/commonjs/classes/HmsView.js.map +1 -1
  18. package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js +8 -5
  19. package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
  20. package/lib/commonjs/components/HMSHLSPlayer/hooks.js +6 -1
  21. package/lib/commonjs/components/HMSHLSPlayer/hooks.js.map +1 -1
  22. package/lib/commonjs/components/HMSHLSPlayer/index.js +8 -1
  23. package/lib/commonjs/components/HMSHLSPlayer/index.js.map +1 -1
  24. package/lib/commonjs/hooks/hmsviews.js +17 -0
  25. package/lib/commonjs/hooks/hmsviews.js.map +1 -0
  26. package/lib/commonjs/index.js +9 -1
  27. package/lib/commonjs/index.js.map +1 -1
  28. package/lib/commonjs/stores/hls-player-playback-slice.js +4 -0
  29. package/lib/commonjs/stores/hls-player-playback-slice.js.map +1 -1
  30. package/lib/commonjs/stores/hms-store.js +3 -1
  31. package/lib/commonjs/stores/hms-store.js.map +1 -1
  32. package/lib/commonjs/stores/hmsviews-slice.js +19 -0
  33. package/lib/commonjs/stores/hmsviews-slice.js.map +1 -0
  34. package/lib/commonjs/stores/types.js +9 -0
  35. package/lib/commonjs/stores/types.js.map +1 -1
  36. package/lib/commonjs/types.js +1 -1
  37. package/lib/commonjs/types.js.map +1 -1
  38. package/lib/module/classes/HMSPIPConfig.js +2 -0
  39. package/lib/module/classes/HMSPIPConfig.js.map +1 -0
  40. package/lib/module/classes/HMSSDK.js +0 -3
  41. package/lib/module/classes/HMSSDK.js.map +1 -1
  42. package/lib/module/classes/HmsView.js +14 -1
  43. package/lib/module/classes/HmsView.js.map +1 -1
  44. package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js +9 -6
  45. package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
  46. package/lib/module/components/HMSHLSPlayer/hooks.js +4 -0
  47. package/lib/module/components/HMSHLSPlayer/hooks.js.map +1 -1
  48. package/lib/module/components/HMSHLSPlayer/index.js +1 -1
  49. package/lib/module/components/HMSHLSPlayer/index.js.map +1 -1
  50. package/lib/module/hooks/hmsviews.js +12 -0
  51. package/lib/module/hooks/hmsviews.js.map +1 -0
  52. package/lib/module/index.js +1 -0
  53. package/lib/module/index.js.map +1 -1
  54. package/lib/module/stores/hls-player-playback-slice.js +4 -0
  55. package/lib/module/stores/hls-player-playback-slice.js.map +1 -1
  56. package/lib/module/stores/hms-store.js +3 -1
  57. package/lib/module/stores/hms-store.js.map +1 -1
  58. package/lib/module/stores/hmsviews-slice.js +12 -0
  59. package/lib/module/stores/hmsviews-slice.js.map +1 -0
  60. package/lib/module/stores/types.js +9 -0
  61. package/lib/module/stores/types.js.map +1 -1
  62. package/lib/module/types.js +1 -1
  63. package/lib/module/types.js.map +1 -1
  64. package/lib/typescript/classes/HMSPIPConfig.d.ts +7 -0
  65. package/lib/typescript/classes/HMSSDK.d.ts +3 -9
  66. package/lib/typescript/components/HMSHLSPlayer/hooks.d.ts +2 -0
  67. package/lib/typescript/components/HMSHLSPlayer/index.d.ts +1 -1
  68. package/lib/typescript/hooks/hmsviews.d.ts +3 -0
  69. package/lib/typescript/index.d.ts +2 -0
  70. package/lib/typescript/stores/hms-store.d.ts +4 -3
  71. package/lib/typescript/stores/hmsviews-slice.d.ts +5 -0
  72. package/lib/typescript/stores/types.d.ts +14 -2
  73. package/lib/typescript/types.d.ts +9 -5
  74. package/package.json +3 -1
  75. package/sdk-versions.json +1 -1
  76. package/src/classes/HMSPIPConfig.ts +7 -0
  77. package/src/classes/HMSSDK.tsx +3 -11
  78. package/src/classes/HmsView.tsx +16 -2
  79. package/src/components/HMSHLSPlayer/HMSHLSPlayer.tsx +11 -5
  80. package/src/components/HMSHLSPlayer/hooks.ts +7 -0
  81. package/src/components/HMSHLSPlayer/index.ts +1 -0
  82. package/src/hooks/hmsviews.ts +13 -0
  83. package/src/index.ts +2 -0
  84. package/src/stores/hls-player-playback-slice.ts +3 -0
  85. package/src/stores/hms-store.ts +2 -0
  86. package/src/stores/hmsviews-slice.ts +20 -0
  87. package/src/stores/types.ts +20 -1
  88. package/src/types.ts +13 -3
  89. package/ios/Hmssdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  90. package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  91. package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcuserdata/jatinnagar.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  92. package/ios/Hmssdk.xcodeproj/xcuserdata/jatinnagar.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
@@ -5,7 +5,8 @@ type HMSHLSPlayerEvent<T extends string, U> = {
5
5
  export declare enum HMSHLSPlayerPlaybackEventTypes {
6
6
  ON_PLAYBACK_CUE_EVENT = "ON_PLAYBACK_CUE_EVENT",
7
7
  ON_PLAYBACK_FAILURE_EVENT = "ON_PLAYBACK_FAILURE_EVENT",
8
- ON_PLAYBACK_STATE_CHANGE_EVENT = "ON_PLAYBACK_STATE_CHANGE_EVENT"
8
+ ON_PLAYBACK_STATE_CHANGE_EVENT = "ON_PLAYBACK_STATE_CHANGE_EVENT",
9
+ ON_PLAYBACK_RESOLUTION_CHANGE_EVENT = "ON_PLAYBACK_RESOLUTION_CHANGE_EVENT"
9
10
  }
10
11
  export type HMSHLSPlayerPlaybackCueEventData = {
11
12
  id?: string;
@@ -26,17 +27,20 @@ export declare enum HMSHLSPlayerPlaybackState {
26
27
  PAUSED = "paused",
27
28
  PLAYING = "playing",
28
29
  STOPPED = "stopped",
29
- UNKNOWN = "unknown",
30
- onVideoSizeChanged = "onVideoSizeChanged"
30
+ UNKNOWN = "unknown"
31
31
  }
32
32
  export type HMSHLSPlayerPlaybackStateChangeEventData = {
33
33
  state: HMSHLSPlayerPlaybackState;
34
- aspectRatio: number | undefined;
34
+ };
35
+ export type HMSHLSPlayerPlaybackResolutionChangeEventData = {
36
+ width: number;
37
+ height: number;
35
38
  };
36
39
  type HMSHLSPlayerPlaybackCueEvent = HMSHLSPlayerEvent<HMSHLSPlayerPlaybackEventTypes.ON_PLAYBACK_CUE_EVENT, HMSHLSPlayerPlaybackCueEventData>;
37
40
  type HMSHLSPlayerPlaybackFailureEvent = HMSHLSPlayerEvent<HMSHLSPlayerPlaybackEventTypes.ON_PLAYBACK_FAILURE_EVENT, HMSHLSPlayerPlaybackFailureEventData>;
38
41
  type HMSHLSPlayerPlaybackStateChangeEvent = HMSHLSPlayerEvent<HMSHLSPlayerPlaybackEventTypes.ON_PLAYBACK_STATE_CHANGE_EVENT, HMSHLSPlayerPlaybackStateChangeEventData>;
39
- export type HMSHLSPlayerPlaybackEvent = HMSHLSPlayerPlaybackCueEvent | HMSHLSPlayerPlaybackFailureEvent | HMSHLSPlayerPlaybackStateChangeEvent;
42
+ type HMSHLSPLayerPlaybackResolutionChangeEvent = HMSHLSPlayerEvent<HMSHLSPlayerPlaybackEventTypes.ON_PLAYBACK_RESOLUTION_CHANGE_EVENT, HMSHLSPlayerPlaybackResolutionChangeEventData>;
43
+ export type HMSHLSPlayerPlaybackEvent = HMSHLSPlayerPlaybackCueEvent | HMSHLSPlayerPlaybackFailureEvent | HMSHLSPlayerPlaybackStateChangeEvent | HMSHLSPLayerPlaybackResolutionChangeEvent;
40
44
  export declare enum HMSHLSPlayerStatsEventTypes {
41
45
  ON_STATS_EVENT_ERROR = "ON_STATS_EVENT_ERROR",
42
46
  ON_STATS_EVENT_UPDATE = "ON_STATS_EVENT_UPDATE"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@100mslive/react-native-hms",
3
- "version": "1.9.0",
3
+ "version": "1.9.1-beta.1",
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",
@@ -17,6 +17,8 @@
17
17
  "sdk-versions.json",
18
18
  "!lib/typescript/example",
19
19
  "!android/build",
20
+ "!android/.gradle",
21
+ "!android/.idea",
20
22
  "!ios/build",
21
23
  "!**/__tests__",
22
24
  "!**/__fixtures__",
package/sdk-versions.json CHANGED
@@ -2,5 +2,5 @@
2
2
  "ios": "1.1.0",
3
3
  "iOSBroadcastExtension": "0.0.9",
4
4
  "iOSHMSHLSPlayer": "0.0.2",
5
- "android": "2.7.7"
5
+ "android": "2.7.9"
6
6
  }
@@ -0,0 +1,7 @@
1
+ export interface HMSPIPConfig {
2
+ autoEnterPipMode?: boolean;
3
+ aspectRatio?: [number, number];
4
+ endButton?: boolean;
5
+ audioButton?: boolean;
6
+ videoButton?: boolean;
7
+ };
@@ -45,18 +45,10 @@ import { HMSPeerUpdate, HMSPeerUpdateOrdinals } from './HMSPeerUpdate';
45
45
  import { HMSSessionStore } from './HMSSessionStore';
46
46
  import type { HMSPeerListIteratorOptions } from './HMSPeerListIteratorOptions';
47
47
  import { HMSPeerListIterator } from './HMSPeerListIterator';
48
+ import type { HMSPIPConfig } from './HMSPIPConfig';
48
49
 
49
50
  type HmsViewProps = Omit<HmsComponentProps, 'id'>;
50
51
 
51
- // TODO: Rename to HMSPIPConfig & to be moved to a separate file
52
- interface PIPConfig {
53
- autoEnterPipMode?: boolean;
54
- aspectRatio?: [number, number];
55
- endButton?: boolean;
56
- audioButton?: boolean;
57
- videoButton?: boolean;
58
- }
59
-
60
52
  const ReactNativeVersion = require('react-native/Libraries/Core/ReactNativeVersion');
61
53
 
62
54
  let HmsSdk: HMSSDK | undefined;
@@ -2511,14 +2503,14 @@ export class HMSSDK {
2511
2503
  return HMSManager.handlePipActions('isPipModeSupported', { id: this.id });
2512
2504
  }
2513
2505
 
2514
- async enterPipMode(data?: PIPConfig): Promise<undefined | boolean> {
2506
+ async enterPipMode(data?: HMSPIPConfig): Promise<undefined | boolean> {
2515
2507
  return HMSManager.handlePipActions('enterPipMode', {
2516
2508
  ...data,
2517
2509
  id: this.id,
2518
2510
  });
2519
2511
  }
2520
2512
 
2521
- async setPipParams(data?: PIPConfig): Promise<undefined | boolean> {
2513
+ async setPipParams(data?: HMSPIPConfig): Promise<undefined | boolean> {
2522
2514
  return HMSManager.handlePipActions('setPictureInPictureParams', {
2523
2515
  ...data,
2524
2516
  id: this.id,
@@ -6,9 +6,10 @@ import {
6
6
  UIManager,
7
7
  Platform,
8
8
  } from 'react-native';
9
- import type { ViewStyle } from 'react-native';
9
+ import type { NativeSyntheticEvent, ViewStyle } from 'react-native';
10
10
  import { HMSConstants } from './HMSConstants';
11
11
  import { HMSVideoViewMode } from './HMSVideoViewMode';
12
+ import { setHmsViewsResolutionsState } from '../hooks/hmsviews';
12
13
 
13
14
  interface HmsViewProps {
14
15
  data: {
@@ -64,7 +65,20 @@ export const HmsViewComponent = React.forwardRef<any, HmsComponentProps>(
64
65
  * This method is passed to `onChange` prop of `HmsView` Native Component.
65
66
  * It is invoked when `HmsView` emits 'topChange' event.
66
67
  */
67
- const onChange = () => setApplyStyles_ANDROID(true);
68
+ const onChange = ({
69
+ nativeEvent,
70
+ }: NativeSyntheticEvent<{
71
+ data: { height: number; width: number };
72
+ event: 'ON_RESOLUTION_CHANGE_EVENT';
73
+ }>) => {
74
+ const { event, data } = nativeEvent;
75
+
76
+ setApplyStyles_ANDROID(true);
77
+
78
+ if (event === 'ON_RESOLUTION_CHANGE_EVENT') {
79
+ setHmsViewsResolutionsState(trackId, data);
80
+ }
81
+ };
68
82
 
69
83
  /**
70
84
  * This method is passed to `onDataReturned` prop of `HmsView` Native Component.
@@ -6,6 +6,7 @@ import {
6
6
  setHMSHLSPlayerCue,
7
7
  setHMSHLSPlayerPlaybackError,
8
8
  setHMSHLSPlayerPlaybackState,
9
+ setHMSHLSPlayerResolution,
9
10
  setHMSHLSPlayerStats,
10
11
  setHMSHLSPlayerStatsError,
11
12
  } from './hooks';
@@ -198,13 +199,18 @@ const _HMSHLSPlayer: React.ForwardRefRenderFunction<
198
199
  event === HMSHLSPlayerPlaybackEventTypes.ON_PLAYBACK_FAILURE_EVENT
199
200
  ) {
200
201
  setHMSHLSPlayerPlaybackError(data.error);
202
+ } else if (
203
+ event === HMSHLSPlayerPlaybackEventTypes.ON_PLAYBACK_RESOLUTION_CHANGE_EVENT
204
+ ) {
205
+ setHMSHLSPlayerResolution({...data});
206
+
207
+ const aspectRatio = data.width / data.height;
208
+
209
+ if (typeof aspectRatio === 'number' && !isNaN(aspectRatio)) {
210
+ setAspectRatio(aspectRatio);
211
+ }
201
212
  } else {
202
213
  setHMSHLSPlayerPlaybackState(data.state);
203
- if (data.state === 'onVideoSizeChanged') {
204
- if (typeof data.aspectRatio === 'number') {
205
- setAspectRatio(data.aspectRatio);
206
- }
207
- }
208
214
  }
209
215
  };
210
216
 
@@ -17,6 +17,10 @@ export const useHMSHLSPlayerPlaybackState = () => {
17
17
  return useHMSStore((state) => state.playbackState);
18
18
  };
19
19
 
20
+ export const useHMSHLSPlayerResolution = () => {
21
+ return useHMSStore((state) => state.resolution);
22
+ };
23
+
20
24
  export const useHMSHLSPlayerStats = () => {
21
25
  return useHMSHLSPlayerStatsStore(
22
26
  (state) => ({
@@ -89,6 +93,9 @@ export const useHMSHLSPlayerCue = (
89
93
  export const setHMSHLSPlayerPlaybackState =
90
94
  useHMSStore.getState().setPlaybackState;
91
95
 
96
+ export const setHMSHLSPlayerResolution =
97
+ useHMSStore.getState().setResolution;
98
+
92
99
  export const setHMSHLSPlayerCue = useHMSStore.getState().setCue;
93
100
 
94
101
  export const setHMSHLSPlayerPlaybackError =
@@ -6,4 +6,5 @@ export {
6
6
  useHMSHLSPlayerStats,
7
7
  useHMSHLSPlayerStat,
8
8
  useHMSHLSPlayerStatsError,
9
+ useHMSHLSPlayerResolution,
9
10
  } from './hooks';
@@ -0,0 +1,13 @@
1
+ import type { TrackId } from '../stores/types';
2
+ import { useHMSStore } from '../stores/hms-store';
3
+
4
+ // use latest state (with component rerender)
5
+
6
+ export const useHmsViewsResolutionsState = (trackId?: TrackId) => {
7
+ return useHMSStore((state) => trackId ? state.hmsviewsResolutions[trackId] : undefined);
8
+ };
9
+
10
+ // state setters
11
+
12
+ export const setHmsViewsResolutionsState =
13
+ useHMSStore.getState().setHmsviewsResolutions;
package/src/index.ts CHANGED
@@ -88,6 +88,7 @@ export type {
88
88
  HmsViewComponent as HMSView,
89
89
  HmsComponentProps as HMSViewProps,
90
90
  } from './classes/HmsView';
91
+ export type { HMSPIPConfig } from './classes/HMSPIPConfig';
91
92
 
92
93
  import { HMSSDK as HmsManager } from './classes/HMSSDK';
93
94
 
@@ -99,6 +100,7 @@ export * from './components/HMSHLSPlayer';
99
100
 
100
101
  // 100ms Hooks
101
102
  export * from './hooks/useHMSPeerUpdates';
103
+ export { useHmsViewsResolutionsState } from './hooks/hmsviews';
102
104
 
103
105
  // 100ms types
104
106
  export * from './types';
@@ -22,4 +22,7 @@ export const createHMSHLSPlayerPlaybackSlice: StateCreator<
22
22
 
23
23
  error: undefined,
24
24
  setPlaybackError: (error: HMSHLSPlayerPlaybackError) => set({ error }),
25
+
26
+ resolution: undefined,
27
+ setResolution: (resolution) => set({ resolution }),
25
28
  });
@@ -2,10 +2,12 @@ import { create } from 'zustand';
2
2
  import { subscribeWithSelector } from 'zustand/middleware';
3
3
 
4
4
  import { createHMSHLSPlayerPlaybackSlice } from './hls-player-playback-slice';
5
+ import { createHMSViewsSlice } from './hmsviews-slice';
5
6
  import type { HMSStore } from './types';
6
7
 
7
8
  export const useHMSStore = create<HMSStore>()(
8
9
  subscribeWithSelector((...a) => ({
9
10
  ...createHMSHLSPlayerPlaybackSlice(...a),
11
+ ...createHMSViewsSlice(...a)
10
12
  }))
11
13
  );
@@ -0,0 +1,20 @@
1
+ import type { StateCreator } from 'zustand';
2
+
3
+ import type { HMSViewsSlice, HMSStore } from './types';
4
+
5
+ export const createHMSViewsSlice: StateCreator<
6
+ HMSStore,
7
+ [],
8
+ [],
9
+ HMSViewsSlice
10
+ > = (set) => ({
11
+ hmsviewsResolutions: {},
12
+ setHmsviewsResolutions: (trackId, resolution) => {
13
+ set((state) => ({
14
+ hmsviewsResolutions: {
15
+ ...state.hmsviewsResolutions,
16
+ [trackId]: resolution,
17
+ },
18
+ }));
19
+ },
20
+ });
@@ -4,13 +4,28 @@ import type {
4
4
  HMSHLSPlayerPlaybackState,
5
5
  HMSHLSPlayerPlaybackCueEventData,
6
6
  HMSHLSPlayerPlaybackFailureEventData,
7
+ HMSHLSPlayerPlaybackResolutionChangeEventData,
7
8
  HMSHLSPlayerStatsErrorEventData,
8
9
  HMSHLSPlayerStatsUpdateEventData,
9
10
  } from '../types';
10
11
 
11
- export type HMSStore = HMSHLSPlayerPlaybackSlice;
12
+ export type HMSStore = HMSHLSPlayerPlaybackSlice & HMSViewsSlice;
12
13
  export type HMSHLSPlayerStatsStore = HMSHLSPlayerStatsSlice;
13
14
 
15
+ // HMSViews Slice
16
+
17
+ export type TrackId = string;
18
+
19
+ export type Resolution = {
20
+ width: number;
21
+ height: number;
22
+ };
23
+
24
+ export interface HMSViewsSlice {
25
+ hmsviewsResolutions: Record<TrackId, Resolution | undefined>;
26
+ setHmsviewsResolutions(trackId: TrackId, resolution: Resolution): void;
27
+ };
28
+
14
29
  // HLS Player Playback Slice
15
30
 
16
31
  export interface HMSHLSPlayerPlaybackCue
@@ -25,12 +40,16 @@ export type HMSHLSPlayerPlaybackError =
25
40
  | HMSHLSPlayerPlaybackFailureEventData['error']
26
41
  | undefined;
27
42
 
43
+ export type HMSHLSPlayerResolution = HMSHLSPlayerPlaybackResolutionChangeEventData | undefined;
44
+
28
45
  export interface HMSHLSPlayerPlaybackSlice {
29
46
  cue: HMSHLSPlayerCue;
30
47
  playbackState: HMSHLSPlayerPlaybackState;
48
+ resolution: HMSHLSPlayerResolution;
31
49
  error: HMSHLSPlayerPlaybackError;
32
50
  setCue(cue: HMSHLSPlayerPlaybackCue): void;
33
51
  setPlaybackState(playbackState: HMSHLSPlayerPlaybackState): void;
52
+ setResolution(resolution: HMSHLSPlayerResolution): void;
34
53
  setPlaybackError(error: HMSHLSPlayerPlaybackError): void;
35
54
  }
36
55
 
package/src/types.ts CHANGED
@@ -10,6 +10,7 @@ export enum HMSHLSPlayerPlaybackEventTypes {
10
10
  ON_PLAYBACK_CUE_EVENT = 'ON_PLAYBACK_CUE_EVENT',
11
11
  ON_PLAYBACK_FAILURE_EVENT = 'ON_PLAYBACK_FAILURE_EVENT',
12
12
  ON_PLAYBACK_STATE_CHANGE_EVENT = 'ON_PLAYBACK_STATE_CHANGE_EVENT',
13
+ ON_PLAYBACK_RESOLUTION_CHANGE_EVENT = 'ON_PLAYBACK_RESOLUTION_CHANGE_EVENT',
13
14
  }
14
15
 
15
16
  export type HMSHLSPlayerPlaybackCueEventData = {
@@ -34,12 +35,15 @@ export enum HMSHLSPlayerPlaybackState {
34
35
  PLAYING = 'playing',
35
36
  STOPPED = 'stopped',
36
37
  UNKNOWN = 'unknown',
37
- onVideoSizeChanged = 'onVideoSizeChanged',
38
38
  }
39
39
 
40
40
  export type HMSHLSPlayerPlaybackStateChangeEventData = {
41
41
  state: HMSHLSPlayerPlaybackState;
42
- aspectRatio: number | undefined;
42
+ };
43
+
44
+ export type HMSHLSPlayerPlaybackResolutionChangeEventData = {
45
+ width: number;
46
+ height: number;
43
47
  };
44
48
 
45
49
  type HMSHLSPlayerPlaybackCueEvent = HMSHLSPlayerEvent<
@@ -57,10 +61,16 @@ type HMSHLSPlayerPlaybackStateChangeEvent = HMSHLSPlayerEvent<
57
61
  HMSHLSPlayerPlaybackStateChangeEventData
58
62
  >;
59
63
 
64
+ type HMSHLSPLayerPlaybackResolutionChangeEvent = HMSHLSPlayerEvent<
65
+ HMSHLSPlayerPlaybackEventTypes.ON_PLAYBACK_RESOLUTION_CHANGE_EVENT,
66
+ HMSHLSPlayerPlaybackResolutionChangeEventData
67
+ >;
68
+
60
69
  export type HMSHLSPlayerPlaybackEvent =
61
70
  | HMSHLSPlayerPlaybackCueEvent
62
71
  | HMSHLSPlayerPlaybackFailureEvent
63
- | HMSHLSPlayerPlaybackStateChangeEvent;
72
+ | HMSHLSPlayerPlaybackStateChangeEvent
73
+ | HMSHLSPLayerPlaybackResolutionChangeEvent;
64
74
 
65
75
  // #endregion HMS HLSPlayer Playback Events
66
76
 
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Workspace
3
- version = "1.0">
4
- <FileRef
5
- location = "self:">
6
- </FileRef>
7
- </Workspace>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>IDEDidComputeMac32BitWarning</key>
6
- <true/>
7
- </dict>
8
- </plist>
@@ -1,14 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>SchemeUserState</key>
6
- <dict>
7
- <key>Hmssdk.xcscheme_^#shared#^_</key>
8
- <dict>
9
- <key>orderHint</key>
10
- <integer>0</integer>
11
- </dict>
12
- </dict>
13
- </dict>
14
- </plist>