Followed tutorial by Clever Programmer - https://www.youtube.com/watch?v=ZVznzY7EjuY
Technologies: Socket.io, NodeJS, PeerJS, UUID, Express Server
Steps
-
Initialize NodeJS Project
-
Initialize first view
-
Create room ID
-
Add ability to video own video
-
Add ability to allow others to stream their video
-
Add styling
-
Add ability to create messages
-
Add mute button
-
Add stop video button
What I learned (chronologically)
Step 1. npm init -- creates json file npm install express -- where API is built from
express is a web ffamework for NodeJS
WebRTC enables peers to share audio and video
npm install -g nodemon -- -g installs globally
***** connects to server ******
- nodemon server.js
- go to localhost:3030 (Hello World should output)
Step 2. room.ejs -- HTML file allows to pass variables from backend to frontend
npm install ejs
Step 3.
npm install uuid -- generates random, unqiue id for room code
Step 4.
Step 5. Socket.io -- comminicate with server, server also communicates with you npm install socket.io
WEBRTC - Peer to peer connction, allows web browsers to communicate in real time npm install peer
if a variable isn't made, sometimes js will automatically make one for you
Step 6. Styling 1:45:00 - doing a different style for the hackathon