In view of rewriting the Legacy Digiplay Touchscreens, some further API and WS endpoints will be needed.
The following schema are just for show, nothing concrete or required here.
API
These endpoints will permit the gathering of resources to play on the playout application.
Audiowall Set
GET Audiowall Set: Returns a set of audiowalls (sets>walls>items) for a given audiowall_set ID.
cURL GET /api/audiowall_set?key=KEY&set_id=ads_789xyz
{
set_id: ads_789xyz,
walls: [
{
wall_id: adw_73hfh2s
items: [
{
item: 1,
colour: "#debc23"
audio_id: aud_bsqhsdk4545jd74fj0s
}
]
}
]
}
Audio
GET Audio: Returns a audio object based on audio ID.
cURL GET /api/audio?key=KEY&audio_id=aud_bsqhsdk4545jd74fj0s
{
audio_id: "aud_bsqhsdk4545jd74fj0s",
type: "track",
artist: "Tame Imapla",
title: "Be Above It",
duration: 210000,
resource_url: "https://audio.radio.warwick.ac.uk/bsqhsdk4545jd74fj0s.flac",
vocals: {
in: 1283,
out: 190098
},
metadata: {
origin: "Charlie Peters",
created: 1555863568
}
}
WebSocket
Use Laravel Echo with a Socket.IO websocket wrapper, as seen here or here.
These channels with probably be public, since this project is a separate entity from Digiplay. All the data served, hence, should be public. These events should act as real-time notifications of things happening (being clicked, logout events, stuff) on Digiplay. They should be triggers to go and fetch stuff from the secured API through an application server. The the data served should be read only, and no-one should be able to cause destructive events by sending dummy / malicious requests back to the server.
Login
EMIT Login: Informs the client that a user has logged in.
EMIT LOGIN ws://digiplay.radio.warwick.ac.uk
{
studio: 1,
user_id: "usr_12345abcde"
}
Logout
EMIT Logout: Informs the client that a user has logged out.
EMIT LOGOUT ws://digiplay.radio.warwick.ac.uk
{
studio: 1,
user_id: "usr_12345abcde"
}
Track Select
EMIT Track Select: Informs the client that a track has been selected from the showplan. Ready to load.
EMIT TRACK_SELECT ws://digiplay.radio.warwick.ac.uk
{
studio: 1,
audio_id: "aud_bsqhsdk4545jd74fj0s"
}
Fetch Audiowall
EMIT Fetch Audiowall: Informs the client that an audiowall of given ID must be fetched (maybe again).
EMIT FETCH_AUDIOWALL ws://digiplay.radio.warwick.ac.uk
{
studio: 1,
audiowall_id: "aud_bsqhsdk4545jd74fj0s"
}
In view of rewriting the Legacy Digiplay Touchscreens, some further API and WS endpoints will be needed.
The following schema are just for show, nothing concrete or required here.
API
These endpoints will permit the gathering of resources to play on the playout application.
Audiowall Set
GETAudiowall Set: Returns a set of audiowalls (sets>walls>items) for a given audiowall_set ID.Audio
GETAudio: Returns a audio object based on audio ID.WebSocket
Use Laravel Echo with a Socket.IO websocket wrapper, as seen here or here.
These channels with probably be public, since this project is a separate entity from Digiplay. All the data served, hence, should be public. These events should act as real-time notifications of things happening (being clicked, logout events, stuff) on Digiplay. They should be triggers to go and fetch stuff from the secured API through an application server. The the data served should be read only, and no-one should be able to cause destructive events by sending dummy / malicious requests back to the server.
Login
EMITLogin: Informs the client that a user has logged in.Logout
EMITLogout: Informs the client that a user has logged out.Track Select
EMITTrack Select: Informs the client that a track has been selected from the showplan. Ready to load.Fetch Audiowall
EMITFetch Audiowall: Informs the client that an audiowall of given ID must be fetched (maybe again).