This application is a simple videoconferencing service created using Twilio's Programmable Video Group Rooms API. Before begin, we need to collect all the config values we need to run the application:
When you generate an API key pair at the URLs above, your API Secret will only
be shown once - make sure to save this in a secure location,
or possibly your ~/.bash_profile
.
Create a configuration file for your application:
cp env.template .env
Edit .env
with the configuration parameters we gathered from above.
Next, we need to install our dependencies from npm:
npm install
Now, copy npm dependencies required by client.js:
npm run doCopy
./ngrok http 8080
node roomServer.js my-room-name
node roomServer.js room-name protocol port
room name
: the room name. Defaults to a random string.protocol
: protocol to be used (i.e. http
or https
). Defaults to http.
Remember that due to WebRTC security constraints:
ngrok
you must use http
.https
.https
port
: port to be used. Defaults to:
8080
for http
8443
for https
node createComposition.js room-sid layout options
room-sid
: the room SID to be composed.layout
: we currently accept:
grid
: for a grid layout.main-with-row
: for a layout comprising a main track and a bottom row.
In this case, you must specify the main track name or SID as option
.MIT