Phonegap Peer to Peer Chat and Video Chat Plugin

586 views
Skip to first unread message

Varsha Shah

unread,
Mar 31, 2015, 11:18:03 AM3/31/15
to phon...@googlegroups.com
HI all

i am developing application using Phonegap , where i want to provide

- App to App Call Functionality (audio) between 2 Users Peer to peer

- App to App Call Functionality (audio) Group users


- App to App Call Functionality (Video) between 2 Users Peer to peer

- App to App Call Functionality (Video) Group users


Anyone please help me which api is best for above features?

At present i have used , pubnub.com , but it only provides Audio Chat to User to User.

Anyone Please respond asap

Regards
Varsha

osman.t...@gmail.com

unread,
Apr 3, 2015, 9:40:03 AM4/3/15
to phon...@googlegroups.com
What's your definition of peer to peer? You could use WebRTC to implement a client-to-client communication endpoint, use Websockets or even go barebone tcp sockets.

WebRTC needs a signalling server for discovering your peers, but after the initial handshake it is a fully p2p connection. TCP sockets are similar but you would have to implement a sort of protocol yourself and it's a major burden to connect two clients when behind a NAT or such. Websockets are the easiest but data has to go through the server before reaching a client. This means that there's more latency than the first two options. In theory that would be something like 100-150ms latency in quasi-optimal conditions.

You could record the microphone's audio with the Media Plugin http://plugins.cordova.io/#/package/org.apache.cordova.media , encode it in real-time in base64/base128 or binary, and decode it on the receiver. This would add some latency though and you might want to use native calls/plugins for the decoding part at least.

I haven't looked up for the video part, but it shouldn't be too difficult to build a plugin which gets the camera feed. When that part is done you'd proceed in the same way of audio transmission.

Osman Tekin

unread,
Apr 3, 2015, 10:38:11 AM4/3/15
to phon...@googlegroups.com
There is a plugin which makes it possible to get the camera preview from within a Phonegap app: https://github.com/donaldp24/CanvasCameraPlugin You could encode each frame and send it as a continuous video stream by decoding it on the other side.

Gaurav Patel

unread,
Oct 7, 2017, 2:10:40 PM10/7/17
to phonegap
have you guys found any solution for one to many video call using webrtc or phonertc?
Reply all
Reply to author
Forward
0 new messages