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.
Make sure that your web application is using the HTTPS protocol. Most browsers limit audio and video activity on non-secured pages.
CDN
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.
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
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
Use the getInstance method to get an instance of the Voximplant client and the init method to initialize it.
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.
Connect and log in
You can use JavaScript try…catch statements to catch errors.
Refer to this code example to understand how it works:
Start implementing functionality
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
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.