Feature/on-data
Hi,
Thanks for the amazing library, just discovered it when I'm playing around with WebRTC. I know it's maybe not intended, but I'm actually adding some custom code to the signalling peer-server I'm running (in order to create rooms). For this, I need to intercept messages from the signalling server itself. That's why I modified the code a bit.
It might be handy for other users too, let me know what you think.
Best regards, Nicolas
I wanted to create a pull request but noticed that you did the exact same thing. I've used that message for notifying peerjs that their call-participant disconnected (since I didn't figure out how to do that with peerjs itself..)
I'd recommend creating a new ServerMessageType in lib.enums.ts and adding a new case-statement in lib/peer.ts instead of using the default-statement.
See: https://github.com/Florrr/peerjs/commit/e8a2c48fae3f1cf559249cde0e889b1c2176a7f1
Hi Florrr,
I suggest that I cancel my PR and you submit your PR with your suggestions. This one was done rather quick&dirty, and breaks backwards compatibility (the errors), while your suggestion seems the way to go.
I'm currently not using PeerJS in my project anymore since I have too many clients and the mesh became too heavy, so I have to use an SFU (mediasoup).