play
play
- play(
params):Promise<RoomSessionPlayback>- See RoomSessionPlayback documentation for more details.
Starts a playback in the room. You can use the returned RoomSessionPlayback object to control the playback (e.g., pause, resume, setVolume and stop).
Parameters
params
Object containing the parameters of the method.
url
The url (http, https, rtmp, rtmps) of the stream to reproduce.
volume
The audio volume at which to play the stream. Values range from -50 to 50, with a default of 0.
seekPosition
The starting timecode in milliseconds for playback. Defaults to 0.
positions
Positions to assign as soon as the playback starts. You can use the special keyword "self" to refer to the id of the playback.
layout
Layout to change to when the playback starts.
Returns
Promise<RoomSessionPlayback> - See RoomSessionPlayback documentation for more details.
Permissions
room.playback
You need to specify the permissions when creating the Video Room Token on the server side.