![]() ![]() I will expand upon that implementation later on, as we add in the rest of the logic. Once we have the Client object, we can join/leave the channel but also we will add listeners for the various engine events.īelow I included some of the initial object declarations for the screen sharing. #Chatting app ui browser codeIn the code below we start by declaring and initializing the Client object. #Chatting app ui browser how toI wrote a short post on how to get setup with Agora for anyone new to the Agora platform. I chose to use Agora to simplify the heavy task of the WebRTC interface. Now that we have the HTML/DOM structure laid out, we can add in the JS. Also let’s make sure to include the ui.js file within our HTML file ( using the snippet below). I saved the above code into a file ui.js to keep it separate from the core video chat logic that we will write. In the snippet above we have support for m, v, s, q to toggle mic, video, and screen-share and to leave the call ( respectively). During testing I found having keyboard shortcuts made things move quicker. There are a few UI elements we must have, such as the local video stream, the remote video streams, a toolbar that will contain buttons for toggling audio/video streams, a button to share our screen with the group, and lastly a way for participants to leave the chat ( we’ll add the buttons a little later).Īs you can see there is some added logic for keyboard controls. Let’s start building our video chatting web app by laying out our basic HTML.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |