DEV Community

Discussion on: Ionic video call by peerjs

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