DEV Community

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

Posted on

2

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

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (1)

Collapse
 
readiaz profile image
ReaDiaz

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

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more