Arcane Viewing beta!
Added 2019-10-21 05:17:15 +0000 UTC
Hey everyone,
I've worked these past few days on adding Audio/Video conference support to Foundry VTT and I think I'm ready to have it tested by you gentle souls!
This release is in 3 parts : the FVTT module itself (aptly named Arcane Viewing), a signalling server that needs to run for the A/V call to work and a public server that I'm running for you all so you don't have to bother setting one up.
This is for patrons only, and for all tiers, so please enjoy!
I'll make this a short post cause I'm tired, but the highlights are :
- You can control which device you send video, audio from and where to output it as well
- You can mute/hide your camera/microphone at any time
- You can mute/hide the camera of your peers at any time
- You can control the volume of your peers (I've used an exponential algorithm for the volume level drops quicker than with a linear algorithm)
- Your device choices, whether you are hidden/muted or whether the other player's are hidden/muted/volume will be saved locally
- You can't yet move the position of the cameras or configure their sizes.
- This is relatively bandwidth (upload) intensive since you'll be connected in a 'mesh network', everyone connected to everyone, so if you are 5 players, you are sending your camera feed to 5 people at the same time. The resolution I chose is 320x240 so hopefully it's not going to use a lot of bandwidth.
- You need a server to take care of the signaling (connect everyone together). If you're behind a weird network (mobile data, corporate firewall, for example), you might not be able to connect to each other, and you'd then need to use a relay server.
- If the signaling server is configured to use a relay server, then those settings will be used by the clients, currently, the A/V configuration allows you to set a custom relay server, but that setting is ignored for now.
- The module comes with a Server directory which you can use to launch your own server, to run it, basically you need your ssl certificates in the files "ssl/cert.pem" and "ssl/key.pem". It will listen on port 30080 (http) and on port 30443 (https) if it finds ssl certificates. You need to run 'npm install' in the Server directory, then 'node server.js'
- You don't need to run your own signalling server. As a matter of fact, I've set up a server for all of my patrons that they can use for the signalling, which the module is configured to use by default. In case you mess with it and forget the URL of the server, here it is : https://kakaroto.game-server.cc:30443
- The Signalling server is only used to send the list of users in the 'room' and their ip addresses so they can connect to each other, no actual audio or video data is sent to the signalling server. That would be the job for the relay server (which would be in use in 5% of cases most probably, like if someone is connected via a corporate firewall or mobile data) which I have not set up yet.
- I will be setting up a relay server in the coming days, that setup is a little more complex, but there's a server software called 'coturn' which can be used, and here's a good example of the kind of configuration it needs to run... if someone wants to setup their own.
- For A/V to work, your own FVTT server needs to be running on https. This means that you need to have valid SSL certificates and have them configured in the options.json file of FVTT so that it uses https. If you're using self signed certificates, it might work as long as the users accept the warning they get, but the signaling server itself can't be using a self signed certificate (my server is not, so you're good to go)
- To get free SSL certificates, check out letsencrypt.org.
- If you can't setup SSL certificates and don't manage to setup FVTT to work with https. Then one solution would be to tell your users to add an exception for your website by adding it to the chrome flag unsafely-treat-insecure-origin-as-secure which they can do by going to to this link : chrome://flags/#unsafely-treat-insecure-origin-as-secure
I'd love to hear from you, whether or not you had any troubles, and whether it's working as it should, etc..
To summarize, the quick instructions are: you need to run your FVTT installation on https with valid SSL certificates or have your users whitelist your hostname in the chrome flags. You don't need anything else in theory, it should just work as I'm providing a signalling server for everyone here to use.
Enjoy!
KaKaRoTo