startStream
startStream
- startStream():
Promise<RoomSessionStream>
Starts streaming the audio/video of this room to an external service. You can
use the returned RoomSessionStream object to
interact with the stream.
Parameters
params
Object containing the parameters of the method.
url
RTMP or RTMPS url. This must be the address of a server accepting incoming RTMP/RTMPS streams.
listen
Object of event listeners. See RoomSessionStream Events for a list of valid events.
Returns
Promise<RoomSessionStream>
A promise that resolves to a RoomSessionStream object.
Example
In this example, we wait for a room to start and then start a stream in that room.
We then stop the stream after 10 seconds. This example assumes that there is a RoomSession
already active and that members are joining the room.