*** id: 2b4320a5-9db0-4bef-834b-08f4d84fff15 title: play slug: /js/reference/video/room-session/play description: play method for the RoomSession class. max-toc-depth: 3 ---------------- ### play * **play**(`params`): `Promise` - See [RoomSessionPlayback documentation](/docs/browser-sdk/v3/js/reference/video/room-session-playback) for more details. Starts a playback in the room. You can use the returned [RoomSessionPlayback](/docs/browser-sdk/v3/js/reference/video/room-session-playback) object to control the playback (e.g., pause, resume, setVolume and stop). #### Parameters Object containing the parameters of the method. The url (http, https, rtmp, rtmps) of the stream to reproduce. The audio volume at which to play the stream. Values range from -50 to 50, with a default of 0. The starting timecode in milliseconds for playback. Defaults to `0`. 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 to change to when the playback starts. #### Returns `Promise` - See [RoomSessionPlayback documentation](/docs/browser-sdk/v3/js/reference/video/room-session-playback) for more details. #### Permissions * `room.playback` You need to specify the permissions when [creating the Video Room Token](/docs/apis/video/room-tokens/create-room-token) on the server side. #### Example ```javascript const playback = await roomSession.play({ url: "rtmp://example.com/foo" }); await playback.stop(); ```