RoomSessionStream

View as Markdown

Represents a specific stream of a room session. This is an RTMP stream of the audio/video content of the room, which will be sent to an external party (e.g., to YouTube).

You can start a stream with RoomSession.startStream.

Properties

duration
number

Total seconds of time spent streaming, if available. This is equal to (endedAt - startedAt).

endedAt
Date

End time, if available.

id
stringRequired

The unique id of this stream.

roomSessionId
stringRequired

The id of the room session associated to this stream.

startedAt
DateRequired

Start time, if available.

state
"streaming" | "completed"Required

Current state of the stream.

url
stringRequired

The RTMP URL of the stream.

Methods

stop

  • stop(): Promise<void>

Stops the stream.

Returns

Promise<void>

Example

1await stream.stop();