In this tutorial, I will show you how to integrate the PubNub Web SDK to add text-based chat to a web app that uses the Agora Web SDK. Digital communication is ubiquitous in society, and more teams are looking to add voice, video, and text chat features to their products. Agora ...
Digital communication is ubiquitous in society, and more teams are looking to add voice, video, and text chat features to their products. Agora and PubNub offer tools that enable teams to quickly and easily build real-time applications that utilize voice, video, and text chat features to connect their users in more meaningful ways.
In this tutorial, I will show you how to integrate the PubNub Web SDK to add text-based chat to a web app that uses the Agora Web SDK for voice and video communication.
For the TL;DR crowd check out the [live demo_](https://digitallysavvy.github.io/agora-video-with-pubnub-chat/)._
*Agora and PubNub accounts are required.
To start, let’s use the code from my tutorial “Building a group video chat web app” as our base project. This project has all the features for basic video chat: toggles for camera and mic, and buttons to join and leave the call.
The build phase of this tutorial covers modifying the input form to add inputs for the PubNub keys, adding the chat UI, integrating a PubNub client, connecting the PubNub client to a channel, and using the client to send and receive messages in the channel.
In the “Building a group video chat web app” tutorial, I hard-coded the App ID, channel name, token, and UID values in the
agora-interface.js file. But in the base project I have since updated the code to include an input form to enter the App ID, token, and channel name.
This project uses the existing modal form and adds new inputs to the join modal for the PubNub keys. Open
index.html and update the
modalForm to include text input for the PubNub publish and subscribe keys.
With the rapid development in technology, the old ways to do business have changed completely. A lot more advanced and developed ways are ...
You name the business and I will tell you how web development can help you promote your business. If it is a startup or you seeking some...