@100mslive/hms-video-store 0.2.56 → 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.
- package/dist/core/IHMSActions.d.ts +26 -17
- package/dist/core/hmsSDKStore/HMSNotifications.d.ts +2 -1
- package/dist/core/hmsSDKStore/HMSSDKActions.d.ts +4 -2
- package/dist/core/hmsSDKStore/adapter.d.ts +2 -11
- package/dist/core/index.d.ts +1 -1
- package/dist/core/schema/index.d.ts +0 -1
- package/dist/core/schema/notification.d.ts +1 -0
- package/dist/core/schema/requests.d.ts +14 -0
- package/dist/core/schema/room.d.ts +3 -11
- package/dist/core/selectors/selectors.d.ts +2 -20
- package/dist/hms-video-store.cjs.development.js +171 -94
- package/dist/hms-video-store.cjs.development.js.map +1 -1
- package/dist/hms-video-store.cjs.production.min.js +1 -1
- package/dist/hms-video-store.cjs.production.min.js.map +1 -1
- package/dist/hms-video-store.esm.js +171 -94
- package/dist/hms-video-store.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/core/IHMSActions.ts +38 -17
- package/src/core/hmsSDKStore/HMSNotifications.ts +11 -0
- package/src/core/hmsSDKStore/HMSSDKActions.ts +50 -1
- package/src/core/hmsSDKStore/adapter.ts +2 -2
- package/src/core/index.ts +2 -0
- package/src/core/schema/index.ts +0 -1
- package/src/core/schema/notification.ts +1 -0
- package/src/core/schema/requests.ts +16 -0
- package/src/core/schema/room.ts +3 -11
- package/src/core/selectors/selectors.ts +0 -1
- package/dist/core/schema/ui.d.ts +0 -11
- package/src/core/schema/ui.ts +0 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HMSConfig, HMSSimulcastLayer, HMSAudioTrackSettings, HMSVideoTrackSettings, HMSLogLevel, HMSVideoPlugin, HMSAudioPlugin } from '@100mslive/hms-video';
|
|
2
|
-
import { HMSPeerID, HMSRoleName, 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
|
/**
|
|
@@ -55,7 +55,7 @@ export interface IHMSActions {
|
|
|
55
55
|
* This method removes the track from the local peer's list of auxiliary tracks and unpublishes it.
|
|
56
56
|
* @param trackId string - ID of the track to be removed
|
|
57
57
|
*/
|
|
58
|
-
removeTrack(trackId:
|
|
58
|
+
removeTrack(trackId: HMSTrackID): Promise<void>;
|
|
59
59
|
/**
|
|
60
60
|
* @deprecated The method should not be used
|
|
61
61
|
* @see sendBroadcastMessage
|
|
@@ -93,21 +93,22 @@ export interface IHMSActions {
|
|
|
93
93
|
* @param readStatus boolean value which you want to set as read flag for message/messages.
|
|
94
94
|
* @param messageId message id whose read falg you want to set.
|
|
95
95
|
*/
|
|
96
|
-
setMessageRead(readStatus: boolean, messageId?:
|
|
96
|
+
setMessageRead(readStatus: boolean, messageId?: HMSMessageID): void;
|
|
97
97
|
/**
|
|
98
|
-
*
|
|
99
|
-
* @param enabled boolean
|
|
98
|
+
* This function can be used to enable/disable(unmute/mute) local audio track
|
|
99
|
+
* @param enabled boolean - true to unmute, false to mute
|
|
100
100
|
*/
|
|
101
101
|
setLocalAudioEnabled(enabled: boolean): Promise<void>;
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
103
|
+
* This function can be used to enable/disable(unmute/mute) local video track
|
|
104
|
+
* @param enabled boolean - true to unmute, false to mute
|
|
104
105
|
*/
|
|
105
106
|
setLocalVideoEnabled(enabled: boolean): Promise<void>;
|
|
106
107
|
/**
|
|
107
108
|
* @param trackId string - ID of the track whose mute status needs to be set
|
|
108
109
|
* @param enabled boolean - true when we want to unmute the track and false when we want to unmute it
|
|
109
110
|
*/
|
|
110
|
-
setEnabledTrack(trackId:
|
|
111
|
+
setEnabledTrack(trackId: HMSTrackID, enabled: boolean): Promise<void>;
|
|
111
112
|
/**
|
|
112
113
|
* Change settings of the local peer's audio track
|
|
113
114
|
* @param settings HMSAudioTrackSettings
|
|
@@ -121,25 +122,25 @@ export interface IHMSActions {
|
|
|
121
122
|
*/
|
|
122
123
|
setVideoSettings(settings: Partial<HMSVideoTrackSettings>): Promise<void>;
|
|
123
124
|
/**
|
|
124
|
-
*
|
|
125
|
+
* You can use the attach and detach video function
|
|
125
126
|
* to add/remove video from an element for a track ID. The benefit of using this
|
|
126
127
|
* instead of removing the video yourself is that it'll also auto unsubscribe to
|
|
127
128
|
* the stream coming from server saving significant bandwidth for the user.
|
|
128
|
-
* @param
|
|
129
|
+
* @param localTrackID trackID as stored in the store for the peer
|
|
129
130
|
* @param videoElement HTML native element where the video has to be shown
|
|
130
131
|
*/
|
|
131
|
-
attachVideo(
|
|
132
|
+
attachVideo(localTrackID: HMSTrackID, videoElement: HTMLVideoElement): Promise<void>;
|
|
132
133
|
/**
|
|
133
134
|
* @see attachVideo
|
|
134
135
|
*/
|
|
135
|
-
detachVideo(
|
|
136
|
+
detachVideo(localTrackID: HMSTrackID, videoElement: HTMLVideoElement): Promise<void>;
|
|
136
137
|
/**
|
|
137
138
|
* Set the output volume of audio tracks(overall/particular audio track)
|
|
138
139
|
* @param value number between 0-100
|
|
139
140
|
* @param trackId string If undefined sets the overall volume(of every audio track in the room); If valid - set the volume of particular audio track
|
|
140
141
|
*
|
|
141
142
|
*/
|
|
142
|
-
setVolume(value: number, trackId?:
|
|
143
|
+
setVolume(value: number, trackId?: HMSTrackID): void;
|
|
143
144
|
/**
|
|
144
145
|
* Set the audio output(speaker) device
|
|
145
146
|
* @param deviceId string deviceId of the audio output device
|
|
@@ -150,7 +151,7 @@ export interface IHMSActions {
|
|
|
150
151
|
* @param trackId
|
|
151
152
|
* @param layer
|
|
152
153
|
*/
|
|
153
|
-
setPreferredLayer(trackId:
|
|
154
|
+
setPreferredLayer(trackId: HMSTrackID, layer: HMSSimulcastLayer): void;
|
|
154
155
|
/**
|
|
155
156
|
* Add or remove a video plugin from/to the local peer video track. Eg. Virtual Background, Face Filters etc.
|
|
156
157
|
* Video plugins can be added/removed at any time after the join is successful.
|
|
@@ -172,7 +173,7 @@ export interface IHMSActions {
|
|
|
172
173
|
* @param toRole The name of the new role.
|
|
173
174
|
* @param [force] this being true would mean that user won't get a request to accept role change
|
|
174
175
|
*/
|
|
175
|
-
changeRole(forPeerId:
|
|
176
|
+
changeRole(forPeerId: HMSPeerID, toRole: HMSRoleName, force?: boolean): Promise<void>;
|
|
176
177
|
/**
|
|
177
178
|
* Accept the role change request received
|
|
178
179
|
* @param {HMSRoleChangeRequest} request The original request that was received
|
|
@@ -189,9 +190,17 @@ export interface IHMSActions {
|
|
|
189
190
|
* @param forRemoteTrackID The track ID or array of track IDs for which you want to change the state
|
|
190
191
|
* @param enabled `true` if you wish to enable(unmute permission is required) the track, `false` if you wish to disable(mute permission is required) the track
|
|
191
192
|
*/
|
|
192
|
-
setRemoteTrackEnabled(forRemoteTrackID:
|
|
193
|
+
setRemoteTrackEnabled(forRemoteTrackID: HMSTrackID | HMSTrackID[], enabled: boolean): Promise<void>;
|
|
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>;
|
|
193
199
|
/**
|
|
194
200
|
* Method to be called with some UI interaction after autoplay error is received
|
|
201
|
+
* Most browsers have limitations where an audio can not be played if there was no user interaction.
|
|
202
|
+
* SDK throws an autoplay error in this case, this method can be called after an UI interaction
|
|
203
|
+
* to resolve the autoplay error
|
|
195
204
|
*/
|
|
196
205
|
unblockAudio: () => Promise<void>;
|
|
197
206
|
/**
|
|
@@ -201,12 +210,12 @@ export interface IHMSActions {
|
|
|
201
210
|
endRoom: (lock: boolean, reason: string) => Promise<void>;
|
|
202
211
|
/**
|
|
203
212
|
* If you have **removeOthers** permission, you can remove a peer from the room.
|
|
204
|
-
* @param peerID peerID of the peer to be removed from the
|
|
213
|
+
* @param peerID peerID of the peer to be removed from the room
|
|
205
214
|
* @param reason a string explaining why the peer is removed from the room.
|
|
206
215
|
* This string could be used to notify the user before they're removed from the room
|
|
207
216
|
* using the `REMOVED_FROM_ROOM` type of notification
|
|
208
217
|
*/
|
|
209
|
-
removePeer(peerID:
|
|
218
|
+
removePeer(peerID: HMSPeerID, reason: string): Promise<void>;
|
|
210
219
|
/**
|
|
211
220
|
* If you want to start RTMP streaming or recording.
|
|
212
221
|
* @param params.meetingURL This is the meeting url which is opened in a headless chrome instance for streaming and recording.
|
|
@@ -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,
|
|
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;
|
|
@@ -39,16 +39,7 @@ export declare class SDKToHMS {
|
|
|
39
39
|
};
|
|
40
40
|
private static getConvertedPlaylistType;
|
|
41
41
|
static convertRecordingRTMPState(recording: sdkTypes.HMSRecording | undefined, rtmp: sdkTypes.HMSRTMP | undefined): {
|
|
42
|
-
recording:
|
|
43
|
-
|
|
44
|
-
running: boolean;
|
|
45
|
-
};
|
|
46
|
-
server: {
|
|
47
|
-
running: boolean;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
rtmp: {
|
|
51
|
-
running: boolean;
|
|
52
|
-
};
|
|
42
|
+
recording: sdkTypes.HMSRecording;
|
|
43
|
+
rtmp: sdkTypes.HMSRTMP;
|
|
53
44
|
};
|
|
54
45
|
}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -4,4 +4,4 @@ export { IHMSNotifications as HMSNotifications } from './IHMSNotifications';
|
|
|
4
4
|
export { HMSReactiveStore } from './hmsSDKStore/HMSReactiveStore';
|
|
5
5
|
export * from './schema';
|
|
6
6
|
export * from './selectors';
|
|
7
|
-
export { HMSConfig, HMSAudioTrackSettings, HMSVideoTrackSettings, HMSSimulcastLayer, SimulcastLayerDefinition, DeviceMap, HMSLogLevel, RTMPRecordingConfig, } from './hmsSDKStore/sdkTypes';
|
|
7
|
+
export { HMSConfig, HMSAudioTrackSettings, HMSVideoTrackSettings, HMSSimulcastLayer, SimulcastLayerDefinition, DeviceMap, HMSLogLevel, RTMPRecordingConfig, HMSRecording, HMSRTMP, } from './hmsSDKStore/sdkTypes';
|
|
@@ -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;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HMSPeerID } from './peer';
|
|
2
|
+
import { HMSRecording, HMSRTMP } from '@100mslive/hms-video';
|
|
2
3
|
export declare type HMSRoomID = string;
|
|
3
4
|
export declare enum HMSRoomState {
|
|
4
5
|
Disconnected = "Disconnected",
|
|
@@ -17,15 +18,6 @@ export interface HMSRoom {
|
|
|
17
18
|
shareableLink: string;
|
|
18
19
|
hasWaitingRoom: boolean;
|
|
19
20
|
roomState: HMSRoomState;
|
|
20
|
-
recording:
|
|
21
|
-
|
|
22
|
-
running: boolean;
|
|
23
|
-
};
|
|
24
|
-
server: {
|
|
25
|
-
running: boolean;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
rtmp: {
|
|
29
|
-
running: boolean;
|
|
30
|
-
};
|
|
21
|
+
recording: HMSRecording;
|
|
22
|
+
rtmp: HMSRTMP;
|
|
31
23
|
}
|
|
@@ -179,23 +179,5 @@ export declare const selectPermissions: import("reselect").OutputSelector<HMSSto
|
|
|
179
179
|
mute: boolean;
|
|
180
180
|
changeRole: boolean;
|
|
181
181
|
} | undefined>;
|
|
182
|
-
export declare const selectRecordingState: import("reselect").OutputSelector<HMSStore,
|
|
183
|
-
|
|
184
|
-
running: boolean;
|
|
185
|
-
};
|
|
186
|
-
server: {
|
|
187
|
-
running: boolean;
|
|
188
|
-
};
|
|
189
|
-
}, (res: HMSRoom) => {
|
|
190
|
-
browser: {
|
|
191
|
-
running: boolean;
|
|
192
|
-
};
|
|
193
|
-
server: {
|
|
194
|
-
running: boolean;
|
|
195
|
-
};
|
|
196
|
-
}>;
|
|
197
|
-
export declare const selectRTMPState: import("reselect").OutputSelector<HMSStore, {
|
|
198
|
-
running: boolean;
|
|
199
|
-
}, (res: HMSRoom) => {
|
|
200
|
-
running: boolean;
|
|
201
|
-
}>;
|
|
182
|
+
export declare const selectRecordingState: import("reselect").OutputSelector<HMSStore, import("@100mslive/hms-video/dist/interfaces/room").HMSRecording, (res: HMSRoom) => import("@100mslive/hms-video/dist/interfaces/room").HMSRecording>;
|
|
183
|
+
export declare const selectRTMPState: import("reselect").OutputSelector<HMSStore, import("@100mslive/hms-video/dist/interfaces/room").HMSRTMP, (res: HMSRoom) => import("@100mslive/hms-video/dist/interfaces/room").HMSRTMP>;
|