Alexa.PlaybackController Interface (VSK Fire TV)
When users make transport control utterances (e.g., Stop, Rewind, Play, etc.), the Alexa.PlaybackController
interface sends transport control directives (Pause
, Play
, Stop
, Resume
, Next
, Previous
, FastForward
, Rewind
, StartOver
) to provide instructions for controlling media.
- Utterances for Transport Controls Directives
- Handling PlaybackController Directives
- Example Response
- Declaring Capability Support for this Interface
- Error Response
- Additional Sample Code
Utterances for Transport Controls Directives
Alexa sends transport control directives to your Lambda when users say the following utterances.
Feature | Sample Utterances | Expected Response |
---|---|---|
Pause |
Pause Pause Pause Mets en pause pause mets en pause pausa metti in pausa pausa pausa pon pausa 一時停止 一時停止して pause pausa pause pause करो |
The media pauses, similar to pressing the Pause button on your web player or remote control. |
Play |
Play Play Starten joue joue fais jouer riproduci reproduce reproduce 再生 再生して assitir reproduzir play play करो |
The media plays, similar to pressing the Play button on your web player or remote control. |
Stop |
Stop Stopp arrêtes stop arrête stop stop para para alto 止めて ストップ parar pare stop stop करो |
The media stops, similar to pressing the Stop button on your web player or remote control. |
Resume |
Resume Fortsetzen Weiter reprends reprends continue riprendi continúa continúa 再開 再開して continua continuar resume resume करो |
The media resumes play, similar to pressing the Play button on your web player or remote control. |
Start over |
Start over Neu starten Von Beginn abspielen recommences remets au début recommence recommence au début ricomincia metti dall'inizio vuelve a empezar vuelve al principio vuelve a empezar vuelve al inicio 最初から再生 最初から見せて começar de novo comece de novo start over शुरू से चलाओ |
The media starts over, adjusting the seek position back to the beginning of the media. |
Fast Forward |
Fast Forward Vorspulen avance avances rapide avances avances rapide vai avanti veloce manda avanti veloce avanza avanza adelanta 早送り 早送りして avançar avance forward करो fast forward करो |
The media fast-forwards 10 seconds. |
Rewind |
Rewind Zurückspulen Rückspulen reviens en arrière recule rewind riavvolgi manda indietro rebobina retrocede retrocédele 巻き戻し 巻き戻して voltar volte rewind rewind करो |
The media rewinds 10 seconds. |
Previous |
Previous Zurück vorherige/vorherigen précédent prédédent précédente precedente anterior anterior 戻って 戻る anterior o/a anterior previous previous चलाओ |
The previous episode plays. If this isn't possible, the user is taken to whatever was earlier in the current playlist. |
Next |
Next Weiter nächste / nächsten suivant suivant suivante successivo / successiva siguiente siguiente la/el que sigue 進んで 次 próximo o próximo next next चलाओ |
The next episode plays. If this isn't possible, the user is taken to whatever is next in the current playlist. |
As with other directives, when you receive a Discover
directive, you must specify the PlaybackController
capabilities that your video skill supports.
Handling PlaybackController Directives
There are several types of directives that the PlaybackController
interface sends, each described in the following sections.
Pause Directives
After saying "Alexa, watch Interstellar," say "Alexa, pause." You will see this directive in your Lambda. This should take the same action as if the user had pressed the "pause" button on the remote.
Example
{
"directive": {
"header": {
"namespace": "Alexa.PlaybackController",
"name": "Pause",
"messageId": "abc-123-def-456",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "access-token-from-skill"
},
"endpointId": "VSKTV",
"cookie": {
}
},
"payload": {}
}
}
Play Directives
After saying "Alexa, watch Interstellar," say "Alexa, pause." Then, say "Alexa, play." You will see this directive in your Lambda. This should take the same action as if the user had pressed the "play" button on the remote.
Example
{
"directive": {
"header": {
"namespace": "Alexa.PlaybackController",
"name": "Play",
"messageId": "abc-123-def-456",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "access-token-from-skill"
},
"endpointId": "VSKTV",
"cookie": {
}
},
"payload": {
}
}
}
Stop Directives
Request to stop playback of audio or video content.
Example
{
"directive": {
"header": {
"namespace": "Alexa.PlaybackController",
"name": "Stop",
"messageId": "abc-123-def-456",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "access-token-from-skill"
},
"endpointId": "VSKTV",
"cookie": {
}
},
"payload": {
}
}
}
Resume Directives
After saying "Alexa, watch Interstellar," say "Alexa, pause." Then, say "Alexa, resume." You will see this directive in your Lambda. This should take the same action as if the user had unpaused playback through their remote (that is, pressing the "play" button after having already paused playback earlier).
Next Directives
While watching content, say "Alexa, next." This command should take the user to the next episode. If that's not possible, it should take the user to the next related video content that you choose to show the viewer (or whatever's next in the playlist you choose to use).
Example
{
"directive": {
"header": {
"namespace": "Alexa.PlaybackController",
"name": "Next",
"messageId": "abc-123-def-456",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "access-token-from-skill"
},
"endpointId": "VSKTV",
"cookie": {
}
},
"payload": {
}
}
}
Previous Directives
While watching content, say "Alexa, previous." This command should take the user to the previous episode. If that's not possible, take the user to whatever was earlier in the playlist you choose to use.
Example
{
"directive": {
"header": {
"namespace": "Alexa.PlaybackController",
"name": "Previous",
"messageId": "abc-123-def-456",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "access-token-from-skill"
},
"endpointId": "VSKTV",
"cookie": {
}
},
"payload": {
}
}
}
Fast-Forward Directives
When a user says "Alexa, fast forward," fast-forward playback by 30 seconds. Do not take the user to a fast-forward screen with a slowly moving cursor as if they were fast forwarding via the remote. We do not want to put the user in a position of having to say "Alexa, play" after having already requested to fast-forward via voice. Our user research has shown that users prefer to simply fast forward 30 seconds and resume playback automatically when they use this command. If they want to fast forward more, they can use the SeekController Directives.
Example
{
"directive": {
"header": {
"namespace": "Alexa.PlaybackController",
"name": "FastForward",
"messageId": "abc-123-def-456",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "access-token-from-skill"
},
"endpointId": "VSKTV",
"cookie": {
}
},
"payload": {
}
}
}
Rewind Directives
When a user says "Alexa, rewind," rewind playback by 30 seconds. Do not take the user to a rewind screen with a slowly moving cursor as if they were rewinding via the remote. We do not want to put the user in a position of having to say "Alexa, play" after having already requested to rewind via voice. Our user research has shown that users prefer to simply rewind 30 seconds and resume playback automatically when they use this command. If they want to rewind more, they can use the SeekController Directives.
Example
{
"directive": {
"header": {
"namespace": "Alexa.PlaybackController",
"name": "Rewind",
"messageId": "c8d53423-b49b-48ee-9181-f50acedf2870",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "access-token-from-skill"
},
"endpointId": "VSKTV",
"cookie": {
}
},
"payload": {
}
}
}
StartOver Directives
A request to start playback from the beginning of the audio or visual content.
Example
{
"directive": {
"header": {
"namespace": "Alexa.PlaybackController",
"name": "StartOver",
"messageId": "abc-123-def-456",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "access-token-from-skill"
},
"endpointId": "VSKTV",
"cookie": {
},
"payload": {}
}
}
}
Example Response
Send a response back to Alexa when you receive a transport control directive from the PlaybackController
interface.
Example Response
{
"context": {
"properties": []
},
"event": {
"header": {
"messageId": "abc-123-def-456",
"namespace": "Alexa",
"name": "Response",
"payloadVersion": "3"
},
"endpoint":{
"endpointId":"VSKTV"
},
"payload":{ }
}
}
Declaring Capability Support for this Interface
To indicate that your video skill supports the Alexa.PlaybackController
interface, you must indicate support for it in your response to the Discover
directive sent through the Alexa.Discovery
interface. More details are provided in Alexa.Discovery
.
Error Response
If you cannot complete the customer request for some reason, reply with an error. See Error Handling for more details.
Additional Sample Code
See the sample request and response messages in the Alexa smart home GitHub repo: PlaybackController
.