P2P library

While developing Edumeet I wanted to support P2P for very small rooms and extra privacy. First I started adding support in the usual way, exchanging SDPs and so on, but I figured I wanted the same sort of API that Mediasoup (client) provides. I forked mediasoup-client and turned it into a P2P library where you have roughly the same API.

If this sounds of interest to you, have a look here: GitHub - havfo/ortc-p2p: Typescript library for P2P communication using ORTC

The opposite, it’s a breach in privacy to leak user IPs. Would strongly avoid. :slight_smile:

If you have a think, I am sure you can come up with use-cases where media privacy is more important than IP privacy :blush:

That is beside the point though, and you should of course take this into account if you plan on doing P2P.

Looks good, same kind of api as mediasoup have. Especially the dividing of sending, receiving transport is good which simplifies a lot of offer collisions which we otherwise face.

I think it would have been interesting to have a separate layer of this that could have worked as an extension of mediasoup-client using its base classes. I.e. something like mediasoup-p2p-client, where
mediasoup-p2p-client.Device extends mediasoup-client.Device, adding methods like createSendP2PTransport/createRecvP2PTransport. And the transport returned by these methods is either just mediasoup-client.Transport, or of the type derived from mediasoup-client.Transport.

what he means by privacy is e2ee that you get out of the box with p2p also no data is going to travel through a sfu, if the user want to protect their ip use a vpn lol