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.

{
    "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

renderTemplateWindowId

The window ID used by the IPC client for presenting TemplateRuntime RenderTemplate payloads.

string

No

renderPlayerInfoWindowId

The window ID used by the IPC client for presenting TemplateRuntime RenderPlayerInfo payloads.

string

No


Was this page helpful?

Last updated: Sep 22, 2022