startStream

View as Markdown

startStream

  • startStream(): Promise<RoomSessionStream> - See RoomSessionStream for more details.

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

NameTypeDescription
paramsObject
params.urlstringRTMP or RTMPS url. This must be the address of a server accepting incoming RTMP/RTMPS streams.

Returns

Promise<RoomSessionStream> - See RoomSessionStream for more details.

Example

1const stream = await roomSession.startStream({ url: "rtmp://example.com" });
2
3// Stop the stream after 60 seconds
4setTimeout(() => stream.stop(), 60000);