Using y-webrtc for sharing media streams

Hi, I am having difficulties understanding how i can use y-webrtc to share video and audio. In the documentation it says just use the peer event which comes with the provider, I cannot understand that. Please let me know if you know how to do it. Thanks

Hi @AayushBajaj2000,

sorry you are having trouble with this. A couple of projects used y-webrtc to also share video streams (e.g. peer2school). I built y-webrtc for sharing Yjs data only. It is probably easier for you to use another project (e.g. jitsi) alongside y-webrtc. You need a good understanding of how y-webrtc works and how simple-peer (the webrtc library I use) works to enable media streams.

I don’t have the time to provide support for sharing video streams via y-webrtc. If anyone else would be up for that I would love to receive better documentation and a proper example that enables this feature.

For complete reference I include the conversation we had in the Gitter channel:

Aayush Bajaj @AayushBajaj2000 Sep 16 19:17
@dmonad How can I use y-webRTC to make a p2p video chat im having some difficulties. Thanks

Kevin Jahns @dmonad Sep 16 20:37
@AayushBajaj2000 You could have a look at and at many discussions in the github issues in the y-webrtc repository. If you have any specific question let me know.

Callum Atwal @callum-atwal Sep 16 20:54
@AayushBajaj2000 take a look at the simple-peer repository on GitHub. Y-webrtc uses this to handke webrtc stuff. It has an example on how to share video and audio feed.
1 Like