Skip to content

Commit 9a7bbf6

Browse files
committed
Merge pull request #372 from andyet/docs
reorganize a couple doc'd methods, add underlying webrtc.js methods that…
2 parents 691a218 + cba01f3 commit 9a7bbf6

File tree

1 file changed

+41
-14
lines changed

1 file changed

+41
-14
lines changed

README.md

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -199,20 +199,6 @@ ending all peers, and stopping the local screen stream
199199

200200
### Methods
201201

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-
216202
`createRoom(name, callback)` - emits the `create` event on the connection with
217203
`name` and (if provided) invokes `callback` on response
218204

@@ -223,12 +209,53 @@ by the connection on the `join` event. See signalmaster for more details.
223209
`startLocalVideo()` - starts the local media with the `media` options provided
224210
in the config passed to the constructor
225211

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+
226249
`stopLocalVideo()` - stops all local media streams
227250

228251
`setVolumeForAll(volume)` - used to set the volume level for all peers
229252

230253
- `volume` - the volume level, between 0 and 1
231254

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+
232259
`handlePeerStreamAdded(peer)` - used internally to attach media stream to the
233260
DOM and perform other setup
234261

0 commit comments

Comments
 (0)