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

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.
@@ -234,6 +234,7 @@ export interface IHMSActions {
234
234
  * If data is undefined: Name of the peer is changed.
235
235
  * If name is undefined: Metadata of the peer is updated.
236
236
  * If both name and data is defined: Both name and metadata is updated.
237
+ * @alpha
237
238
  */
238
239
  updatePeer(params: HMSPeerUpdateConfig): Promise<void>;
239
240
  /**
@@ -1,4 +1,4 @@
1
- import { HMSStore, HMSTrack } from '../schema';
1
+ import { 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.
@@ -113,4 +113,10 @@ export declare const selectMessagesByPeerID: (id?: string | undefined) => StoreS
113
113
  export declare const selectMessagesByRole: (id?: string | undefined) => StoreSelector<import("../schema").HMSMessage[] | undefined>;
114
114
  export declare const selectMessagesUnreadCountByRole: (id?: string | undefined) => StoreSelector<number>;
115
115
  export declare const selectMessagesUnreadCountByPeerID: (id?: string | undefined) => StoreSelector<number>;
116
+ /**
117
+ * Select an array of peers of a particular role
118
+ * @param role HMSRoleName
119
+ * @returns HMSPeer[]
120
+ */
121
+ export declare const selectPeersByRole: (role: HMSRoleName) => import("reselect").OutputSelector<HMSStore, import("../schema").HMSPeer[], (res: import("../schema").HMSPeer[]) => import("../schema").HMSPeer[]>;
116
122
  export {};
@@ -2413,6 +2413,19 @@ var selectMessagesByPeerID = /*#__PURE__*/byIDCurry(selectMessagesByPeerIDIntern
2413
2413
  var selectMessagesByRole = /*#__PURE__*/byIDCurry(selectMessagesByRoleInternal);
2414
2414
  var selectMessagesUnreadCountByRole = /*#__PURE__*/byIDCurry(selectUnreadMessageCountByRole);
2415
2415
  var selectMessagesUnreadCountByPeerID = /*#__PURE__*/byIDCurry(selectUnreadMessageCountByPeerID);
2416
+ /**
2417
+ * Select an array of peers of a particular role
2418
+ * @param role HMSRoleName
2419
+ * @returns HMSPeer[]
2420
+ */
2421
+
2422
+ var selectPeersByRole = function selectPeersByRole(role) {
2423
+ return reselect.createSelector([selectPeers], function (peers) {
2424
+ return peers.filter(function (p) {
2425
+ return p.roleName === role;
2426
+ });
2427
+ });
2428
+ };
2416
2429
 
2417
2430
  var selectPeersWithAudioStatus = /*#__PURE__*/reselect.createSelector([selectPeersMap, selectTracksMap], function (peersMap, tracksMap) {
2418
2431
  var participants = Object.values(peersMap).map(function (peer) {
@@ -5385,6 +5398,7 @@ exports.selectPeerSharingAudio = selectPeerSharingAudio;
5385
5398
  exports.selectPeerSharingAudioPlaylist = selectPeerSharingAudioPlaylist;
5386
5399
  exports.selectPeerSharingVideoPlaylist = selectPeerSharingVideoPlaylist;
5387
5400
  exports.selectPeers = selectPeers;
5401
+ exports.selectPeersByRole = selectPeersByRole;
5388
5402
  exports.selectPeersMap = selectPeersMap;
5389
5403
  exports.selectPeersScreenSharing = selectPeersScreenSharing;
5390
5404
  exports.selectPeersWithAudioStatus = selectPeersWithAudioStatus;