DEV Community

Cover image for How to add video chat on your website using Arvia Web SDK
Arvia
Arvia

Posted on

How to add video chat on your website using Arvia Web SDK

Where To Use

  • You can create your own fully customizable video calling platform.
  • You can programmatically use all advanced Arvia features.
  • You can handle all of the meeting events and trigger actions accordingly.
  • An easy-to-use SDK for developers.

Getting started

In this guide, you will learn how to embed a video meeting on your web page using Arvia Web SDK.

Basic setup

The most straight-forward way to use the Web SDK is to include the required files from our CDN as seen in the code below.

  • arvia.chat.js No other framework or library is required.

script type="text/javascript" src="https://arvia.chat/js/arvia.chat.js" script

Then in the body section of your HTML, create a div element and set the id=”arvia.chat”

body
div id="arvia.chat" div
body

We will use this div element to create Arvia meeting UI. We will do this by initializing the Arvia Chat object

var arviaChat = new ArviaChat();
arviaChat.init("arvia.chat");

We will set the testUser value to true to bypass the domain verification for now. For more information about the verification please visit.

arviaChat.setTestUser(true);

Now, we need to set the room name in the SDK. Since we set the test user true, we will use a test room name in the format of test-room-x

arviaChat.setRoomName("test-room-1");

Now we are ready to connect the server.

arviaChat.connect();

That’s it! Now if we look at the complete code it will be more or less similar to this.

html

head
script type=“text/javascript”
src="https://arvia.chat/js/arvia.chat.js" script
head

body
div id="arvia.chat" div
script type="text/javascript"
var arviaChat = new ArviaChat();
arviaChat.init("arvia.chat");
arviaChat.setTestUser(true);
arviaChat.setRoomName("test-room-1");
arviaChat.connect();
script
body

html

Top comments (1)

Collapse
 
readiaz profile image
ReaDiaz

How do I integrate video call into my website? Lemon break up enchantment