Alexa.SeekController Interface
The Alexa.SeekController
interface provides directives to navigate to a specific position in a media item. You should implement this interface for your devices and services that can seek to a specific position. If a device or service can only fast forward or rewind a media item, implement the Alexa.PlaybackController interface instead.
For the list of locales that are supported for the SeekController
interface, see List of Capability Interfaces and Supported Locales.
Directives
AdjustSeekPosition
Requests a relative adjustment to the playback position of a media item.
User: Alexa, skip 30 seconds on device
User: Alexa, springe dreißig Sekunden auf dem Gerät vor
User: Alexa, go back 10 seconds on device
User: Alexa, springe zehn Sekunden auf dem Gerät zurück
Example Request:
{
"directive": {
"header": {
"namespace": "Alexa.SeekController",
"name": "AdjustSeekPosition",
"messageId": "abc-123-def-456",
"payloadVersion": "3"
},
"endpoint": {
"endpointId": "videoDevice-001",
"cookie": {
"key": "value"
},
"scope": {
"type": "BearerToken",
"token": "access-token-from-skill"
}
},
"payload": {
"deltaPositionMilliseconds": -45000
}
}
}
Payload Details
Field | Description | Type | Required |
---|---|---|---|
deltaPositionMilliseconds |
The number of milliseconds, relative to the current seek position, to move forward or backward in playback in the media item. A positive number is used to seek forwards and a negative number is used to seek backwards. If the required position falls outside the duration of the media item, it should be set to the beginning or the end of the item depending on if deltaPositionMilliseconds was negative or positive respectively. |
integer between -86400000 and 86400000 (equivalent to -/+ 24 hrs.) | Yes |
StateReport Event
When the AdjustSeekPosition
successfully completes, you should send a StateReport
event that contains a PositionMilliseconds in the payload of the message.
PositionMilliseconds
is a required property that indicates the current playback position after the deltaPositionMilliseconds
specified in the AdjustSeekPosition
directive is applied. This means PositionMilliseconds
is equal to the previous playback position plus or minus the value of deltaPositionMilliseconds
. The value of positionMilliseconds
should never be negative. If the delta would cause the new playback position to fall below 0, return 0.
For example, if playback is at 00:05:30 (5 minutes and 30 seconds) or 330000 milliseconds, and a customer says, "rewind 30 seconds", Alexa sends an AdustSeekPosition
directive with a deltapositionMilliseconds
value of -30000. The StateReport
response contains a positionMilliseconds
value of 300000, which is equal to the previous position minus the delta.
SeekController
interface currently requires that you return a StateReport
event, which is different than the Alexa.Response
required by other interfaces supported for a video skill.Example StateReport event
{
"event": {
"header": {
"messageId": "d56d5728-ee1e-4a2c-ab72-d7d082840f80",
"name": "StateReport",
"namespace": "Alexa.SeekController",
"payloadVersion": "3"
},
"payload": {
"properties": [{
"name": "positionMilliseconds",
"value": 930000
}]
}
}
}
Payload Details
Field | Description | Type | Required |
---|---|---|---|
positionMilliseconds |
Represents the current position in a media item after any changes are applied. This property contains a single integer value with valid range of 0 to 86400000, inclusive. | integer between 0 and 86400000 | Yes |
Example PositionMilliseconds
{
"name":"positionMilliseconds",
"value": 5000
}
Related Interfaces
Interface | Description |
---|---|
Alexa.PlaybackController | Provides directives for playing and moving around in a set of content; rewinding, fast forwarding and more. |
Alexa.RemoteVideoPlayer | Provides directives for searching and playing content. |