Tracks Turboplayer-Export-XML and presents the data with sockets.
1.2K
Tracks Turboplayer-Export-XML and presents the data with sockets.
To use it, you must mount a turboplayer.xml into the container and set some settings.
Example:
docker run \
--volume "${T2S_TURBOPLAYER_XML}":/opt/turboplayer.xml:ro \
--name turboplayer2sockets \
--restart unless-stopped \
-p "${T2S_PORT}":3000 \
-d dsigmund/turboplayer2sockets:latest
There are two ways to get information: Sockets and a REST-API.
You may combine both methods, e.g. loading the present element on client start and then listening to changes on the sockets.
We are using socket.io
In your HTML-File add the following snippet before the </body> (end body tag):
<script src="SERVER/socket.io/socket.io.js"></script>
<script>
var socket = io();
socket.on('present_update', function(item) {
// Do something here with the new Item.
});
socket.on('error', function(item) {
// Some Error on the Server occured. You might want to see this. Or not. Your Play
});
</script>
Another Option is to use the REST-Paths:
/_health: Receive Status 200 if Server is Online/_ready: Receive Status 200 if a present item is loaded, else 503/_version: Backend Version as text/plain/_config: Get the current config as application/json/present: Load the present Item as application/jsonThe present item consists of the following fields:
presentExample:
{
"sequence": "present",
"Show_Name": "Amsl Nicenstein",
"Title": "Yarama Bastıkca",
"Music_Performer": "Ah! Kosmos & Özgür Yılmaz",
"Time_Duration": "00:04:23.000"
}
Content type
Image
Digest
sha256:793b6f88a…
Size
59.7 MB
Last updated
about 4 years ago
docker pull dsigmund/turboplayer2sockets