Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Video

Index

Type aliases

RoomObject

RoomObject: StrictEventEmitter<Room, RoomObjectEvents>

Functions

Const createRoomObject

  • Intro

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

    Examples

    Create a roomObject using the token.

    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)
    }
    

    Parameters

    Returns Promise<RoomObject>

Const joinRoom

  • Intro

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

    Examples

    Join a room using the token.

    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)
    }
    

    Parameters

    Returns Promise<RoomObject>