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 screen
  • users : Display as a toast notification on user devices
  • all : 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 Operator user required Frontend can be closed, restricted or open

Send a command to the player. See request for details.

Request
{
    command: 'play',
    options: null    
}

command options :

  • play : Starts or resume playback
  • stopNow : Stop playback NOW
  • pause : Pauses playback
  • stopAfter : Stop playback after current song ends
  • skip : Skip to next song
  • prev : Go to previous song
  • toggleFullscreen : Toggle player's full screen mode
  • toggleAlwaysOnTop : Toggle player's always on top mode
  • toggleBorders : Toggle player's window borders
  • setHwDec : Set hardware decoding option : no, yes or auto-safe (default),
  • mute : Mute all sounds
  • unmute : Unmute player
  • showSubs : Show lyrics on screen
  • hideSubs : Hide lyrics on screen
  • seek : Go forwards or backwards in the song. options is a delta in seconds (like -2 or 10 to go 10 seconds forwards)
  • goTo : Go to exact position in song. options is 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,    
}