@100mslive/hms-video-store 0.2.78 → 0.2.81

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.
@@ -1,7 +1,7 @@
1
1
  import { HMSConfig, HMSSimulcastLayer, HMSAudioTrackSettings, HMSVideoTrackSettings, HMSLogLevel, HMSVideoPlugin, HMSAudioPlugin } from '@100mslive/hms-video';
2
2
  import { HMSMessageID, HMSPeerID, HMSRoleName, HMSTrackID, HMSTrackSource, IHMSPlaylistActions, HMSChangeMultiTrackStateParams } from './schema';
3
3
  import { HMSRoleChangeRequest } from './selectors';
4
- import { RTMPRecordingConfig, HMSPeerUpdateConfig } from './hmsSDKStore/sdkTypes';
4
+ import { RTMPRecordingConfig } from './hmsSDKStore/sdkTypes';
5
5
  /**
6
6
  * The below interface defines our SDK API Surface for taking room related actions.
7
7
  * It talks to our 100ms backend and handles error reconnections, state managements
@@ -230,13 +230,15 @@ export interface IHMSActions {
230
230
  */
231
231
  stopRTMPAndRecording(): Promise<void>;
232
232
  /**
233
- * If both name and data is undefined: Message is ignored.
234
- * If data is undefined: Name of the peer is changed.
235
- * If name is undefined: Metadata of the peer is updated.
236
- * If both name and data is defined: Both name and metadata is updated.
237
- * @alpha
233
+ * If you want to update the name of peer.
234
+ * @beta
238
235
  */
239
- updatePeer(params: HMSPeerUpdateConfig): Promise<void>;
236
+ changeName(name: string): Promise<void>;
237
+ /**
238
+ * If you want to update the metadata of peer.
239
+ * @beta
240
+ */
241
+ changeMetadata(metadata: string): Promise<void>;
240
242
  /**
241
243
  * Set the type of logs from the SDK you want to be logged in the browser console.
242
244
  *
@@ -74,7 +74,8 @@ export declare class HMSSDKActions implements IHMSActions {
74
74
  removePeer(peerID: string, reason: string): Promise<void>;
75
75
  startRTMPOrRecording(params: sdkTypes.RTMPRecordingConfig): Promise<void>;
76
76
  stopRTMPAndRecording(): Promise<void>;
77
- updatePeer(params: sdkTypes.HMSPeerUpdateConfig): Promise<void>;
77
+ changeName(name: string): Promise<void>;
78
+ changeMetadata(metadata: string): Promise<void>;
78
79
  setRemoteTrackEnabled(trackID: HMSTrackID | HMSTrackID[], enabled: boolean): Promise<void>;
79
80
  setRemoteTracksEnabled(params: HMSChangeMultiTrackStateParams): Promise<void>;
80
81
  setLogLevel(level: HMSLogLevel): void;
@@ -1,2 +1,2 @@
1
- import { HMSException, HMSSimulcastLayer, HMSPeerUpdate, HMSRoomUpdate, HMSTrackUpdate, HMSAudioTrackSettings, HMSVideoTrackSettings, HMSPeer, HMSRoom, HMSMessage, HMSConfig, HMSSpeaker, HMSRole, HMSLocalPeer, HMSRemotePeer, SimulcastLayerDefinition, DeviceMap, HMSLogLevel, HMSDeviceChangeEvent, HMSPlaylistItem, HMSPlaylistManager, HMSPlaylistProgressEvent, RTMPRecordingConfig, HMSRecording, HMSRTMP, HMSPeerUpdateConfig } from '@100mslive/hms-video';
2
- export { HMSPeer, HMSRoom, HMSMessage, HMSSpeaker, HMSConfig, HMSAudioTrackSettings, HMSVideoTrackSettings, HMSException, HMSSimulcastLayer, HMSRoomUpdate, HMSPeerUpdate, HMSTrackUpdate, HMSRole, HMSLocalPeer, HMSRemotePeer, HMSLogLevel, SimulcastLayerDefinition, DeviceMap, HMSDeviceChangeEvent, HMSPlaylistItem, HMSPlaylistManager, HMSPlaylistProgressEvent, RTMPRecordingConfig, HMSRecording, HMSRTMP, HMSPeerUpdateConfig, };
1
+ import { HMSException, HMSSimulcastLayer, HMSPeerUpdate, HMSRoomUpdate, HMSTrackUpdate, HMSAudioTrackSettings, HMSVideoTrackSettings, HMSPeer, HMSRoom, HMSMessage, HMSConfig, HMSSpeaker, HMSRole, HMSLocalPeer, HMSRemotePeer, SimulcastLayerDefinition, DeviceMap, HMSLogLevel, HMSDeviceChangeEvent, HMSPlaylistItem, HMSPlaylistManager, HMSPlaylistProgressEvent, RTMPRecordingConfig, HMSRecording, HMSRTMP } from '@100mslive/hms-video';
2
+ export { HMSPeer, HMSRoom, HMSMessage, HMSSpeaker, HMSConfig, HMSAudioTrackSettings, HMSVideoTrackSettings, HMSException, HMSSimulcastLayer, HMSRoomUpdate, HMSPeerUpdate, HMSTrackUpdate, HMSRole, HMSLocalPeer, HMSRemotePeer, HMSLogLevel, SimulcastLayerDefinition, DeviceMap, HMSDeviceChangeEvent, HMSPlaylistItem, HMSPlaylistManager, HMSPlaylistProgressEvent, RTMPRecordingConfig, HMSRecording, HMSRTMP, };
@@ -25,6 +25,8 @@ export declare enum HMSNotificationTypes {
25
25
  TRACK_REMOVED = "TRACK_REMOVED",
26
26
  TRACK_MUTED = "TRACK_MUTED",
27
27
  TRACK_UNMUTED = "TRACK_UNMUTED",
28
+ TRACK_DEGRADED = "TRACK_DEGRADED",
29
+ TRACK_RESTORED = "TRACK_RESTORED",
28
30
  ROLE_CHANGE_REQUEST = "ROLE_CHANGE_REQUEST",
29
31
  ROLE_UPDATED = "ROLE_UPDATED",
30
32
  CHANGE_TRACK_STATE_REQUEST = "CHANGE_TRACK_STATE_REQUEST",
@@ -19,6 +19,11 @@ export interface HMSPeer {
19
19
  audioTrack?: HMSTrackID;
20
20
  auxiliaryTracks: HMSTrackID[];
21
21
  customerUserId?: string;
22
+ metadata?: string;
23
+ /**
24
+ * @deprecated
25
+ * Use metadata field instead.
26
+ */
22
27
  customerDescription?: string;
23
28
  }
24
29
  /**
@@ -1,4 +1,4 @@
1
- import { HMSRoleName, HMSStore, HMSTrack } from '../schema';
1
+ import { HMSPeerID, HMSRoleName, HMSStore, HMSTrack } from '../schema';
2
2
  /**
3
3
  * StoreSelector is a function that takes in {@link HMSStore} as argument
4
4
  * and returns a part of the store that is queried using the selector.
@@ -119,4 +119,10 @@ export declare const selectMessagesUnreadCountByPeerID: (id?: string | undefined
119
119
  * @returns HMSPeer[]
120
120
  */
121
121
  export declare const selectPeersByRole: (role: HMSRoleName) => import("reselect").OutputSelector<HMSStore, import("../schema").HMSPeer[], (res: import("../schema").HMSPeer[]) => import("../schema").HMSPeer[]>;
122
+ /**
123
+ * Selects the peer metadata for the passed in peer and returns it as JSON. If metadata is not present
124
+ * or conversion to JSON gives an error, an empty object is returned.
125
+ * Please directly use peer.metadata in case the metadata is not JSON by design.
126
+ */
127
+ export declare const selectPeerMetadata: (peerId: HMSPeerID) => import("reselect").OutputSelector<HMSStore, any, (res: import("../schema").HMSPeer | null) => any>;
122
128
  export {};