{
    "componentChunkName": "component---src-templates-doc-page-js",
    "path": "/docs/en/channels/google_assistant/interactive_canvas/",
    "result": {"data":{"site":{"siteMetadata":{"title":"Gatsby-doc-engine"}},"markdownRemark":{"id":"33aeb585-00d5-5aa9-b4cc-15a151de2896","excerpt":"Interactive Canvas?> Interactive Canvas is a framework based on Google Assistant that can be used to complement a voice skill with a visual component. This…","html":"<h1>Interactive Canvas</h1>\n<hr>\n<p class='warn'><a href=https://developers.google.com/assistant/interactivecanvas target=\"_blank\" rel=\"noopener noreferrer\">Interactive Canvas</a> is a framework based on Google Assistant that can be used to complement a voice skill with a visual component.</p>\n<p>This visual component is a web application the voice Google Assistant accesses during a conversation with a client.</p>\n<p class='tip'>Google terms currently allow publishing gaming skills created using the Interactive Canvas. Such skills must also be validated by the Google reviewer team.</p>\n</br>\n<h3>Devices</h3>\n<p>Interactive Canvas skills are available on:</p>\n<ul>\n<li><a href=\"https://assistant.google.com/platforms/displays/\" target=\"_blank\" rel=\"noopener noreferrer\">Smart displays with Google Assistant</a></li>\n<li>Android-based mobile devices</li>\n</ul>\n<p>When an Interactive Canvas skill is started on a device without a screen, it will function correctly without the visual part.</p>\n</br>\n<h3>Skill operation</h3>\n<p>A skill used by Interactive Canvas consists of two main components:</p>\n<ul>\n<li>A conversation interface of skill script you can create on the JAICP platform.</li>\n<li>A web application with a visual component displayed by the skill to the users on the screen during a conversation. You can use HTML, JavaScript and CSS to create a web application.</li>\n</ul>\n</br>\n<h3>Connecting a web application</h3>\n<p>Specify the link to the web application in the <em>Web app URL</em> field in order to connect it when you create a <a href=\"/1.10.3/docs/en/channels/google_assistant/channel_google_assistant\">Google Assistant</a> channel.</p>\n</br>\n<h3>The script</h3>\n<p>Use <a href=\"/1.10.3/docs/en/bot_answers/about_bot_answers\"><code class=\"language-text\">$response.replies</code></a> with the <a href=\"/1.10.3/docs/en/bot_answers/message_types#htmlresponse\"><code class=\"language-text\">htmlResponse</code></a> type to output the visual component of a skill.</p>\n<p>For example:</p>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\">    <span class=\"token literal-property property\">script</span><span class=\"token operator\">:</span>\n        <span class=\"token keyword\">var</span> videolink <span class=\"token operator\">=</span> <span class=\"token function\">getLink</span><span class=\"token punctuation\">(</span><span class=\"token string\">\"main_scene.mp4\"</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n        <span class=\"token keyword\">var</span> poster <span class=\"token operator\">=</span> <span class=\"token function\">getLink</span><span class=\"token punctuation\">(</span><span class=\"token string\">\"main_menu.gif\"</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n        $response<span class=\"token punctuation\">.</span>replies <span class=\"token operator\">=</span> $response<span class=\"token punctuation\">.</span>replies <span class=\"token operator\">||</span> <span class=\"token punctuation\">[</span><span class=\"token punctuation\">]</span>\n        $response<span class=\"token punctuation\">.</span>replies<span class=\"token punctuation\">.</span><span class=\"token function\">push</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n                <span class=\"token string-property property\">\"type\"</span><span class=\"token operator\">:</span><span class=\"token string\">\"htmlResponse\"</span><span class=\"token punctuation\">,</span>\n                <span class=\"token string-property property\">\"updatedState\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n                    <span class=\"token string-property property\">\"command\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"UPDATE_STATE\"</span><span class=\"token punctuation\">,</span>\n                    <span class=\"token string-property property\">\"video\"</span><span class=\"token operator\">:</span> videolink<span class=\"token punctuation\">,</span>\n                    <span class=\"token string-property property\">\"poster\"</span><span class=\"token operator\">:</span> poster<span class=\"token punctuation\">,</span>\n                    <span class=\"token string-property property\">\"buttons\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span><span class=\"token punctuation\">{</span>\n                        <span class=\"token literal-property property\">title</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Skip\"</span>\n                    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">]</span>\n                <span class=\"token punctuation\">}</span>\n            <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div>","frontmatter":{"title":"","description":null},"headings":[{"value":"Interactive Canvas"}]}},"pageContext":{"slug":"/docs/en/channels/google_assistant/interactive_canvas/","previous":{"fields":{"slug":"/docs/en/channels/google_assistant/jaicf/"},"frontmatter":{"title":"","description":null}},"next":{"fields":{"slug":"/docs/en/channels/google_assistant/google_assistant/"},"frontmatter":{"title":"","description":null}}}},
    "staticQueryHashes": ["1209419333"]}