Trigger playlists
Event (playlist) of the Trigger type
Attention! This option works only in the Events mode and does not work in the Advertising campaigns mode.
Sometimes it is necessary to interrupt the player broadcast and display an emergency notification (fire, alarm, storm warning, etc.)
For this, Oohdesk CMS has a trigger content option.
A playlist (event) is created as usual, but the type is specified not as a calendar, but as a trigger. In this way, we give the player the task of listening to the notification service.
The notification service is a web service that gives alarm identifiers. It can be built either on a web server on the Internet or on a local network (for example, on an arduino or raspberry).
How to start
This playlist will be stored in the player's memory. But it will not be played by the player immediately.
The player will listen to the notification service located at http://demo.visiobox.cloud:8000/stream (this address can only be used as an example)
(Картинка)
After creating an event, an event identifier will be allocated
If this identifier appears on the notification service http://demo.visiobox.cloud:8000/stream, the player will interrupt the broadcast of the current playlist and start playing the trigger one.
(Картинка)
Accordingly, as soon as the identifier 76d9e42b-885d-42d1-9c28-10b4e635788a appears on http://demo.visiobox.cloud:8000/stream, the player will immediately start broadcasting the trigger playlist.
How to set playlist ID 76d9e42b-885d-42d1-9c28-10b4e635788a to http://demo.visiobox.cloud:8000/stream?
For testing there is an interface http://demo.visiobox.cloud:8000/
You need to enter the ID 76d9e42b-885d-42d1-9c28-10b4e635788a in the input form and click Send
How to make sure that the service http://demo.visiobox.cloud:8000/stream is working?
You can make sure that the stream server is working by entering curl -v demo.visiobox.cloud:8000/stream in the ssh terminal and in the form http://demo.visiobox.cloud:8000/ (you need http) - enter any value. After sending the value to the web form, the same value should appear in the terminal console (http://demo.visiobox.cloud:8000 open in the browser in incognito mode (otherwise there will be a redirect to https)
Recommendations for developing your own notification service (Push server)
Players connect to the specified URL via http/https when launched. The server does not close the connection and starts sending a random string every 10 seconds (for example, "ping\n") to maintain the connection. When a playlist needs to be launched, the server sends its ID (for example, "123456\n"). Unknown strings are ignored by the player. The connection is never closed and exists for the entire time the player is running. If the connection is lost (explicitly or by timeout due to failure to receive data), the player tries to re-establish the connection.