Skip to main content

htmlResponse

The htmlResponse reply type is used to output the visual component for the skills created using the Interactive Canvas.

Properties

  • updatedState — up-to-date state of the web application. Accepts a JSON object.
  • suppressMic — control device microphone. Accepts true/false; if set to true, the microphone will be muted after the visualization is displayed. An optional property.
  • url — web application URL.

Syntax

{
"type":"htmlResponse", // reply type
"updatedState": "some",
"suppressMic":true|false, // optional property
"url": "appUrl" // optional property
}

Channel restrictions

htmlResponse is only supported in Google Assistant.

How to use

script:
var videolink = getLink("loading.mp4");
var poster = getLink("main_menu.gif");
$response.replies = $response.replies || []
$response.replies.push({
"type":"htmlResponse",
"updatedState": {
"command": "UPDATE_STATE",
"video": videolink,
"poster": poster,
"buttons": [{
title: "Skip"
}]
}
});