TemplateRuntime 1
The TemplateRuntime
interface exposes directives and events necessary for rendering payloads of the TemplateRuntime
AVS API by the inter-process communication (IPC) client.
Header
{
"namespace": "TemplateRuntime",
"version": 1
}
Directives
Outbound messages from the Alexa client to the IPC client about template runtime cards.
renderPlayerInfo
Directs the IPC client to render a music player template card.
Example message
{ "header": { "version": 1 "namespace": "TemplateRuntime", "name": "renderPlayerInfo" }, "payload": {{TEMPLATE RUNTIME OBJECT}} }
Payload parameters
Parameter | Description | Type |
---|---|---|
payload |
Template object for the RenderPlayerInfo template card. |
object |
renderTemplate
Directs the IPC client to render a template card.
Example message
{ "header": { "version": 1 "namespace": "TemplateRuntime", "name": "renderTemplate" }, "payload": {{TEMPLATE RUNTIME OBJECT}} }
Payload parameters
Parameter | Description | Type |
---|---|---|
payload |
Template object for the RenderTemplate card. |
object |
clearPlayerInfoCard
Directs IPC client to clear a previously rendered music player template card.
Example message
{
"header": {
"version": 1
"namespace": "TemplateRuntime",
"name": "clearPlayerInfoCard"
},
"payload": {}
}
Payload parameters
The payload is an empty object.
clearTemplateCard
Directs IPC client to clear a previously rendered template card.
Example Message
{
"header": {
"version": 1
"namespace": "TemplateRuntime",
"name": "clearTemplateCard"
},
"payload": {}
}
Payload parameters
The payload is an empty object.
Events
Inbound messages from the IPC client to the Alexa client about template runtime cards.
windowIdReport
Send this event to the Alexa client to report the windowId
used in the IPC client to display RenderTemplate
and RenderPlayerInfo
payloads. Use it for presentation orchestration in the Alexa client.
Example Message
{ "header": { "version": 1 "namespace": "TemplateRuntime", "name": "windowIdReport" }, "payload": { "renderTemplateWindowId": "{{STRING}}", "renderPlayerInfoWindowId": "{{STRING}}" } }
Payload parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
The window ID used by the IPC client for presenting Note:
- The window ID must be for a window instance reported to the Alexa client with the WindowManager API.- Only required if the IPC client renders RenderTemplate payloads. |
string |
No |
|
The window ID used by the IPC client for presenting Note:
- The window ID must be for a window instance reported to the Alexa client with the WindowManager API.- Optional override to the global audioPlaybackUIWindowId property reported with the windowInstancesReport event. |
string |
No |
Related topics
Last updated: Sep 22, 2022