Skip to content

PlaybackController

Incoming Messages

ButtonPressed

Notifies the Engine of a platform button request (i.e. Play/Pause/Next/Previous/Skip Forward/Skip Backward) For certain playback types, the Engine will issue playback directives to the AudioPlayer MediaPlayer to control playback on the platform.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "PlaybackController",
            "action": "ButtonPressed"
        }
    },
    "payload": {
        "button": {{PlaybackButton}}        
    }
}

Payload

Property Type Required Description Example
button PlaybackButton Yes The playback button type.

TogglePressed

Notifies the Engine of a platform toggle request (i.e. Shuffle/Loop/Repeat/Thumbs Up/Thumbs Down) For certain playback types, the Engine will issue playback directives to the AudioPlayer MediaPlayer.

JSON Structure

{
    "header": {
        "version": "4.0",
        "messageType": "Publish",
        "id": {{String}},
        "messageDescription": {
            "topic": "PlaybackController",
            "action": "TogglePressed"
        }
    },
    "payload": {
        "toggle": {{PlaybackToggle}},
        "action": {{Bool}}        
    }
}

Payload

Property Type Required Description Example
toggle PlaybackToggle Yes The playback toggle type.
action Bool Yes The toggle action.

Enums

PlaybackButton

Values

Value Description
"PLAY" Play button.
"PAUSE" Pause button.
"NEXT" Next button.
"PREVIOUS" Previous button.
"SKIP_FORWARD" Skip Forward button.
"SKIP_BACKWARD" Skip Backward button.

PlaybackToggle

Values

Value Description
"SHUFFLE" Shuffle toggle.
"LOOP" Loop toggle.
"REPEAT" Repeat toggle.
"THUMBS_UP" Thumbs Up toggle.
"THUMBS_DOWN" Thumbs Down toggle.