@videosdk.live/react-sdk 0.1.88 → 0.1.89
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/index.js +57 -6
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +57 -7
- package/dist/index.modern.js.map +1 -1
- package/dist/types/index.d.ts +65 -0
- package/dist/types/meeting.d.ts +458 -435
- package/package.json +2 -2
package/dist/types/meeting.d.ts
CHANGED
|
@@ -1,467 +1,490 @@
|
|
|
1
1
|
export class Meeting {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @description
|
|
4
|
+
* This represents the meetingId
|
|
5
|
+
*/
|
|
6
|
+
id: string;
|
|
7
|
+
/**
|
|
8
|
+
* @description
|
|
9
|
+
* This represents the `participantId` of the active speaker in the meeting
|
|
10
|
+
*/
|
|
11
|
+
activeSpeakerId?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @description
|
|
14
|
+
* This represents the `participantId` of the active presenter in the meeting
|
|
15
|
+
*/
|
|
16
|
+
activePresenterId?: string;
|
|
17
|
+
/**
|
|
18
|
+
* @description
|
|
19
|
+
* This represents the `participantId` of the main participant in the meeting
|
|
20
|
+
*/
|
|
21
|
+
mainParticipantId: string;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated
|
|
24
|
+
*/
|
|
25
|
+
connections: Map<string, Connection>;
|
|
26
|
+
/**
|
|
27
|
+
* @description
|
|
28
|
+
* These represents the `Participant` object for the local participant
|
|
29
|
+
*/
|
|
30
|
+
localParticipant: Participant;
|
|
31
|
+
/**
|
|
32
|
+
* @description
|
|
33
|
+
* These represents the Map of all the Participant objects except local participant
|
|
34
|
+
*/
|
|
35
|
+
participants: Map<string, Participant>;
|
|
36
|
+
/**
|
|
37
|
+
* @description These represents the current state of the meeting Livestream
|
|
38
|
+
*/
|
|
39
|
+
livestreamState:
|
|
40
|
+
| 'LIVESTREAM_STOPPED'
|
|
41
|
+
| 'LIVESTREAM_STARTING'
|
|
42
|
+
| 'LIVESTREAM_STARTED'
|
|
43
|
+
| 'LIVESTREAM_STOPPING';
|
|
44
|
+
/**
|
|
45
|
+
* @description These represents the current state of the meeting recording
|
|
46
|
+
*/
|
|
47
|
+
recordingState:
|
|
48
|
+
| 'RECORDING_STOPPED'
|
|
49
|
+
| 'RECORDING_STARTING'
|
|
50
|
+
| 'RECORDING_STARTED'
|
|
51
|
+
| 'RECORDING_STOPPING';
|
|
52
|
+
/**
|
|
53
|
+
* @description These represents the current state of the meeting HLS
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
hlsState: 'HLS_STOPPED' | 'HLS_STARTING' | 'HLS_STARTED' | 'HLS_STOPPING';
|
|
57
|
+
/**
|
|
58
|
+
* @description These object will provide the URLs to play the HLS streams
|
|
59
|
+
*/
|
|
60
|
+
hlsUrls: {
|
|
61
|
+
downstreamUrl?: string;
|
|
62
|
+
playbackHlsUrl?: string;
|
|
63
|
+
livestreamUrl?: string;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* @description These represents the current state of the meeting transcription
|
|
67
|
+
*/
|
|
68
|
+
transcriptionState:
|
|
69
|
+
| 'TRANSCRIPTION_STOPPED'
|
|
70
|
+
| 'TRANSCRIPTION_STARTING'
|
|
71
|
+
| 'TRANSCRIPTION_STARTED'
|
|
72
|
+
| 'TRANSCRIPTION_STOPPING';
|
|
68
73
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
/**
|
|
75
|
+
* @description These object will contain all the messages send using the `sendChatMessage` method
|
|
76
|
+
*/
|
|
77
|
+
messages: Array<{
|
|
78
|
+
message: string;
|
|
79
|
+
senderId: string;
|
|
80
|
+
senderName: string;
|
|
81
|
+
timestamp: Date;
|
|
82
|
+
topic: string;
|
|
83
|
+
payload: object;
|
|
84
|
+
}>;
|
|
73
85
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
86
|
+
/**
|
|
87
|
+
* @description These method is used to join the meeting
|
|
88
|
+
*/
|
|
89
|
+
join(): void;
|
|
78
90
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
91
|
+
/**
|
|
92
|
+
* @description These method is used to change the participant mode between CONFERENCE and VIEWER
|
|
93
|
+
*/
|
|
94
|
+
changeMode(mode: 'CONFERENCE' | 'VIEWER'): void;
|
|
83
95
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
96
|
+
/**
|
|
97
|
+
* @description These method is used to leave the meeting for local participant
|
|
98
|
+
*/
|
|
99
|
+
leave(): void;
|
|
88
100
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
respondEntry(participantId: string, decision: boolean): void;
|
|
94
|
-
/**
|
|
95
|
-
* @description returns all the pinned participants in the meeting
|
|
96
|
-
*/
|
|
97
|
-
get pinnedParticipants(): Map<string, Participant>;
|
|
101
|
+
/**
|
|
102
|
+
* @description These method is used to end the meeting for all participants
|
|
103
|
+
*/
|
|
104
|
+
end(): void;
|
|
98
105
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
106
|
+
/**
|
|
107
|
+
* @param participantId `participantId` for which entry is to be responed
|
|
108
|
+
* @param decision `true` if the participant is allowed to join the meeting else `false`
|
|
109
|
+
*/
|
|
110
|
+
respondEntry(participantId: string, decision: boolean): void;
|
|
111
|
+
/**
|
|
112
|
+
* @description returns all the pinned participants in the meeting
|
|
113
|
+
*/
|
|
114
|
+
get pinnedParticipants(): Map<string, Participant>;
|
|
103
115
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
*/
|
|
109
|
-
unmuteMic(customAudioTrack?: MediaStream): void;
|
|
116
|
+
/**
|
|
117
|
+
* @description Mute the mic of local participant and stop broadcasting audio
|
|
118
|
+
*/
|
|
119
|
+
muteMic(): void;
|
|
110
120
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
121
|
+
/**
|
|
122
|
+
* @param customAudioTrack You can pass your own custom audio track here.
|
|
123
|
+
* To learn more checkour this [reference](https://docs.videosdk.live/javascript/guide/video-and-audio-calling-api-sdk/features/custom-track/custom-audio-track)
|
|
124
|
+
* @description unmute the mic of local participant and start broadcasting audio
|
|
125
|
+
*/
|
|
126
|
+
unmuteMic(customAudioTrack?: MediaStream): void;
|
|
116
127
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
enableWebcam(customVideoTrack?: MediaStream): void;
|
|
123
|
-
/**
|
|
124
|
-
* @description This method is used to stop boradcasting the screenshare to other participants
|
|
125
|
-
*/
|
|
126
|
-
disableScreenShare(): void;
|
|
127
|
-
/**
|
|
128
|
-
* @param customScreenSharingTrack You can pass your own custom screen share track here.
|
|
129
|
-
* To learn more checkour this [reference](https://docs.videosdk.live/javascript/guide/video-and-audio-calling-api-sdk/features/custom-track/custom-screen-share-track)
|
|
130
|
-
* @description This method will start broadcasting participants screen share
|
|
131
|
-
*
|
|
132
|
-
*/
|
|
133
|
-
enableScreenShare(customScreenSharingTrack?: MediaStream): void;
|
|
128
|
+
/**
|
|
129
|
+
*
|
|
130
|
+
* @description This method is used to stop boradcasting the video to other participants
|
|
131
|
+
*/
|
|
132
|
+
disableWebcam(): void;
|
|
134
133
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
134
|
+
/**
|
|
135
|
+
* @param customVideoTrack You can pass your own custom video track here.
|
|
136
|
+
* To learn more checkour this [reference](https://docs.videosdk.live/javascript/guide/video-and-audio-calling-api-sdk/features/custom-track/custom-video-track)
|
|
137
|
+
* @description This method will turn on the webcam of local participant and start broadcasting video
|
|
138
|
+
*/
|
|
139
|
+
enableWebcam(customVideoTrack?: MediaStream): void;
|
|
140
|
+
/**
|
|
141
|
+
* @description This method is used to stop boradcasting the screenshare to other participants
|
|
142
|
+
*/
|
|
143
|
+
disableScreenShare(): void;
|
|
144
|
+
/**
|
|
145
|
+
* @param customScreenSharingTrack You can pass your own custom screen share track here.
|
|
146
|
+
* To learn more checkour this [reference](https://docs.videosdk.live/javascript/guide/video-and-audio-calling-api-sdk/features/custom-track/custom-screen-share-track)
|
|
147
|
+
* @description This method will start broadcasting participants screen share
|
|
148
|
+
*
|
|
149
|
+
*/
|
|
150
|
+
enableScreenShare(customScreenSharingTrack?: MediaStream): void;
|
|
140
151
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
*
|
|
147
|
-
* @param config Config can be used to configure the HLS stream
|
|
148
|
-
* @param config.layout.type These represents the layout which is to used in the HLS
|
|
149
|
-
* @param config.layout.priority These defines the priority of participants to be considered while composing HLS
|
|
150
|
-
* @param config.layout.gridSize These defines the maximum number of participants in the grid
|
|
151
|
-
* @param config.theme These defines the color theme of the HLS livestream
|
|
152
|
-
* @param config.mode These defines the mode of the HLS livestream as only audio or vidoe and audio both
|
|
153
|
-
* @param config.quality These defines the quality of the HLS livestream
|
|
154
|
-
*/
|
|
155
|
-
startRecording(
|
|
156
|
-
webhookUrl: string,
|
|
157
|
-
awsDirPath: string,
|
|
158
|
-
config: {
|
|
159
|
-
layout: {
|
|
160
|
-
type: 'GRID' | 'SPOTLIGHT' | 'SIDEBAR';
|
|
161
|
-
priority: 'SPEAKER' | 'PIN';
|
|
162
|
-
gridSize: number;
|
|
163
|
-
};
|
|
164
|
-
theme: 'DARK' | 'LIGHT' | 'DEFAULT';
|
|
165
|
-
mode: 'video-and-audio' | 'audio';
|
|
166
|
-
quality: 'low' | 'med' | 'high';
|
|
167
|
-
},
|
|
168
|
-
): void;
|
|
152
|
+
/**
|
|
153
|
+
* @deprecated
|
|
154
|
+
* @param text Message which is to be send to all participants in th meeting
|
|
155
|
+
*/
|
|
156
|
+
sendChatMessage(text: string): void;
|
|
169
157
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
158
|
+
/**
|
|
159
|
+
* @param webhookUrl
|
|
160
|
+
* Webhook URL which will be called by VideoSDK when the recording state gets changed
|
|
161
|
+
* @param awsDirPath?
|
|
162
|
+
* awsDirPath represents the Directory you want to store your recording if you have configured your own S3 storage
|
|
163
|
+
*
|
|
164
|
+
* @param config Config can be used to configure the HLS stream
|
|
165
|
+
* @param config.layout.type These represents the layout which is to used in the HLS
|
|
166
|
+
* @param config.layout.priority These defines the priority of participants to be considered while composing HLS
|
|
167
|
+
* @param config.layout.gridSize These defines the maximum number of participants in the grid
|
|
168
|
+
* @param config.theme These defines the color theme of the HLS livestream
|
|
169
|
+
* @param config.mode These defines the mode of the HLS livestream as only audio or vidoe and audio both
|
|
170
|
+
* @param config.quality These defines the quality of the HLS livestream
|
|
171
|
+
*/
|
|
172
|
+
startRecording(
|
|
173
|
+
webhookUrl: string,
|
|
174
|
+
awsDirPath: string,
|
|
175
|
+
config: {
|
|
176
|
+
layout: {
|
|
177
|
+
type: 'GRID' | 'SPOTLIGHT' | 'SIDEBAR';
|
|
178
|
+
priority: 'SPEAKER' | 'PIN';
|
|
179
|
+
gridSize: number;
|
|
180
|
+
};
|
|
181
|
+
theme: 'DARK' | 'LIGHT' | 'DEFAULT';
|
|
182
|
+
mode: 'video-and-audio' | 'audio';
|
|
183
|
+
quality: 'low' | 'med' | 'high';
|
|
184
|
+
}
|
|
185
|
+
): void;
|
|
174
186
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
* @param config.layout.type These represents the layout which is to used in the HLS
|
|
180
|
-
* @param config.layout.priority These defines the priority of participants to be considered while composing HLS
|
|
181
|
-
* @param config.layout.gridSize These defines the maximum number of participants in the grid
|
|
182
|
-
* @param config.theme These defines the color theme of the RTMP livestream
|
|
183
|
-
*/
|
|
184
|
-
startLivestream(
|
|
185
|
-
outputs: Array<{
|
|
186
|
-
url: string;
|
|
187
|
-
streamKey: string;
|
|
188
|
-
}>,
|
|
189
|
-
config?: {
|
|
190
|
-
layout: {
|
|
191
|
-
type: 'GRID' | 'SPOTLIGHT' | 'SIDEBAR';
|
|
192
|
-
priority: 'SPEAKER' | 'PIN';
|
|
193
|
-
gridSize: number;
|
|
194
|
-
};
|
|
195
|
-
theme: 'DARK' | 'LIGHT' | 'DEFAULT';
|
|
196
|
-
},
|
|
197
|
-
): void;
|
|
187
|
+
/**
|
|
188
|
+
* @description This method is used to stop the meeting recording
|
|
189
|
+
*/
|
|
190
|
+
stopRecording(): void;
|
|
198
191
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
192
|
+
/**
|
|
193
|
+
* These method is used to start the meeting RTMP to provided output
|
|
194
|
+
* @param outputs These defines the array of outputs to which the RTMP has to be broadcasted
|
|
195
|
+
* @param config Config can be used to configure the HLS stream
|
|
196
|
+
* @param config.layout.type These represents the layout which is to used in the HLS
|
|
197
|
+
* @param config.layout.priority These defines the priority of participants to be considered while composing HLS
|
|
198
|
+
* @param config.layout.gridSize These defines the maximum number of participants in the grid
|
|
199
|
+
* @param config.theme These defines the color theme of the RTMP livestream
|
|
200
|
+
*/
|
|
201
|
+
startLivestream(
|
|
202
|
+
outputs: Array<{
|
|
203
|
+
url: string;
|
|
204
|
+
streamKey: string;
|
|
205
|
+
}>,
|
|
206
|
+
config?: {
|
|
207
|
+
layout: {
|
|
208
|
+
type: 'GRID' | 'SPOTLIGHT' | 'SIDEBAR';
|
|
209
|
+
priority: 'SPEAKER' | 'PIN';
|
|
210
|
+
gridSize: number;
|
|
211
|
+
};
|
|
212
|
+
theme: 'DARK' | 'LIGHT' | 'DEFAULT';
|
|
213
|
+
}
|
|
214
|
+
): void;
|
|
203
215
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
* @param config.layout.priority These defines the priority of participants to be considered while composing HLS
|
|
209
|
-
* @param config.layout.gridSize These defines the maximum number of participants in the grid
|
|
210
|
-
* @param config.theme These defines the color theme of the HLS livestream
|
|
211
|
-
* @param config.mode These defines the mode of the HLS livestream as only audio or vidoe and audio both
|
|
212
|
-
* @param config.quality These defines the quality of the HLS livestream
|
|
213
|
-
*/
|
|
214
|
-
startHls(config?: {
|
|
215
|
-
layout: {
|
|
216
|
-
type: 'GRID' | 'SPOTLIGHT' | 'SIDEBAR';
|
|
217
|
-
priority: 'SPEAKER' | 'PIN';
|
|
218
|
-
gridSize: number;
|
|
219
|
-
};
|
|
220
|
-
theme: 'DARK' | 'LIGHT' | 'DEFAULT';
|
|
221
|
-
mode: 'video-and-audio' | 'audio';
|
|
222
|
-
quality: 'low' | 'med' | 'high';
|
|
223
|
-
}): Promise<void>;
|
|
216
|
+
/**
|
|
217
|
+
* @description This method is used to stop the meeting livestream
|
|
218
|
+
*/
|
|
219
|
+
stopLivestream(): void;
|
|
224
220
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
221
|
+
/**
|
|
222
|
+
* These method is used to start the meeting HLS
|
|
223
|
+
* @param config Config can be used to configure the HLS stream
|
|
224
|
+
* @param config.layout.type These represents the layout which is to used in the HLS
|
|
225
|
+
* @param config.layout.priority These defines the priority of participants to be considered while composing HLS
|
|
226
|
+
* @param config.layout.gridSize These defines the maximum number of participants in the grid
|
|
227
|
+
* @param config.theme These defines the color theme of the HLS livestream
|
|
228
|
+
* @param config.mode These defines the mode of the HLS livestream as only audio or vidoe and audio both
|
|
229
|
+
* @param config.quality These defines the quality of the HLS livestream
|
|
230
|
+
*/
|
|
231
|
+
startHls(config?: {
|
|
232
|
+
layout: {
|
|
233
|
+
type: 'GRID' | 'SPOTLIGHT' | 'SIDEBAR';
|
|
234
|
+
priority: 'SPEAKER' | 'PIN';
|
|
235
|
+
gridSize: number;
|
|
236
|
+
};
|
|
237
|
+
theme: 'DARK' | 'LIGHT' | 'DEFAULT';
|
|
238
|
+
mode: 'video-and-audio' | 'audio';
|
|
239
|
+
quality: 'low' | 'med' | 'high';
|
|
240
|
+
}): Promise<void>;
|
|
229
241
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
Array<{
|
|
235
|
-
deviceId: string;
|
|
236
|
-
label: string;
|
|
237
|
-
}>
|
|
238
|
-
>;
|
|
242
|
+
/**
|
|
243
|
+
* @description This method is used to stop the meeting HLS
|
|
244
|
+
*/
|
|
245
|
+
stopHls(): void;
|
|
239
246
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
>;
|
|
247
|
+
/**
|
|
248
|
+
* @description This method returns all the available mics
|
|
249
|
+
*/
|
|
250
|
+
getMics(): Promise<
|
|
251
|
+
Array<{
|
|
252
|
+
deviceId: string;
|
|
253
|
+
label: string;
|
|
254
|
+
}>
|
|
255
|
+
>;
|
|
250
256
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
+
/**
|
|
258
|
+
* @description This method returns all the available webcams
|
|
259
|
+
*/
|
|
260
|
+
getWebcams(): Promise<
|
|
261
|
+
Array<{
|
|
262
|
+
deviceId: string;
|
|
263
|
+
label: string;
|
|
264
|
+
facingMode: 'front' | 'environment';
|
|
265
|
+
}>
|
|
266
|
+
>;
|
|
257
267
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
268
|
+
/**
|
|
269
|
+
*
|
|
270
|
+
* @param object These can be the `deviceId` to which the mic input has to be changed or
|
|
271
|
+
* you can pass the audio stream to this method which will be used for the audio broadcast
|
|
272
|
+
*/
|
|
273
|
+
changeMic(object: string | MediaStream): void;
|
|
264
274
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
275
|
+
/**
|
|
276
|
+
*
|
|
277
|
+
* @param object These can be the `deviceId` to which the webcam input has to be changed or
|
|
278
|
+
* you can pass the video stream to this method which will be used for the video broadcast
|
|
279
|
+
*/
|
|
280
|
+
changeWebcam(object: string | MediaStream): void;
|
|
269
281
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
setWebcamQuality(quality: 'low' | 'med' | 'high'): void;
|
|
282
|
+
/**
|
|
283
|
+
* @param stream This method will be used to replace the provided stream with current webcam stream
|
|
284
|
+
*/
|
|
285
|
+
replaceWebcamStream(stream: MediaStream): void;
|
|
275
286
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
287
|
+
/**
|
|
288
|
+
*
|
|
289
|
+
* @param quality This method will be used set the webcam quality to be used.
|
|
290
|
+
*/
|
|
291
|
+
setWebcamQuality(quality: 'low' | 'med' | 'high'): void;
|
|
280
292
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
293
|
+
/**
|
|
294
|
+
* Used for internal purpose
|
|
295
|
+
*/
|
|
296
|
+
startWhiteboard(): void;
|
|
285
297
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
message: string;
|
|
338
|
-
senderId: string;
|
|
339
|
-
senderName: string;
|
|
340
|
-
timestamp: string;
|
|
341
|
-
topic: string;
|
|
342
|
-
payload: object;
|
|
343
|
-
}) => void,
|
|
344
|
-
) => Promise<
|
|
345
|
-
Array<{
|
|
346
|
-
id: string;
|
|
347
|
-
message: string;
|
|
348
|
-
senderId: string;
|
|
349
|
-
senderName: string;
|
|
350
|
-
timestamp: string;
|
|
351
|
-
topic: string;
|
|
352
|
-
payload: object;
|
|
353
|
-
}>
|
|
354
|
-
>;
|
|
355
|
-
/**
|
|
356
|
-
* Unsubscribe from messages on a topic
|
|
357
|
-
*
|
|
358
|
-
* @param topic Topic to which you want to stop getting message for
|
|
359
|
-
* @param callback Callback function which was passed which subscribing to the topic
|
|
360
|
-
*/
|
|
361
|
-
unsubscribe: (
|
|
362
|
-
topic: string,
|
|
363
|
-
callback: (message: {
|
|
364
|
-
id: string;
|
|
365
|
-
message: string;
|
|
366
|
-
senderId: string;
|
|
367
|
-
senderName: string;
|
|
368
|
-
timestamp: string;
|
|
369
|
-
topic: string;
|
|
370
|
-
payload: object;
|
|
371
|
-
}) => void,
|
|
372
|
-
) => Promise<void>;
|
|
373
|
-
};
|
|
374
|
-
/**
|
|
375
|
-
* @deprecated
|
|
376
|
-
* @param options
|
|
377
|
-
*/
|
|
378
|
-
connectTo({ meetingId, payload }: { meetingId: string; payload: string }): Promise<void>;
|
|
379
|
-
/**
|
|
380
|
-
* Add event listener
|
|
381
|
-
* @param eventType Event name to which you want to subscribe.
|
|
382
|
-
* @param listener Callback function which will be triggered when the event happens
|
|
298
|
+
/**
|
|
299
|
+
* Used for internal purpose
|
|
300
|
+
*/
|
|
301
|
+
stopWhiteboard(): void;
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* @deprecated
|
|
305
|
+
* @param options
|
|
306
|
+
*/
|
|
307
|
+
startVideo({ link }: { link: string }): void;
|
|
308
|
+
/**
|
|
309
|
+
* @deprecated
|
|
310
|
+
*/
|
|
311
|
+
stopVideo(): void;
|
|
312
|
+
/**
|
|
313
|
+
* @deprecated
|
|
314
|
+
*/
|
|
315
|
+
resumeVideo(): void;
|
|
316
|
+
refreshConnection(): void;
|
|
317
|
+
/**
|
|
318
|
+
* @deprecated
|
|
319
|
+
* @param options
|
|
320
|
+
*/
|
|
321
|
+
pauseVideo({ currentTime }: { currentTime: number }): void;
|
|
322
|
+
/**
|
|
323
|
+
* @deprecated
|
|
324
|
+
* @param options
|
|
325
|
+
*/
|
|
326
|
+
seekVideo({ currentTime }: { currentTime: number }): void;
|
|
327
|
+
pubSub: {
|
|
328
|
+
/**
|
|
329
|
+
* Publish message to a topic
|
|
330
|
+
*
|
|
331
|
+
* @param topic Topic to which the message will be published
|
|
332
|
+
* @param message This will be the actual message which has to be send
|
|
333
|
+
* @param options This will define other options like `persist` which will decide if the message has to be stored or not
|
|
334
|
+
*/
|
|
335
|
+
publish: (
|
|
336
|
+
topic: string,
|
|
337
|
+
message: string,
|
|
338
|
+
options: {
|
|
339
|
+
persist: boolean;
|
|
340
|
+
},
|
|
341
|
+
payload: object,
|
|
342
|
+
sendOnly: Array<String>
|
|
343
|
+
) => Promise<void>;
|
|
344
|
+
/**
|
|
345
|
+
* Subscribe to message on a topic
|
|
346
|
+
*
|
|
347
|
+
* @param topic Topic to which you want to subscribe
|
|
348
|
+
* @param callback Callback function which will be triggered when a new message is received
|
|
383
349
|
*/
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
| 'whiteboard-stopped'
|
|
407
|
-
| 'meeting-joined'
|
|
408
|
-
| 'meeting-left'
|
|
409
|
-
| 'video-state-changed'
|
|
410
|
-
| 'video-seeked'
|
|
411
|
-
| 'mic-requested'
|
|
412
|
-
| 'webcam-requested'
|
|
413
|
-
| 'pin-state-changed'
|
|
414
|
-
| 'connection-open'
|
|
415
|
-
| 'connection-close'
|
|
416
|
-
| 'meeting-state-changed'
|
|
417
|
-
| 'switch-meeting'
|
|
418
|
-
| 'error'
|
|
419
|
-
| 'chat-message',
|
|
420
|
-
listener: (data: any) => void,
|
|
421
|
-
): void;
|
|
350
|
+
subscribe: (
|
|
351
|
+
topic: string,
|
|
352
|
+
callback: (message: {
|
|
353
|
+
id: string;
|
|
354
|
+
message: string;
|
|
355
|
+
senderId: string;
|
|
356
|
+
senderName: string;
|
|
357
|
+
timestamp: string;
|
|
358
|
+
topic: string;
|
|
359
|
+
payload: object;
|
|
360
|
+
}) => void
|
|
361
|
+
) => Promise<
|
|
362
|
+
Array<{
|
|
363
|
+
id: string;
|
|
364
|
+
message: string;
|
|
365
|
+
senderId: string;
|
|
366
|
+
senderName: string;
|
|
367
|
+
timestamp: string;
|
|
368
|
+
topic: string;
|
|
369
|
+
payload: object;
|
|
370
|
+
}>
|
|
371
|
+
>;
|
|
422
372
|
/**
|
|
423
|
-
*
|
|
424
|
-
*
|
|
425
|
-
* @param
|
|
373
|
+
* Unsubscribe from messages on a topic
|
|
374
|
+
*
|
|
375
|
+
* @param topic Topic to which you want to stop getting message for
|
|
376
|
+
* @param callback Callback function which was passed which subscribing to the topic
|
|
426
377
|
*/
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
378
|
+
unsubscribe: (
|
|
379
|
+
topic: string,
|
|
380
|
+
callback: (message: {
|
|
381
|
+
id: string;
|
|
382
|
+
message: string;
|
|
383
|
+
senderId: string;
|
|
384
|
+
senderName: string;
|
|
385
|
+
timestamp: string;
|
|
386
|
+
topic: string;
|
|
387
|
+
payload: object;
|
|
388
|
+
}) => void
|
|
389
|
+
) => Promise<void>;
|
|
390
|
+
};
|
|
391
|
+
/**
|
|
392
|
+
* @deprecated
|
|
393
|
+
* @param options
|
|
394
|
+
*/
|
|
395
|
+
connectTo({
|
|
396
|
+
meetingId,
|
|
397
|
+
payload
|
|
398
|
+
}: {
|
|
399
|
+
meetingId: string;
|
|
400
|
+
payload: string;
|
|
401
|
+
}): Promise<void>;
|
|
402
|
+
/**
|
|
403
|
+
* Add event listener
|
|
404
|
+
* @param eventType Event name to which you want to subscribe.
|
|
405
|
+
* @param listener Callback function which will be triggered when the event happens
|
|
406
|
+
*/
|
|
407
|
+
on(
|
|
408
|
+
eventType:
|
|
409
|
+
| 'participant-joined'
|
|
410
|
+
| 'participant-left'
|
|
411
|
+
| 'participant-mode-change'
|
|
412
|
+
| 'speaker-changed'
|
|
413
|
+
| 'presenter-changed'
|
|
414
|
+
| 'main-participant-changed'
|
|
415
|
+
| 'entry-requested'
|
|
416
|
+
| 'entry-responded'
|
|
417
|
+
| 'recording-started'
|
|
418
|
+
| 'recording-stopped'
|
|
419
|
+
| 'recording-state-changed'
|
|
420
|
+
| 'livestream-started'
|
|
421
|
+
| 'livestream-stopped'
|
|
422
|
+
| 'livestream-state-changed'
|
|
423
|
+
| 'hls-started'
|
|
424
|
+
| 'hls-stopped'
|
|
425
|
+
| 'hls-state-changed'
|
|
426
|
+
| 'stream-enabled'
|
|
427
|
+
| 'stream-disabled'
|
|
428
|
+
| 'whiteboard-started'
|
|
429
|
+
| 'whiteboard-stopped'
|
|
430
|
+
| 'meeting-joined'
|
|
431
|
+
| 'meeting-left'
|
|
432
|
+
| 'video-state-changed'
|
|
433
|
+
| 'video-seeked'
|
|
434
|
+
| 'mic-requested'
|
|
435
|
+
| 'webcam-requested'
|
|
436
|
+
| 'pin-state-changed'
|
|
437
|
+
| 'connection-open'
|
|
438
|
+
| 'connection-close'
|
|
439
|
+
| 'meeting-state-changed'
|
|
440
|
+
| 'switch-meeting'
|
|
441
|
+
| 'error'
|
|
442
|
+
| 'chat-message',
|
|
443
|
+
listener: (data: any) => void
|
|
444
|
+
): void;
|
|
445
|
+
/**
|
|
446
|
+
* Remove event listener
|
|
447
|
+
* @param eventType Event name to which you want to unsubscribe.
|
|
448
|
+
* @param listener Callback function which was passed while subscribing to the event
|
|
449
|
+
*/
|
|
450
|
+
off(
|
|
451
|
+
eventType:
|
|
452
|
+
| 'participant-joined'
|
|
453
|
+
| 'participant-left'
|
|
454
|
+
| 'participant-mode-change'
|
|
455
|
+
| 'speaker-changed'
|
|
456
|
+
| 'presenter-changed'
|
|
457
|
+
| 'main-participant-changed'
|
|
458
|
+
| 'entry-requested'
|
|
459
|
+
| 'entry-responded'
|
|
460
|
+
| 'recording-started'
|
|
461
|
+
| 'recording-stopped'
|
|
462
|
+
| 'recording-state-changed'
|
|
463
|
+
| 'livestream-started'
|
|
464
|
+
| 'livestream-stopped'
|
|
465
|
+
| 'livestream-state-changed'
|
|
466
|
+
| 'hls-started'
|
|
467
|
+
| 'hls-stopped'
|
|
468
|
+
| 'hls-state-changed'
|
|
469
|
+
| 'stream-enabled'
|
|
470
|
+
| 'stream-disabled'
|
|
471
|
+
| 'whiteboard-started'
|
|
472
|
+
| 'whiteboard-stopped'
|
|
473
|
+
| 'meeting-joined'
|
|
474
|
+
| 'meeting-left'
|
|
475
|
+
| 'video-state-changed'
|
|
476
|
+
| 'video-seeked'
|
|
477
|
+
| 'mic-requested'
|
|
478
|
+
| 'webcam-requested'
|
|
479
|
+
| 'pin-state-changed'
|
|
480
|
+
| 'connection-open'
|
|
481
|
+
| 'connection-close'
|
|
482
|
+
| 'meeting-state-changed'
|
|
483
|
+
| 'switch-meeting'
|
|
484
|
+
| 'error'
|
|
485
|
+
| 'chat-message',
|
|
486
|
+
listener: (data: any) => void
|
|
487
|
+
): void;
|
|
465
488
|
}
|
|
466
489
|
|
|
467
490
|
import { Participant } from './participant';
|