Connects to the StreamerSongList service to allow adding/removing/viewing songList data.
Mostly used by music streamers to queue music for viewers.
- Source:
-
Methods
DeleteCredentialsOnServer()
Delete our credential file from the server
- Source:
-
SaveConfigToServer()
save config file to the server
- Source:
-
SaveCredentialToServer(name, value)
Sends Credential to the server to be saved
Parameters:
Name |
Type |
Description |
name |
string
|
|
value |
string
|
|
- Source:
-
Parameters:
Name |
Type |
Description |
to |
String
|
channel to send to or "" to broadcast
|
- Source:
-
Parameters:
Name |
Type |
Description |
to |
String
|
channel to send to or "" to broadcast
|
- Source:
-
send some modal code to be displayed on the admin page or somewhere else
this is done as part of the webpage request for modal message we get from
extension. It is a way of getting some user feedback via submitted forms
from a page that supports the modal system
Parameters:
Name |
Type |
Description |
tochannel |
String
|
|
- Source:
-
addSongToQueueById(songId)
Adds a song by id to the songlist queue on the server
Parameters:
Name |
Type |
Description |
songId |
number
|
|
- Source:
-
addSongToQueuebyName(songName)
Adds a song by name to the songlist queue on the server
Parameters:
Name |
Type |
Description |
songName |
string
|
|
- Source:
-
fetchSongList()
Fetches the full songlist from the StreamerSonglist server
- Source:
-
fetchSongQueue()
Fetches the current song queue from the StreamerSonglist server
- Source:
-
findtriggerByMessageType(messagetype)
Find a trigger by messagetype
Parameters:
Name |
Type |
Description |
messagetype |
string
|
|
- Source:
-
Returns:
trigger
heartBeatCallback()
Sends out heartbeat messages so other extensions can see our status
- Source:
-
initialise(app, host, port, heartbeat)
Starts the extension using the given data.
Parameters:
Name |
Type |
Description |
app |
object:Express
|
|
host |
string
|
|
port |
number
|
|
heartbeat |
number
|
|
- Source:
-
joinSslServer()
Joins the StreamerSongList service using a timer to suppress multiple quick joins
These might be called during a credentials file update
- Source:
-
joinSslServerScheduler()
Joins the StreamerSongList service
- Source:
-
markSongAsPlayed(queueId)
Mark a song in the current queue as being played
Parameters:
Name |
Type |
Description |
queueId |
number
|
|
- Source:
-
onDataCenterConnect(socket)
Connection message handler
Parameters:
Name |
Type |
Description |
socket |
*
|
|
- Source:
-
onDataCenterDisconnect(reason)
Disconnection message sent from the server
Parameters:
Name |
Type |
Description |
reason |
String
|
|
- Source:
-
onDataCenterMessage(server_packet)
receives message from the socket
Parameters:
Name |
Type |
Description |
server_packet |
data
|
|
- Source:
-
outputSongList()
Outputs the full songlist on our channel
- Source:
-
outputSongQueue()
Sends the current songQueue out on our channel
- Source:
-
parse the received data from a modal submit from the user
Parameters:
Name |
Type |
Description |
extData |
object
|
// modal data
|
- Source:
-
pollSongListCallback()
Timer for polling the songlist
- Source:
-
pollSongQueueCallback()
Callback from the song queue timer
- Source:
-
postStartupActions()
At this point we should have any config/credentials loaded
- Source:
-
removeSongFromQueue(queueId)
Removes a song queue song using it's queueId
Parameters:
Name |
Type |
Description |
queueId |
number
|
Queue id of item to remove
|
- Source:
-
sendCurrentSongChange(extension)
Sends a trigger_CurrentSongChange message to given extensionextension
Parameters:
Name |
Type |
Description |
extension |
string
|
|
- Source:
-
sendSongList(extension)
Sends the full songlist to given extensionextension
Parameters:
Name |
Type |
Description |
extension |
string
|
|
- Source:
-
sendSongQueue(extensionsname)
Sends the current songQueue to the given extension name
Parameters:
Name |
Type |
Description |
extensionsname |
string
|
|
- Source:
-
sendTriggersAndActions(from)
Sends out triggers and actions out to the given extension name
Parameters:
Name |
Type |
Description |
from |
string
|
|
- Source:
-
startupCheck()
waits for config and credentials files to set ready flag
- Source:
-