TemplateRuntime¶
Outgoing Messages¶
RenderTemplate¶
Provides visual metadata associated with a user request to Alexa.
JSON Structure¶
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "TemplateRuntime",
"action": "RenderTemplate"
}
},
"payload": {
"payload": {{String}},
"focusState": {{FocusState}}
}
}
Payload¶
Property | Type | Required | Description | Example |
---|---|---|---|---|
payload | String | Yes | Renderable template metadata in structured JSON format. | |
focusState | FocusState | Yes | FocusState of the channel used by TemplateRuntime interface. |
ClearPlayerInfo¶
Notifies the platform implementation to dismiss the player info display card.
JSON Structure¶
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "TemplateRuntime",
"action": "ClearPlayerInfo"
}
}
}
ClearTemplate¶
Notifies the platform implementation to dismiss the template display card.
JSON Structure¶
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "TemplateRuntime",
"action": "ClearTemplate"
}
}
}
RenderPlayerInfo¶
Provides visual metadata associated with a user request to Alexa for audio playback.
JSON Structure¶
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "TemplateRuntime",
"action": "RenderPlayerInfo"
}
},
"payload": {
"payload": {{String}},
"audioPlayerState": {{PlayerActivity}},
"offset": {{Int}},
"focusState": {{FocusState}}
}
}
Payload¶
Property | Type | Required | Description | Example |
---|---|---|---|---|
payload | String | Yes | Renderable player info metadata in structured JSON format. | |
audioPlayerState | PlayerActivity | Yes | The state of the AudioPlayer. | |
offset | Int | Yes | The offset in millisecond of the media that AudioPlayer is handling. | |
focusState | FocusState | Yes | FocusState of the channel used by TemplateRuntime interface. |
Incoming Messages¶
DisplayCardCleared¶
Notifies the Engine that a display card has been cleared from the screen. Upon getting this notification, the TemplateRuntime will release the visual channel.
JSON Structure¶
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "TemplateRuntime",
"action": "DisplayCardCleared"
}
}
}
Enums¶
FocusState¶
Values¶
Value | Description |
---|---|
"FOREGROUND" | Represents the highest focus a Channel can have. |
"BACKGROUND" | Represents the intermediate level focus a Channel can have. |
"NONE" | This focus is used to represent when a Channel is not being used. |