logo
logo
Sign in

Here we have made a Connection class to keep up with all our attachment

avatar
abc
Here we have made a Connection class to keep up with all our attachment

we have a constructor that gets a settings object (optional) that can be used to send a couple of data from our part for setting up our affiliation class like (sending video edge to be used) 


Here we have made a Connection class to stay aware of all our connection and sidekick affiliation, Don't pressure we will walk around all of the limits above. 


we have a constructor that gets a settings object (optional) that can be used to send a couple of data from our part for setting up our affiliation class like (sending video edge to be used) 


Inside constructor we are conjuring two procedures initializeSocketEvents() and initializePeersEvents() 


initializeSocketEvents() - Will start connection relationship with our backend. 


initializePeersEvents() - Will start peer relationship with our friend server. 


Then, we have setNavigatorToStream() which has getVideoAndAudio() work which will get the sound and video move from the pilot. We can show the video diagram rate in the pilot. 


In case the stream is open, we will resolve in .then(streamObj) and by and by we can make a video part to show our exchange bypassing stream object to createVideo(). 


As of now right after getting our own stream it's an ideal chance to focus on the friend events in work setPeersListeners() where we will tune in for any moving toward video move from one more customer and will stream our data in peer.answer(ourStream). 


Moreover, the we will set newUserConnection(), where we will send our stream, in the event that we are interfacing with the current room and besides checking the current companion relationship by userID in peers Object. 


Finally we have removeVideo to take out the video part from dom when any customer dissconnected. 


Presently the backend needs to focus on the connection affiliation. Using connection "socket.io" to simplify the connection affiliation.


Read More About : video call api for android


collect
0
avatar
abc
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more