Jukebox
constJukebox:object
Defined in: server/api.d.ts:1387
Controls synchronized Mafia II jukebox playback by game jukebox identifier.
Type Declaration
Section titled “Type Declaration”getState()
Section titled “getState()”getState(
jukeboxId):JukeboxState|null
Returns the synchronized state of a jukebox.
Parameters
Section titled “Parameters”jukeboxId
Section titled “jukeboxId”number
Game jukebox identifier.
Returns
Section titled “Returns”JukeboxState | null
The current playback state, or null when the jukebox has no state.
playSong()
Section titled “playSong()”playSong(
jukeboxId,seed?):boolean
Starts synchronized playback on a jukebox.
Parameters
Section titled “Parameters”jukeboxId
Section titled “jukeboxId”number
Game jukebox identifier.
number
Optional deterministic selection seed.
Returns
Section titled “Returns”boolean
True when playback was started for a known jukebox.
stop()
Section titled “stop()”stop(
jukeboxId):boolean
Stops synchronized playback on a jukebox.
Parameters
Section titled “Parameters”jukeboxId
Section titled “jukeboxId”number
Game jukebox identifier.
Returns
Section titled “Returns”boolean
True when an active jukebox state was stopped.
