@@ -44,6 +44,23 @@ The three callbacks receive the same arguments:
44
44
* Username: username provided by the client executing the action.
45
45
* OtherUsers: list of the rest of the usernames currently in the room.
46
46
47
+ ### server configuration
48
+
49
+ * port: port used to serve the signaling server and the example client.
50
+ * certfile: path to the certificate file for the signaling server and
51
+ example client.
52
+ * keyfile: path to the key file for the signaling server and
53
+ example client.
54
+ * hostname: name of the host where the app will be deployed. Will be
55
+ used as the ` auth_realm ` for stun and to lookup the ` turn_ip `
56
+ * turn_ip: IP of the server where the app will be deployed. If not
57
+ provided, will default to the first result of
58
+ ` inet_res:lookup(Hostname, in, a) `
59
+ * idle_timeout: cowboy configuration for the websocket
60
+ connections. By default will disconnect idle sockets after a
61
+ minute (thus requiring the clients to periodically send a ping). Use
62
+ ` infinity ` to prevent disconnections.
63
+
47
64
## Websockets API for signaling
48
65
49
66
TODO
52
69
53
70
make dev
54
71
55
- The app will run on ` https://localhost:8443/:room `
72
+ The example app will run on ` https://localhost:8443/:room `
56
73
57
74
## Run in production
58
75
59
- ### Configuration
60
- Update the configuration in ` conf/sys.config ` :
61
-
62
- * port: set to 443 for HTTPS.
63
- * certfile: absolute path to the certificate file.
64
- * keyfile: absolute path to the key file.
65
- * hostname: name of the host where the app will be deployed. Will be
66
- used as the ` auth_realm ` for stun and to lookup the ` turn_ip `
67
- * turn_ip: IP of the server where the app will be deployed. If not
68
- provided, will default to the first result of
69
- ` inet_res:lookup(Hostname, in, a) `
70
-
71
- ### Build a release
76
+ To run the example app stand alone in a production server, update the
77
+ relevant configuration in ` conf/sys.config ` (port, certs, host, etc.)
78
+ and run:
72
79
73
80
make release
74
81
75
82
Unpack the generated tar and ` bin/webrtc_server start ` .
76
83
84
+ Alternatively, the webrtc_server application can be included as a
85
+ dependency in another project.
86
+
77
87
### Firewall setup for STUN/TURN
78
88
79
89
```
0 commit comments