***
id: 94eaf980-f33e-4bab-abf8-b02da777a228
title: RoomSessionPlayback
position: 4
slug: /js/reference/video/room-session-playback
max-toc-depth: 3
----------------
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](/docs/browser-sdk/v3/js/reference/video/room-session) (see [RoomSession.play](/docs/browser-sdk/v3/js/reference/video/room-session/play)).
## Properties
End time, if available.
Unique id for this playback.
Current playback position, in milliseconds.
Id of the room session associated to this playback.
Whether the seek functions ([seek](#seek), [forward](#forward), [rewind](#rewind)) can be used for this playback
Start time, if available.
Current state of the playback.
Url of the file reproduced by this playback.
Audio volume at which the playback file is reproduced.
## Methods
### forward
▸ **forward**(`offset`): `Promise`
Seeks the current playback forward by the specified offset.
#### Parameters
Relative number of milliseconds to seek forward from the current position. Defaults to 5000 (5 seconds).
#### Returns
`Promise`
#### Permissions
* `room.playback.seek` or the more permissive `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.forward(5000); // 5 seconds
```
***
### pause
▸ **pause**(): `Promise`
Pauses the playback.
#### Returns
`Promise`
***
### resume
▸ **resume**(): `Promise`
Resumes the playback.
#### Returns
`Promise`
***
### rewind
▸ **rewind**(`offset`): `Promise`
Seeks the current playback backwards by the specified offset.
#### Parameters
Relative number of milliseconds to seek backwards from the current position. Defaults to 5000 (5 seconds).
#### Returns
`Promise`
#### Permissions
* `room.playback.seek` or the more permissive `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.rewind(5000); // 5 seconds
```
***
### seek
▸ **seek**(`timecode`): `Promise`
Seeks the current playback to the specified absolute position.
#### Parameters
The absolute position in milliseconds to seek to in the playback.
#### Returns
`Promise`
#### Permissions
* `room.playback.seek` or the more permissive `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.seek(30_000); // 30th second
```
***
### setVolume
▸ **setVolume**(`volume`): `Promise`
Sets the audio volume for the playback.
#### Parameters
The desired volume. Values range from -50 to 50, with a default of 0.
#### Returns
`Promise`
***
### stop
▸ **stop**(): `Promise`
Stops the playback.
#### Returns
`Promise`