+
TL;DR
+ Canopy supports two types of streams. WebRTC and HLS. WebRTC streams are instant ad-hoc peer-to-peer connections, good for smaller streams. HLS streams require a dedicated server and more setup time, but are more reliable and can offer better bandwidth for both streamers and viewers alike.
+
+
+
+
How HLS Works:
+ HLS Works by taking an input video stream via a "first mile" protocol (usually RTMP) from broadcasting software such as OBS, and sending it off to a properly configured web-server. The web-server ingests the video stream, chopping it up into small bite-sized video files (around 2-6 seconds long), and serving them along side a playlist file on the web. When your browser plays back the stream, it is given a link to the playlist file. Reading the playlist file, it is given the location and order of video clips. When it runs out, it refreshes the playlist file in the background to get the details on the latest clips of the stream. Finally, as it plays the stream back, it sews the clips back-together in order.
+
+
+
+
How WebRTC Works:
+ WebRTC is a collection of technolgies included in most modern browsers. It includes a mechanism for negotiating direct connections through NAT (either peer-2-peer via STUN, or relayed via TURN server) with dedicated media streaming features, and a browser-side API for interacting with Cameras, Microphones, and Screen shares.
+
+
+
+
Pros/Cons of HLS:
+ While requireing a web-server running specific software, HLS streams provide dedicated bandwidth for streamers. Furthermore, while they do have a bit more of a delay than WebRTC Streams, they typically are more reliable and able to hold better video quality over worse connections than WebRTC. They also typically require broadcasting software on-top of the requirement for a dedicated server, though depending on preference that could be either a good or bad thing.
+
+
+
+
Pros/Cons of WebRTC:
+ WebRTC connections come in two flavors, STUN and TURN. STUN uses an intermediary server, to make a connection through your firewall, to another established peer. For certain connections, some users, suchas those on a CGNAT, will require a TURN server to relay the connection. At the current moment, ourfore.st only supplies STUN servers, however we do plan on looking into TURN relay servers in the future.
+
+
+ This means that each viewer uses up part of a streamers bandwidth, comparitively to HLS, in which the streaming-server takes the load of multiple connections off of the streamers connection (assuming they're it's not hosted on the same connection.) Furthermore, WebRTC's video-chat roots prioritizes real-time communication over video/audio quality. That being said, WebRTC requires no extra setup, and no extra software other than this website and your browser.
+
+
+
+
HLS Setup Reccomendations:
+ The easiest way to setup an HLS Streaming server would be via
Owncast, alternatively experienced self-hosters may prefer to configure the
NGINX web-server with the
ngx_http_hls_module.
+
+ If going the NGINX route, check out
RSSSSA, Rainbow's custom solution for implementing multi-user streamkey authentication on top of ngx_http_hls_module.
+
+
+ Anywho, your server will need to be configured with a proper domain-name pointed at it, HTTPS, and a Access-Control-Allow-Origin header allowing ourfore.st code to request your servers content from user's browsers.
+