Backgrounds

Get background files

getBackgroundFiles Operator user required Frontend can be closed, restricted or open

Get a list of background files on the computer hosting KM.

Request
{
    type: 'pause' | 'stop' | 'poll' | 'bundled'
}
  • pause : Pause between songs
  • stop : When the stop button is used or the player is initialized
  • poll : During song polls
  • bundled : Lists bundled files with this specific version of Karaoke Mugen
Response
{
    pictures: [
        'a.jpg',
        'b.jpg'
    ],
    music: [
        'a.mp3'
    ]
}

Add background file

addBackground Operator user required Frontend can be closed, restricted or open

Add a background file to a specific type of background. Background files can be music or pictures.

Request
{
    type: 'poll'
    file: 'abcdefghoklj'
}

See Get Background Files for more info on which types can be used.

file is the object you get after uploading a file via the upload route. It should contain filename and originalname properties like when you upload songs.

  • filename : is the filename in the temp directory after upload
  • originalname : is the name of the file on the user's computer

No specific response is sent other than success.

Remove background

removeBackground Operator user required Frontend can be closed, restricted or open

Remove a background file

Request
{
    type: 'stop'
    file: 'abcdefghijk.jpg'
}

No specific response is sent other than success.