Video.RoomSessionPlayback

Instances of this class allow you to control (e.g., pause, resume, stop) the playback inside a room session. You can obtain instances of this class by starting a playback from the desired RoomSession (see RoomSession.play)

Properties

endedAt

Optional endedAt: number

End time, if available


id

id: string

Unique id for this playback


roomSessionId

roomSessionId: string

Id of the room session associated to this playback


startedAt

startedAt: number

Start time, if available


state

state: "paused" | "completed" | "playing"

Current state of the playback


url

url: string

Url of the file reproduced by this playback


volume

volume: number

Audio volume at which the playback file is reproduced

Methods

pause

pause(): Promise<void>

Pauses the playback.

Returns

Promise<void>


resume

resume(): Promise<void>

Resumes the playback.

Returns

Promise<void>


setVolume

setVolume(volume): Promise<void>

Sets the audio volume for the playback.

Parameters

NameTypeDescription
volumenumber

The desired volume. Values range from -50 to 50, with a default of 0.

Returns

Promise<void>


stop

stop(): Promise<void>

Stops the playback.

Returns

Promise<void>