Player
Start playing song (classic mode)
play Authentication needed Frontend needs to be restricted or open
Start the player. This is only allowed for guests and users if it's their turn to play (the song's requester equals the user accessing this command)
Response
{
code: 403,
message: {
code: "USER_NOT_ALLOWED_TO_SING
}
}
Display message on the screen
displayPlayerMessage Operator user required
Display a message on screen or user devices
Request
{
message: 'Free drinks for one hour!',
duration: 10000, //in miliseconds
destination: 'screen'
}
destination options :
screen: Display message on the player's video screenusers: Display as a toast notification on user devicesall: Display on both screen and user devices
Response
{
code: 200,
message: {
code: 'MESSAGE_SENT'
}
}
Response
{
code: 500,
message: {
code: 'MESSAGE_SEND_ERROR'
}
}
Response
{
code: 400,
message: {
// validation errors here
}
}
Send player command
sendPlayerCommand Authentication needed Frontend can be closed, restricted or open
Send a command to the player. See request for details.
Commands are available to guests only if Frontend.PublicPlayerControls is enabled in config.
Request
{
command: 'play',
options: null
}
command options :
play: Starts or resume playbackstopNow: Stop playback NOWpause: Pauses playbackstopAfter: Stop playback after current song endsskip: Skip to next songprev: Go to previous songtoggleFullscreen: Toggle player's full screen modetoggleAlwaysOnTop: Toggle player's always on top modetoggleBorders: Toggle player's window borderssetHwDec: Set hardware decoding option :no,yesorauto-safe(default),mute: Mute all soundsunmute: Unmute playershowSubs: Show lyrics on screenhideSubs: Hide lyrics on screenseek: Go forwards or backwards in the song.optionsis a delta in seconds (like-2or10to go 10 seconds forwards)goTo: Go to exact position in song.optionsis the position in seconds.setVolume: Set current volume
Response
{
code: 500,
message: {
code: 'COMMAND_SEND_ERROR',
data: 'Command seek must have a numeric option value'
}
}
Start up video player
startPlayer Operator user required Frontend needs to be open
Start video player. This command is used only after setup is completed so not to start the video player until the user has completed the app's onboarding process.
Promise just resolves.
Response
{
code: 500,
}
Response
{
code: 409,
}