Tutorial: WebRTC using PeerJS

Been spending time on a WebRTC video chat app and thought I’d produce a little tutorial.

It’s a simple ‘hello world’ type app. Uses ‘tmeasday:presence’ to check for users online, uses PeerJS to simplify the webrtc internals.

Was fun to write, maybe helpful for somebody else?

http://www.mhurwi.com/a-basic-webrtc-tutorial-using-meteor-peerjs/

9 Likes

Hi @mhurwi,

I had go through your blog for WebRTC using PeerJS.

I am facing issues. Can you help me to resolve.

You can also look at this repo I wrote a long time ago.

It’s a Meteor app for P2P chat using PeerJS for the communication between peers and Meteor for user management and presence.

1 Like

Hi @skini26 ,
Thanks for the reply.

Unfortunately it was prepared for chat only.
Is there anyway to prepare it for Audio , Video chat and screen sharing?

Yes there is of course. The only thing you have to change or add is the client side code with peerJS. When the peer will receive a video chat request, you’ll have to open the user media and setup some things. But the concept is still the same, you receive messages from a peer via peerJS, then you decide what to do.

I found this, it is exactly what you want to do !

@skini26
Oops,Getting errors while running oro-chat application .
Every webrtc and peerjs based tools were prepared longtime back, might be not working for not able to support latest versions of Meteor or else.

You probably have to update it yourself, this project is a little old so there’s maybe something conflicting with your actual meteor version. I’m not using Meteor since 1.2 so I don’t know what can cause those error (tthere’s already a simple one about the reserved template name).

Still wondering why people use PeerJS? It’s unmaintained since a few months :frowning:

@XTA, please suggest the thing which can be usable…

We are using RTCMultiConnection - it’s still maintained and delivers a lot of features. Only the documentation could be better (there are some changes between v2 and v3).

1 Like

Thank you @XTA,

It seems very suitable to my requirement, even providing lot more than that.
I will take a look at it.