Running
This was tested from Node.js 8.x to 12.x.
There is an example configuration file in ./config/default.example.yml
. The
file which the app looks for must be ./config/default.yml
, so be sure to copy
it over and configure it to your wish.
All the configuratin options have environment variables for them as well. Look
for the mapping in ./config/custom-environment-variables.yml
.
And then, to run:
npm install
npm start
ornode server.js
The application can also be run with docker. Look for the Dockerfile
in the root
dir and have fun with it.
Configuration
kurento
: an array of objects consisting ofkurento.ip
(Kurento's host IP) andkurento.url
(Kurento WS URL).kurento: - ip: "" url: ws://HOST/kurento
kurentoStartupRetries
: Integer. number of initial connection tries. Defaults toInfinity
.enableConnHealthcheck
: Boolean. Enables a periodic health check (run everyconnHealthCheckInterval
) which opens a WS connection with Kurento and then closes it. Defaults totrue
.connHealthCheckInterval
: Integer. Connection healthchecker interval, in ms. Defaults to30000
.kurentoStartupRetries
: Integer. Number of initial connection tries. Defaults toInfinity
.webhookURL
: String. URL where the service will sendPOST
requests notifying the media server's state.hostAddress
: String. this service's host identifier. Can be anything, it's just appended to the event strings.
Events
hostAddress
triggered MEDIA_SERVER_OFFLINE for Kurentokurento.url
kurento.ip
hostAddress
triggered MEDIA_SERVER_ONLINE for Kurentokurento.url
kurento.ip
(triggered only afterMEDIA_SERVER_OFFLINE
)hostAddress
triggered STARTUP_CONNECT_FAILURE for Kurentokurento.url
kurento.ip
hostAddress
triggered STARTUP_CONNECT_SUCCESS for Kurentokurento.url
kurento.ip
(triggered only afterSTARTUP_CONNECT_FAILURE
)hostAddress
triggered WS_CONN_UNHEALTHY for Kurentokurento.url
kurento.ip
(triggered only ifenableConnHealthcheck
=true
)hostAddress
triggered WS_CONN_HEALTHY for Kurentokurento.url
kurento.ip
(triggered only ifenableConnHealthcheck
=true
and afterWS_CONN_UNHEALTHY
)