> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # play > play method for the RoomSession class. ### 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 **`params`** `object` Object containing the parameters of the method. --- **`url`** `string` The url (http, https, rtmp, rtmps) of the stream to reproduce. --- **`volume`** `number` The audio volume at which to play the stream. Values range from -50 to 50, with a default of 0. --- **`seekPosition`** `number` The starting timecode in milliseconds for playback. Defaults to `0`. --- **`positions`** `VideoPositions` 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`** `string` 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/rest/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(); ``` > play method for the RoomSession class.