- Configure simple HTTPS server to serve scripts
- Using streams locally
Create a - Local Peer Connection and Signalling
- Using streams between devices over a network
- Building a simple remote 'Presentation' application using WebRTC
This has been done for you. Please clone this repo to use the boilerplate that has been provided.
If you would like to recap how this is done, see [this description] // Put link here
- Request local media stream (video/audio)
- Attach to browser
var promise = navigator.mediaDevices.getUserMedia({
video: true,
audio: true
});
promise.then((avStream) => {
// Find my video tag...
video = document.createElement('video');
attachMediaStream(video, stream);
video.play();
// Add video tag to DOM
videoContainer.append(v);
}).catch(() => {...})
- Connecting camera/mic to a local video tag THROUGH a peer connector
- Implement our own local signalling
- Shows the basic structure of how to connect streams to each other remotely without network complexity
- Create a 'signaling' abstraction:
- Announce (me), send (to), listen
- Completely local
Single web page!
- Replace local signaling with node server proxy
- Options for transferring signaling:
- AJAZ Poller
- Web Socket
- Split your signaling into two parts:
- Carry information across the local network
- Modify the application to have one end point per browser
- Announce presentation -> Presentations Server
- Student joins presentation
- Student & mentor negotiate session -> Signaling server
- Mentor sends A/V Real-time stream
Either using IP Cortex API or modified signaling from previous task
- Evolution of simple signaling from previous example
- Should work on a local LAN
- Won't work across the Internet without TURN/STUN servers (complexity)
- IP Cortex API
- Covers all the routing across the Internet
- More complex to configure/run
- MDN WebRTC
- WebRTC.org - Getting Started
- HTML 5 Rocks - Getting started with WebRTC (2012)
- Good overview
- Illustrates local signaling but is not a portable way
- https://www.html5rocks.com/en/tutorials/webrtc/basics/
- HTML 5 Rocks - WebRTC Infastructure
- Great overview of signaling - everything you need to know!
- https://www.html5rocks.com/en/tutorials/webrtc/infrastructure/
- adapter.js
- Shim to isolate applications from browser incompatibilities
- https://github.com/webrtc/adapter