We will create simple 2 person video conferencing application.
First user will join video conference from a desktop. His own audio/video will start showing up on browser.
Other participant will also join video conference from a android mobile device.
Then both participants will be able to see & hear each other via video conference.
Participants will have option to leave video conference using a provided button.
Technologies
For this application, we will be using below technologies
WebRTC (Web Real-Time Communication) using HTML5 & Javascript (API specification on Mozilla)
Websocket using Javascript & Java server for signaling. (Learn Websocket with simple example here)
Here are few ideas/technologies that were discarded in favor of above technologies
Desktop application client – For this, we need Java based API to connect to web cam & audio etc. There are Java provided API like JMF (Java Media Framework) etc. which have been without update from long time. There are other alternatives (like bytedeco javacv, QuickTime for Java & more) which were not considered/explored as goal was to create basic example without external libraries.
Web Application with Java server to transmit audio/video between participant browsers – Javascript can do job of capturing webcam/audio & send to server in chunks. We can use web socket server endpoint to
exchange audio & video between participants in chunks. But this approach won’t be real time as server will add lag due to latency, processing time etc.
Hence finally WebRTC is chosen for this article since it provides real time Peer-To-Peer streaming between web pages. Basically with this approach, your browser will directly stream audio & video to other participant’s browser without any server in between. Server will only do job of connecting both participant’s browsers to each other.
Source url :
https://itsallbinary.com/create-your-own-video-conference-web-application-using-java-javascript/
https://blog.contus.com/webrtc-video-voice-chat-application/
https://habr.com/en/post/513348/