For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
ReferenceGuidesClick-to-Call
ReferenceGuidesClick-to-Call
  • Core
    • Overview
  • SignalWire Client
    • Overview
    • Notifications
    • Client
    • Utility functions
  • Video
    • Overview
    • LocalOverlay
    • RoomSession
    • RoomSessionDevice
    • RoomSessionPlayback
    • RoomSessionRecording
    • RoomSessionScreenShare
    • RoomSessionStream
    • RoomDevice
    • RoomScreenShare
  • Chat
    • Overview
    • Client
    • ChatMember
    • ChatMemberEntity
    • ChatMessage
    • ChatMessageEntity
  • PubSub
    • Overview
    • Client
    • PubSubMessage
  • WebRTC
    • Overview
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Classes
  • Functions
  • createRoomObject
  • joinRoom
Video

Video

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

LocalOverlay

Next
Built with

The Video namespace contains the classes and functions that you need to create a video conferencing application.

The RoomSession class is the main interface for managing video room sessions.

Classes

RoomSession

The main interface for managing video room sessions

RoomSessionDevice

Control devices within a room session

RoomSessionPlayback

Manage media playback in a room session

RoomSessionRecording

Handle recording functionality

RoomSessionScreenShare

Manage screen sharing in a room session

RoomDevice

Use RoomSessionDevice instead.

RoomScreenShare

Use RoomSessionScreenShare instead.

Functions

Functions

createRoomObject

  • Const createRoomObject(roomOptions): Promise<Room>
Deprecated

Use RoomSession instead.

Using Video.createRoomObject() you can create a RoomObject to join a room.

Parameters

NameTypeDescription
applyLocalVideoOverlay?booleanWhether to apply the local-overlay on top of your video. Default: true.
audio?boolean | MediaTrackConstraintsAudio constraints to use when joining the room. Default: true.
autoJoin?booleanWhether to automatically join the room session.
iceServers?RTCIceServer[]List of ICE servers.
logLevel?"trace" | "debug" | "info" | "warn" | "error" | "silent"Logging level.
projectstringSignalWire project id, e.g. a10d8a9f-2166-4e82-56ff-118bc3a4840f.
rootElementId?stringId of the HTML element in which to display the video stream.
speakerId?stringId of the speaker device to use for audio output. If undefined, picks a default speaker.
stopCameraWhileMuted?booleanWhether to stop the camera when the member is muted. Default: true.
stopMicrophoneWhileMuted?booleanWhether to stop the microphone when the member is muted. Default: true.
tokenstringSignalWire project token, e.g. PT9e5660c101cd140a1c93a0197640a369cf5f16975a0079c9.
video?boolean | MediaTrackConstraintsVideo constraints to use when joining the room. Default: true.

Returns

Promise<Room>

Example

With an HTMLDivElement with id=“root” in the DOM.

1// <div id="root"></div>
2
3try {
4 const roomObj = await Video.createRoomObject({
5 token: "<YourJWT>",
6 rootElementId: "root"
7 });
8
9 roomObj.join();
10} catch (error) {
11 console.error("Error", error);
12}

joinRoom

  • Const joinRoom(roomOptions): Promise<Room>
Deprecated

Use RoomSession instead.

Using Video.joinRoom() you can automatically join a room.

Parameters

NameTypeDescription
applyLocalVideoOverlay?booleanWhether to apply the local-overlay on top of your video. Default: true.
audio?boolean | MediaTrackConstraintsAudio constraints to use when joining the room. Default: true.
autoJoin?booleanWhether to automatically join the room session.
iceServers?RTCIceServer[]List of ICE servers.
logLevel?"trace" | "debug" | "info" | "warn" | "error" | "silent"Logging level.
projectstringSignalWire project id, e.g. a10d8a9f-2166-4e82-56ff-118bc3a4840f.
rootElementId?stringId of the HTML element in which to display the video stream.
speakerId?stringId of the speaker device to use for audio output. If undefined, picks a default speaker.
stopCameraWhileMuted?booleanWhether to stop the camera when the member is muted. Default: true.
stopMicrophoneWhileMuted?booleanWhether to stop the microphone when the member is muted. Default: true.
tokenstringSignalWire project token, e.g. PT9e5660c101cd140a1c93a0197640a369cf5f16975a0079c9.
video?boolean | MediaTrackConstraintsVideo constraints to use when joining the room. Default: true.

Returns

Promise<Room>

Example

With an HTMLDivElement with id=“root” in the DOM.

1// <div id="root"></div>
2
3try {
4 const roomObj = await Video.joinRoom({
5 token: "<YourJWT>",
6 rootElementId: "root",
7 });
8
9 // You have joined the room..
10} catch (error) {
11 console.error("Error", error);
12}