Using Video.createRoomObject() you can create a RoomObject to join a room.
RoomObject
Create a roomObject using the token.
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) }
Using Video.joinRoom() you can automatically join a room.
Join a room using the token.
// <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) }
Intro
Using Video.createRoomObject() you can create a
RoomObjectto join a room.Examples
Create a roomObject using the token.
With an HTMLDivElement with id="root" in the DOM.