Alexa.PlaybackController Interface
The PlaybackController interface describes messages that are used to play, stop, and navigate playback for audio or video content.
Discovery
You must specify the directives your endpoint supports when you describe it in your discovery response. You indicate the operations the endpoint supports by including a supportedOperations array.
Supported operations values:
Example discovery response with supportedOperations
{
"event": {
"header": {
"namespace":"Alexa.Discovery",
"name":"Discover.Response",
"payloadVersion":"3",
"messageId":"ff746d98-ab02-4c9e-9d0d-b44711658414"
},
"payload":{
"endpoints":[
{
"capabilities":
[
{
"type": "AlexaInterface",
"interface": "Alexa.PlaybackController",
"version": "3",
"supportedOperations" : ["Play", "Pause", "Stop"]
}
]
...
}
]
}
}
}
Directives
The control and query directives in this interface are supported in skills that target the following languages:
- English (Australia)
- English (Canada)
- English (U.K.)
- English (U.S.)
See Develop Smart Home Skills in Multiple Languages for more information.
FastForward
Request to fast forward the current content.
“Alexa, fast forward on device”
Example Request:
{
"directive": {
"header": {
"namespace": "Alexa.PlaybackController",
"name": "FastForward",
"messageId": "c8d53423-b49b-48ee-9181-f50acedf2870",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "access-token-from-skill"
},
"endpointId": "device-001",
"cookie": {
}
},
"payload": {
}
}
}
Payload details
| Field | Description | Type | Required |
|---|---|---|---|
| None | No required or optional fields in the payload. | N/A | N/A |
Next
Request to go to the next item in content playback.
“Alexa, next song/video/photo on device”
“Alexa, go forward on device”
Example Request:
{
"directive": {
"header": {
"namespace": "Alexa.PlaybackController",
"name": "Next",
"messageId": "c8d53423-b49b-48ee-9181-f50acedf2870",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "access-token-from-skill"
},
"endpointId": "device-001",
"cookie": {
}
},
"payload": {
}
}
}
Payload details
| Field | Description | Type | Required |
|---|---|---|---|
| None | No required or optional fields in the payload. | N/A | N/A |
Pause
Request to pause the playback of audio or video content.
“Alexa, pause device”
Example Request:
{
"directive": {
"header": {
"namespace": "Alexa.PlaybackController",
"name": "Pause",
"messageId": "c8d53423-b49b-48ee-9181-f50acedf2870",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "access-token-from-skill"
},
"endpointId": "device-001",
"cookie": {
}
},
"payload": {}
}
}
Payload details
| Field | Description | Type | Required |
|---|---|---|---|
| None | No required or optional fields in the payload. | N/A | N/A |
Play
Request to play or resume play of audio or video content.
“Alexa, resume device”
“Alexa, play device”
Example Request:
{
"directive": {
"header": {
"namespace": "Alexa.PlaybackController",
"name": "Play",
"messageId": "5f8a426e-01e4-4cc9-8b79-65f8bd0fd8a4",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "access-token-from-skill"
},
"endpointId": "device-001",
"cookie": {
}
},
"payload": {
}
}
}
Payload details
| Field | Description | Type | Required |
|---|---|---|---|
| None | No required or optional fields in the payload. | N/A | N/A |
Previous
Request to go to the previous item in content playback.
“Alexa, go back on device”
{
"directive": {
"header": {
"namespace": "Alexa.PlaybackController",
"name": "Previous",
"messageId": "c8d53423-b49b-48ee-9181-f50acedf2870",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "access-token-from-skill"
},
"endpointId": "device-001",
"cookie": {
}
},
"payload": {
}
}
}
Payload details
| Field | Description | Type | Required |
|---|---|---|---|
| None | No required or optional fields in the payload. | N/A | N/A |
Rewind
Request to rewind the current content.
“Alexa, rewind on device”
Example Request:
{
"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": "device-001",
"cookie": {
}
},
"payload": {
}
}
}
Payload details
| Field | Description | Type | Required |
|---|---|---|---|
| None | No required or optional fields in the payload. | N/A | N/A |
StartOver
A request to start playback from the beginning of the audio or visual content.
“Alexa, start over on device”
Example Request:
{
"directive": {
"header": {
"namespace": "Alexa.PlaybackController",
"name": "StartOver",
"messageId": "c8d53423-b49b-48ee-9181-f50acedf2870",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "access-token-from-skill"
},
"endpointId": "device-001",
"cookie": {
},
"payload": {}
}
}
}
Payload details
| Field | Description | Type | Required |
|---|---|---|---|
| None | No required or optional fields in the payload. | N/A | N/A |
Stop
Request to stop playback of audio or video content.
“Alexa, stop device”
Example Request:
{
"directive": {
"header": {
"namespace": "Alexa.PlaybackController",
"name": "Stop",
"messageId": "c8d53423-b49b-48ee-9181-f50acedf2870",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "access-token-from-skill"
},
"endpointId": "device-001",
"cookie": {
}
},
"payload": {
}
}
}
Payload details
| Field | Description | Type | Required |
|---|---|---|---|
| None | No required or optional fields in the payload. | N/A | N/A |
Properties and Events
For this interface, you must reply:
- Synchronously, which means you send a Response to Alexa from the Lambda function.
When you send a Response, you should include the state of reportable properties in the context of the message.
Reportable Properties
The Alexa.PlaybackController interface doesn’t define any reportable properties at this time.
Response
If any of the directives in this interface successfully complete, you should send a response event.
Example Response
{
"context": {
"properties": []
},
"event": {
"header": {
"messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
"namespace": "Alexa",
"name": "Response",
"payloadVersion": "3"
},
"endpoint":{
"endpointId":"appliance-001"
},
"payload":{ }
}
}
ErrorResponse
You should reply with an error if you cannot complete the customer request for some reason. See Error.Response for more details.
Additional Sample Code
See the sample request and response messages in the Alexa smart home GitHub repo:
Related Interfaces
| Interface | Description |
|---|---|
| Alexa.RemoteVideoPlayer | Provides directives for searching and playing content. |