@@ -199,20 +199,6 @@ ending all peers, and stopping the local screen stream
199
199
200
200
### Methods
201
201
202
- ` leaveRoom() ` - leaves the currently joined room and stops local screen share
203
-
204
- ` disconnect() ` - calls ` disconnect ` on the signaling connection and deletes it
205
-
206
- ` shareScreen(callback) ` - initiates screen capture request to browser, then
207
- adds the stream to the conference
208
-
209
- ` getLocalScreen() ` - returns the local screen stream
210
-
211
- ` stopScreenShare() ` - stops the screen share stream and removes it from the room
212
-
213
- ` testReadiness() ` - tests that the connection is ready and that (if media is
214
- enabled) streams have started
215
-
216
202
` createRoom(name, callback) ` - emits the ` create ` event on the connection with
217
203
` name ` and (if provided) invokes ` callback ` on response
218
204
@@ -223,12 +209,53 @@ by the connection on the `join` event. See signalmaster for more details.
223
209
` startLocalVideo() ` - starts the local media with the ` media ` options provided
224
210
in the config passed to the constructor
225
211
212
+ ` testReadiness() ` - tests that the connection is ready and that (if media is
213
+ enabled) streams have started
214
+
215
+ ` mute() ` - mutes the local audio stream for all peers (pauses sending audio)
216
+
217
+ ` unmute() ` - unmutes local audio stream for all peers (resumes sending audio)
218
+
219
+ ` pauseVideo() ` - pauses sending video to peers
220
+
221
+ ` resumeVideo() ` - resumes sending video to all peers
222
+
223
+ ` pause() ` - pauses sending audio and video to all peers
224
+
225
+ ` resume() ` - resumes sending audio and video to all peers
226
+
227
+ ` sendToAll(messageType, payload) ` - broadcasts a message to all peers in the
228
+ room via the signaling channel (websocket)
229
+
230
+ - ` string messageType ` - the key for the type of message being sent
231
+ - ` object payload ` - an arbitrary value or object to send to peers
232
+
233
+ ` sendDirectlyToAll(channelLabel, messageType, payload) ` - broadcasts a message
234
+ to all peers in the room via a dataChannel
235
+
236
+ - ` string channelLabel ` - the label for the dataChannel to send on
237
+ - ` string messageType ` - the key for the type of message being sent
238
+ - ` object payload ` - an arbitrary value or object to send to peers
239
+
240
+ ` getPeers(sessionId, type) ` - returns all peers by ` sessionId ` and/or ` type `
241
+
242
+ ` shareScreen(callback) ` - initiates screen capture request to browser, then
243
+ adds the stream to the conference
244
+
245
+ ` getLocalScreen() ` - returns the local screen stream
246
+
247
+ ` stopScreenShare() ` - stops the screen share stream and removes it from the room
248
+
226
249
` stopLocalVideo() ` - stops all local media streams
227
250
228
251
` setVolumeForAll(volume) ` - used to set the volume level for all peers
229
252
230
253
- ` volume ` - the volume level, between 0 and 1
231
254
255
+ ` leaveRoom() ` - leaves the currently joined room and stops local screen share
256
+
257
+ ` disconnect() ` - calls ` disconnect ` on the signaling connection and deletes it
258
+
232
259
` handlePeerStreamAdded(peer) ` - used internally to attach media stream to the
233
260
DOM and perform other setup
234
261
0 commit comments