> 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. # Video The Video namespace contains the classes and functions that you need to create a video conferencing application. The [RoomSession](/docs/browser-sdk/v3/js/reference/video/room-session) class is the main interface for managing video room sessions. ## Classes #### [RoomSession](/docs/browser-sdk/v3/js/reference/video/room-session) The main interface for managing video room sessions #### [RoomSessionDevice](/docs/browser-sdk/v3/js/reference/video/room-session-device) Control devices within a room session #### [RoomSessionPlayback](/docs/browser-sdk/v3/js/reference/video/room-session-playback) Manage media playback in a room session #### [RoomSessionRecording](/docs/browser-sdk/v3/js/reference/video/room-session-recording) Handle recording functionality #### [RoomSessionScreenShare](/docs/browser-sdk/v3/js/reference/video/room-session-screen-share) Manage screen sharing in a room session #### [\~\~RoomDevice\~\~](/docs/browser-sdk/v3/js/reference/video/room-session-device) *Use [RoomSessionDevice](/docs/browser-sdk/v3/js/reference/video/room-session-device) instead.* #### [\~\~RoomScreenShare\~\~](/docs/browser-sdk/v3/js/reference/video/room-session-screen-share) *Use [RoomSessionScreenShare](/docs/browser-sdk/v3/js/reference/video/room-session-screen-share) instead.* ## Functions #### \~\~Functions\~\~ ### ~~createRoomObject~~ * `Const` **createRoomObject**(`roomOptions`): `Promise` > **Deprecated** > > Use [RoomSession](/docs/browser-sdk/v3/js/reference/video/room-session) instead. Using Video.createRoomObject() you can create a `RoomObject` to join a room. #### Parameters | Name | Type | Description | | :-------------------------- | :------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------- | | `applyLocalVideoOverlay?` | `boolean` | Whether to apply the local-overlay on top of your video. Default: `true`. | | `audio?` | `boolean` \| `MediaTrackConstraints` | Audio constraints to use when joining the room. Default: `true`. | | `autoJoin?` | `boolean` | Whether to automatically join the room session. | | `iceServers?` | `RTCIceServer[]` | List of ICE servers. | | `logLevel?` | `"trace"` \| `"debug"` \| `"info"` \| `"warn"` \| `"error"` \| `"silent"` | Logging level. | | `project` | `string` | SignalWire project id, e.g. `a10d8a9f-2166-4e82-56ff-118bc3a4840f`. | | `rootElementId?` | `string` | Id of the HTML element in which to display the video stream. | | `speakerId?` | `string` | Id of the speaker device to use for audio output. If undefined, picks a default speaker. | | `stopCameraWhileMuted?` | `boolean` | Whether to stop the camera when the member is muted. Default: `true`. | | `stopMicrophoneWhileMuted?` | `boolean` | Whether to stop the microphone when the member is muted. Default: `true`. | | `token` | `string` | Video Room Token for the room to join, created with the [Create Room Token](/docs/apis/rest/video/room-tokens/create-room-token) endpoint. | | `video?` | `boolean` \| `MediaTrackConstraints` | Video constraints to use when joining the room. Default: `true`. | #### Returns `Promise` #### Example With an HTMLDivElement with id="root" in the DOM. ```js //
try { const roomObj = await Video.createRoomObject({ token: "", rootElementId: "root" }); roomObj.join(); } catch (error) { console.error("Error", error); } ``` --- ### ~~joinRoom~~ * `Const` **joinRoom**(`roomOptions`): `Promise` > **Deprecated** > > Use [RoomSession](/docs/browser-sdk/v3/js/reference/video/room-session) instead. Using Video.joinRoom() you can automatically join a room. #### Parameters | Name | Type | Description | | :-------------------------- | :------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------- | | `applyLocalVideoOverlay?` | `boolean` | Whether to apply the local-overlay on top of your video. Default: `true`. | | `audio?` | `boolean` \| `MediaTrackConstraints` | Audio constraints to use when joining the room. Default: `true`. | | `autoJoin?` | `boolean` | Whether to automatically join the room session. | | `iceServers?` | `RTCIceServer[]` | List of ICE servers. | | `logLevel?` | `"trace"` \| `"debug"` \| `"info"` \| `"warn"` \| `"error"` \| `"silent"` | Logging level. | | `project` | `string` | SignalWire project id, e.g. `a10d8a9f-2166-4e82-56ff-118bc3a4840f`. | | `rootElementId?` | `string` | Id of the HTML element in which to display the video stream. | | `speakerId?` | `string` | Id of the speaker device to use for audio output. If undefined, picks a default speaker. | | `stopCameraWhileMuted?` | `boolean` | Whether to stop the camera when the member is muted. Default: `true`. | | `stopMicrophoneWhileMuted?` | `boolean` | Whether to stop the microphone when the member is muted. Default: `true`. | | `token` | `string` | Video Room Token for the room to join, created with the [Create Room Token](/docs/apis/rest/video/room-tokens/create-room-token) endpoint. | | `video?` | `boolean` \| `MediaTrackConstraints` | Video constraints to use when joining the room. Default: `true`. | #### Returns `Promise` #### Example With an HTMLDivElement with id="root" in the DOM. ```js //
try { const roomObj = await Video.joinRoom({ token: "", rootElementId: "root", }); // You have joined the room.. } catch (error) { console.error("Error", error); } ```