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
• Optional
endedAt: Date
End time, if available
• id: string
Unique id for this playback
• roomSessionId: string
Id of the room session associated to this playback
• startedAt: Date
Start time, if available
• state: "paused"
| "completed"
| "playing"
Current state of the playback
• url: string
Url of the file reproduced by this playback
• volume: number
Audio volume at which the playback file is reproduced
Methods
▸ pause(): Promise
<void
>
Pauses the playback.
Returns
Promise
<void
>
▸ resume(): Promise
<void
>
Resumes the playback.
Returns
Promise
<void
>
▸ setVolume(volume
): Promise
<void
>
Sets the audio volume for the playback.
Parameters
Name | Type | Description |
---|---|---|
volume | number | The desired volume. Values range from -50 to 50, with a default of 0. |
Returns
Promise
<void
>
▸ stop(): Promise
<void
>
Stops the playback.
Returns
Promise
<void
>