@100mslive/hms-video-store 0.2.58 → 0.2.59

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,5 +1,5 @@
1
1
  import { HMSConfig, HMSSimulcastLayer, HMSAudioTrackSettings, HMSVideoTrackSettings, HMSLogLevel, HMSVideoPlugin, HMSAudioPlugin } from '@100mslive/hms-video';
2
- import { HMSMessageID, HMSPeerID, HMSRoleName, HMSTrackID, HMSTrackSource, IHMSPlaylistActions } from './schema';
2
+ import { HMSMessageID, HMSPeerID, HMSRoleName, HMSTrackID, HMSTrackSource, IHMSPlaylistActions, HMSChangeMultiTrackStateRequest } from './schema';
3
3
  import { HMSRoleChangeRequest } from './selectors';
4
4
  import { RTMPRecordingConfig } from './hmsSDKStore/sdkTypes';
5
5
  /**
@@ -192,6 +192,12 @@ export interface IHMSActions {
192
192
  */
193
193
  setRemoteTrackEnabled(forRemoteTrackID: HMSTrackID | HMSTrackID[], enabled: boolean): Promise<void>;
194
194
  /**
195
+ * Use this to mute/unmute multipe tracks by source, role or type
196
+ * @param {HMSChangeMultiTrackStateRequest} params
197
+ */
198
+ setRemoteTracksEnabled(params: HMSChangeMultiTrackStateRequest): Promise<void>;
199
+ /**
200
+ * Method to be called with some UI interaction after autoplay error is received
195
201
  * Most browsers have limitations where an audio can not be played if there was no user interaction.
196
202
  * SDK throws an autoplay error in this case, this method can be called after an UI interaction
197
203
  * to resolve the autoplay error
@@ -1,7 +1,7 @@
1
1
  import { IHMSNotifications } from '../IHMSNotifications';
2
2
  import { IHMSStore } from '../IHMSStore';
3
3
  import * as sdkTypes from './sdkTypes';
4
- import { HMSNotification, HMSPeer, HMSException, HMSMessage, HMSChangeTrackStateRequest, HMSLeaveRoomRequest, HMSDeviceChangeEvent } from '../schema';
4
+ import { HMSNotification, HMSPeer, HMSException, HMSMessage, HMSChangeTrackStateRequest, HMSChangeMultiTrackStateRequest, HMSLeaveRoomRequest, HMSDeviceChangeEvent } from '../schema';
5
5
  export declare class HMSNotifications implements IHMSNotifications {
6
6
  private id;
7
7
  private eventEmitter;
@@ -17,6 +17,7 @@ export declare class HMSNotifications implements IHMSNotifications {
17
17
  sendReconnecting(error: HMSException): void;
18
18
  sendReconnected(): void;
19
19
  sendChangeTrackStateRequest(request: HMSChangeTrackStateRequest): void;
20
+ sendChangeMultiTrackStateRequest(request: HMSChangeMultiTrackStateRequest): void;
20
21
  private emitEvent;
21
22
  private createNotification;
22
23
  }
@@ -1,8 +1,8 @@
1
- import { HMSMessage, HMSTrackID, HMSTrackSource, IHMSPlaylistActions } from '../schema';
1
+ import { HMSMessage, HMSTrackID, HMSTrackSource, HMSChangeMultiTrackStateParams, IHMSPlaylistActions } from '../schema';
2
2
  import { IHMSActions } from '../IHMSActions';
3
3
  import * as sdkTypes from './sdkTypes';
4
4
  import { HMSRoleChangeRequest } from '../selectors';
5
- import { HMSAudioPlugin, HMSChangeTrackStateRequest as SDKHMSChangeTrackStateRequest, HMSException as SDKHMSException, HMSLogLevel, HMSSdk, HMSSimulcastLayer, HMSTrack as SDKHMSTrack, HMSVideoPlugin } from '@100mslive/hms-video';
5
+ import { HMSAudioPlugin, HMSException as SDKHMSException, HMSLogLevel, HMSChangeTrackStateRequest as SDKHMSChangeTrackStateRequest, HMSChangeMultiTrackStateRequest as SDKHMSChangeMultiTrackStateRequest, HMSSdk, HMSSimulcastLayer, HMSTrack as SDKHMSTrack, HMSVideoPlugin } from '@100mslive/hms-video';
6
6
  import { IHMSStore } from '../IHMSStore';
7
7
  import { HMSNotifications } from './HMSNotifications';
8
8
  /**
@@ -75,6 +75,7 @@ export declare class HMSSDKActions implements IHMSActions {
75
75
  startRTMPOrRecording(params: sdkTypes.RTMPRecordingConfig): Promise<void>;
76
76
  stopRTMPAndRecording(): Promise<void>;
77
77
  setRemoteTrackEnabled(trackID: HMSTrackID | HMSTrackID[], enabled: boolean): Promise<void>;
78
+ setRemoteTracksEnabled(params: HMSChangeMultiTrackStateParams): Promise<void>;
78
79
  setLogLevel(level: HMSLogLevel): void;
79
80
  private resetState;
80
81
  private sdkJoinWithListeners;
@@ -106,6 +107,7 @@ export declare class HMSSDKActions implements IHMSActions {
106
107
  protected onHMSMessage(hmsMessage: HMSMessage): void;
107
108
  protected onAudioLevelUpdate(sdkSpeakers: sdkTypes.HMSSpeaker[]): void;
108
109
  protected onChangeTrackStateRequest(request: SDKHMSChangeTrackStateRequest): void;
110
+ protected onChangeMultiTrackStateRequest(request: SDKHMSChangeMultiTrackStateRequest): void;
109
111
  protected onReconnected(): void;
110
112
  protected onReconnecting(sdkError: SDKHMSException): void;
111
113
  protected onError(sdkException: SDKHMSException): void;
@@ -27,6 +27,7 @@ export declare enum HMSNotificationTypes {
27
27
  ROLE_CHANGE_REQUEST = "ROLE_CHANGE_REQUEST",
28
28
  ROLE_UPDATED = "ROLE_UPDATED",
29
29
  CHANGE_TRACK_STATE_REQUEST = "CHANGE_TRACK_STATE_REQUEST",
30
+ CHANGE_MULTI_TRACK_STATE_REQUEST = "CHANGE_MULTI_TRACK_STATE_REQUEST",
30
31
  ROOM_ENDED = "ROOM_ENDED",
31
32
  REMOVED_FROM_ROOM = "REMOVED_FROM_ROOM",
32
33
  DEVICE_CHANGE_UPDATE = "DEVICE_CHANGE_UPDATE"
@@ -1,3 +1,4 @@
1
+ import { HMSTrackSource } from '.';
1
2
  import { HMSPeer, HMSPeerID, HMSTrack } from './peer';
2
3
  import { HMSRoleName } from './role';
3
4
  export interface HMSRoleChangeStoreRequest {
@@ -10,6 +11,19 @@ export interface HMSChangeTrackStateRequest {
10
11
  track: HMSTrack;
11
12
  enabled: boolean;
12
13
  }
14
+ export interface HMSChangeMultiTrackStateRequest {
15
+ requestedBy: HMSPeer;
16
+ tracks: HMSTrack[];
17
+ enabled: boolean;
18
+ type?: 'audio' | 'video';
19
+ source?: HMSTrackSource;
20
+ }
21
+ export interface HMSChangeMultiTrackStateParams {
22
+ enabled: boolean;
23
+ roles?: HMSRoleName[];
24
+ type?: 'audio' | 'video';
25
+ source?: HMSTrackSource;
26
+ }
13
27
  export interface HMSLeaveRoomRequest {
14
28
  requestedBy: HMSPeer;
15
29
  reason: string;