Just one of the things I'm learning. https://github.com/hchiam/learning
Use a browser API that enables P2P (peer-to-peer) communication. Libraries like PeerJS can simplify some of working with it for you.
https://youtu.be/ziU_VxaDmDk?feature=shared
- try chrome://webrtc-internals
- top "tabs" should be limited to tabs, i think?
- "=>" summary at top
- ICE candidate grid, expand that
https://codelabs.developers.google.com/codelabs/webrtc-web/#0
https://www.youtube.com/watch?v=DvlyzDZDEq4
https://github.com/WebDevSimplified/Zoom-Clone-With-WebRTC
https://github.com/peers/peerjs
https://www.youtube.com/watch?v=WmR9IMUD_CY
https://github.com/fireship-io/webrtc-firebase-demo
PeerJS's server creates user IDs for you.
<script src="https://unpkg.com/[email protected]/dist/peerjs.min.js"></script>
Uses https://github.com/rameshvarun/netplayjs
-
see the netplay-demo-... folders for more examples/experiments
To run this demo locally, you need to run commands in two separate terminals:
- Run
server.js
:
npm run dev
and
- Run a local peer server:
# npm install -g peer
peerjs --port 3001 # peer server on http://localhost:3001
# to close this process, close both tabs and then hit control+c
NOTE: you might not get videos to stream, but at least the blocks for video streams will appear/disappear as expected.
learning-webrtc/minimal-trystero-demo --> yarn dev
to npm run vite
learning-webrtc/minimal-2-trystero-demo --> yarn dev
to npm run vite
learning-webrtc/trystero-demo --> yarn dev
to npm run vite
https://github.com/hchiam/trysterollup
https://github.com/dmotz/trystero
learning-webrtc/firebase-webrtc-demo