Skip to content

hchiam/learning-webrtc

Repository files navigation

Learning WebRTC

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.

Debug

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

Some resources I tried

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://peerjs.com

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>

netplay.js demos

Uses https://github.com/rameshvarun/netplayjs

webrtc-wds-demo

To run this demo locally, you need to run commands in two separate terminals:

  1. Run server.js:
npm run dev

and

  1. 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.

trystero-demo

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

More with trystero

https://github.com/hchiam/trysterollup

https://github.com/dmotz/trystero

https://oxism.com/trystero/

Firebase database with WebRTC

learning-webrtc/firebase-webrtc-demo

https://firebase-webrtc-demo.surge.sh/

PeerJS demo

learning-webrtc/peerjs-demo

https://peerjs-demo.surge.sh

About

Learning WebRTC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •