Confusion 2: You don’t have to run your IPFS instance on a publicly available server on the internet, in fact you can install it on your home computer, as you would with any bittorrent client, and it would work just fine. IPFS handles all the annoying stuff like NAT-traversal by itself so you don’t have to deal with it.
If you want a web application on the browser that utilizes IPFS and that works without the need for users to download anything, there are 2 options:
- write your app on Node.js, install IPFS via
- write your app directly for the browser (in a HTML file or in an imported JS file) and import the IPFS script version like so:
So to answer your question “Would IPFS and the Website be on the same server?”:
- Firstly, the website won’t be hosted on any webserver, it will be distributed among peers who are willing to seed it. Keep in mind that IPFS is a peer-to-peer protocol. Unless you only want to use IPFS for the browser-to-browser communication during the livestream and you don’t care if your static files are stored on a centralized server, so you can host your website on a regular HTTP webserver.
<script> tag containing js-ipfs. If it is go-ipfs, the users of your application will have go-ipfs installed and running beforehand on their PC, and they will connect your app to their local IPFS gateway.
Here are two interesting tutorials on js-ipfs :
I think the PubSub demo is particularly interesting for your project, because you could create a PubSub room for each of your streaming sessions. But I don’t know if js-ipfs is suitable for streaming video using the WebRTC API. If you don’t mind a little bit of centralization in your application (mainly for storing your static files (HTML/CSS/JS) and for the WebRTC signalling process), I suggest you to rather take a look on PeerJS instead of IPFS.