Hi everyone,
I posted a thread long ago about the audio/video calling over the internet. Here is a simple example of how you can call almost (will discuss below) realtime.
Why only a simple audio calling example while I said that I will post both audio and video calling examples?
While working on this project I realized that a good quality audio/video calling application with all required functionalities needs huge time and effort. Because like whatsapp, google duo if you want faster calling app then you have to compress the audio/video buffer before sending and decompress the audio/video buffer after receiving. This may sound like a simple byte compression job but it isn't. Compressing/decompressing audio/video buffer in realtime and playing requires lots of research about audio/video processing, audio/video codes, how conversion works, and many other things. Thus I decided to post a simple example of how it works for free and will post a full example that will be chargeable. That will have lots of functionalities, check below to know more.
This will work,
Though the test server has bandwidth limitations, it can handle more than 100-200 users.
Download the test apk for testing.
I posted a thread long ago about the audio/video calling over the internet. Here is a simple example of how you can call almost (will discuss below) realtime.
Why only a simple audio calling example while I said that I will post both audio and video calling examples?
While working on this project I realized that a good quality audio/video calling application with all required functionalities needs huge time and effort. Because like whatsapp, google duo if you want faster calling app then you have to compress the audio/video buffer before sending and decompress the audio/video buffer after receiving. This may sound like a simple byte compression job but it isn't. Compressing/decompressing audio/video buffer in realtime and playing requires lots of research about audio/video processing, audio/video codes, how conversion works, and many other things. Thus I decided to post a simple example of how it works for free and will post a full example that will be chargeable. That will have lots of functionalities, check below to know more.
This will work,
- From Android to Android
- From Android to iOS
- From iOS to Android
- From iOS to iOS
- Apps:
- List all the connected users and update in realtime
- Call any connected users
- Check if the user is busy or not
- Show custom in-app incoming call screen with accept/reject button
- Play ringtone for incoming call
- Automatic screen dimming while talking
- Call accepted/rejected/ended/busy/offline status
- Call timer
- Incoming call notification while the app is in the background (Android)
- Noise cancellation, Acoustic echo cancellation, Automatic gain control (Android)
- Server:
- Can handle multiple connections simultaneously.
- Deliver call requests and status
- Broadcast connected user list
- Check if the callee is busy or not
- Work as a relay server for delivering audio buffers to respective clients
- Few milliseconds delay in delivering audio buffer (sometimes). Because,
- The example apps are processing uncompressed audio buffer (24Kb-30Kb buffer per seconds)
- The test server (you can find the IP inside the project) has been configured to limit bandwidth usage for testing purposes.
- No notifications when the app is closed. I haven't included that because it's a simple example.
- App:
- Server: The test server is always up. If you want to test with the test server then just run the app. If you want to run it on your local server, then
- Install Node.js
- Extract the server code
- Open terminal/cmd and navigate to the folder where you have extracted the code
- Run npm install (it will take few minutes)
- Run node app.js
- That's it.
- Audio/Video call
- End to end encryption
- Switching audio output between speakers/headphone
- Faster calling even with low internet speed (5-10kbps)
- Incoming calling screen that will show even when the app is not running.
- Register a name for your device. So the other users can see who is calling
- Example of STUN server as default server and fallback to TURN server
- Example of Socket.IO server along with WebSocket Server
- *Maybe group calling.
Though the test server has bandwidth limitations, it can handle more than 100-200 users.
Download the test apk for testing.
Attachments
Last edited: