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

Interfaces

Functions

createRoomObject

Const createRoomObject(roomOptions): Promise<Room>

️ Deprecated

Use RoomSession instead.

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

Parameters

NameType
roomOptionsCreateRoomObjectOptions

Returns

Promise<Room>

Example

With an HTMLDivElement with id="root" in the DOM.

// <div id="root"></div>

try {
  const roomObj = await Video.createRoomObject({
    token: '<YourJWT>',
    rootElementId: 'root',
  })

  roomObj.join()
} catch (error) {
  console.error('Error', error)
}

joinRoom

Const joinRoom(roomOptions): Promise<Room>

️ Deprecated

Use RoomSession instead.

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

Parameters

NameType
roomOptionsCreateRoomObjectOptions

Returns

Promise<Room>

Example

With an HTMLDivElement with id="root" in the DOM.

// <div id="root"></div>

try {
  const roomObj = await Video.joinRoom({
    token: '<YourJWT>',
    rootElementId: 'root',
  })

  // You have joined the room..
} catch (error) {
  console.error('Error', error)
}