DEV Community

Discussion on: Ionic video call by peerjs

Collapse
timsar2 profile image
timsar2 Author • Edited on

I'm glad to hear that, I implemented video call in a real app and for that, I used simple-peer instead of peerJs.
I had no time to write about my new experience, also in the real app I found we will need a turn server to work when clients are not in the same network.
For turn server i used this repository:
github.com/coturn/coturn
run it in Linux. (for windows os use WSL)

Collapse
naonvl profile image
naonvl

wow thats great, so do you prefer simple peer instead of peerjs? cause i got problems with listening an event if someone on the other side click a button or something. they said to use socket.io, but i dontwanna use that

Thread Thread
timsar2 profile image
timsar2 Author

Yes simplepeer was better for me,
for socket i used signalr in dot net core.
using hubconnection
you can use any other language as your signaling server line nodjs, java, python etc...

Thread Thread
naonvl profile image
naonvl • Edited on

great!! but do you have any suggestion on listening to an event that someone on the other side fire an event? like closing or destroying the connection? i can show you my code if you could help me out

Thread Thread
timsar2 profile image
timsar2 Author

Calling peer close() function in frontend side must work and As I said, From backend you can call hubconnection methods in signalr dotnet core
for other language i dont know

Thread Thread
naonvl profile image
naonvl • Edited on

actually i use peerjs cloud server, so i only working on front end. Is using my own peerjs server a must?

Thread Thread
timsar2 profile image
timsar2 Author

peerjs server is just for signaling, (both clients will create some signale and send them to each other with server)
you can implement signaling server in any language.
but for your priblem to alter other client to close the connection it must work. I don't know why close() function not triggered.
maybe you have to look at peerjs document.

Thread Thread
naonvl profile image
naonvl

yeah what i wrote was following the peerjs docs, i post an issue on their repo. Thanks for your help, hope you'll share more knowledge