Rate this page:

Web

You can add Voximplant functionality to your web application, based on JavaScript or any web frameworks (such as jQuery, Angular, Vue, React) via CDN or NPM.

HTTPS

Make sure that your web application is using the HTTPS protocol. Most browsers limit audio and video activity on non-secured pages.

CDN

Copy URL

The simplest way to add Voximplant libraries is to include the following script tag to your application's main HTML file:

<script type="text/javascript" src="https://unpkg.com/voximplant-websdk@VERSION"></script>

In the code above, replace the VERSION word with an exact version from the Web SDK changelog.

Using the latest version

We recommend specifying the exact SDK version when building both development and production applications. If you do not specify the version or use the @latest keyword instead, your application always loads the latest version, which can cause breaking changes and the application crash in case of a major SDK release. Find more information on unpkg.com.

NPM

Copy URL

If you are making an app via NPM, run the following command to install Voximplant libraries:

npm i voximplant-websdk --save


or

yarn add voximplant-websdk

Initialize the SDK

Copy URL

Use the getInstance method to get an instance of the Voximplant client and the init method to initialize it.

Connection node notice

When initializing and connecting the SDK to the Voximplant cloud, you need to specify the node to connect to. Your node is bound to your Voximplant account.

To find which node your account belongs to, log in to your control panel and see the Credentials for working with API, SDK, SIP section on the main dashboard.

Initialize Web SDK

Initialize Web SDK

Connect and log in

Copy URL

Use the connect method to connect to the Voximplant Cloud and the login method to log in to your account.

Catching errors

You can use JavaScript try…catch statements to catch errors.

Refer to this code example to understand how it works:

Connect to the Voximplant Cloud

Connect to the Voximplant Cloud

Start implementing functionality

Copy URL

Now you have your application and SDK set up and successfully connected to the Voximplant cloud. To start implementing desired functionality, such as calls, conferences, messages, and more, go to the Guides section of our documentation and pick the features you need.

Web SDK demos

Copy URL

Implement the desired functionality by following step-by-step Guides or download and test our latest Web SDK here:

  • Basic audio and video calls: Demonstrates how to use the Voximplant Web SDK to create audio and video calls with call transfer, DTMF, and many other features.

  • Click-to-call: Demonstrates how to use a click-to-call widget for your website that allows your customers to make a call over VoIP without leaving the website.

  • Call features: Demonstrates the full Web SDK demo list. Here you will find the information on how to automatically restore the current call, enable push notifications, and so on.

  • Video conference: Demonstrates the basic video conferencing functionality of Voximplant's Web SDK. Using it, you can make calls and conferences, send DTMF, make call transfers, share screens, etc.

  • Videoconf solution: Demonstrates how videoconf.voximplant.com works. Using it, you can create conferences, join existing conferences, use reactions, create chats, and do many more useful things.

  • Messaging: Demonstrates how to create your web and mobile messaging client based on the Voximplant SDKs.

  • Chat moderation: Demonstrates how to create a moderated chat so people cannot use certain words via the Voximplant instant messaging SDK.