【问题标题】:Alexa VideoApp.Launch directive - The target device does not support the specified directiveAlexa VideoApp.Launch 指令 - 目标设备不支持指定的指令
【发布时间】:2017-08-29 19:10:31
【问题描述】:

我正在尝试在我的自定义技能中使用 VideoApp.Launch 指令。因此,我将视频应用的技能信息全局字段设置为 true,并添加了视频播放器所需的意图。

之后我开始使用example from this page 对其进行测试

在我添加视频指令之前,alexa 只是简单地返回输出内容。但添加此目录后,我收到错误:目标设备不支持指定的指令。我找不到任何解决此问题的文档。是否有我错过的设备设置?

更新:我也对 Display.RenderTemplate 进行了尝试,结果相同。错误:目标设备不支持指定的指令。我将音频、渲染模板和视频所需的全局字段设置为 true。

我目前检查的是:msg.context.System.device.supportedInterfaces

    "supportedInterfaces": {
      "AudioPlayer": {}
    }

我正在使用回声。为什么这里没有其他可用的接口?我怎样才能使它们可用?

我的代码和错误消息如下。

    /**
  *
  * main() will be invoked when you Run This Action
  *
  * @param Cloud Functions actions accept a single parameter, which must be a JSON object.
  *
  * @return The output of this action, which must be a JSON object.
  *
  */
var main = function(msg) {
   var response = {
     version: "1.0",
     response: {
       outputSpeech: {
         type: "PlainText",
         text: "" + 'JSON.stringify(msg.request.intent)' //'.slots.questionContent.value'
       },
       "directives": [
        {
         "type": "VideoApp.Launch",
         "videoItem":
         {
             "source": "https://www.example.com/video/sample-video-1.mp4",
            "metadata": {
                 "title": "Title for Sample Video",
                 "subtitle": "Secondary Title for Sample Video"              
            }
         }
        }    
     ],
     "reprompt": null
     }, "sessionAttributes": null

   };
   return {
     statusCode: 200,
     headers: { "Content-Type": "application/json" },
     body: new Buffer(JSON.stringify(response)).toString("base64")
   };
};

Alexa 历史记录中的错误消息:

【问题讨论】:

    标签: alexa alexa-skill


    【解决方案1】:

    问题是您的设备“Amazon Echo”没有视频显示器。 “亚马逊回声秀”支持以下内容:

        "supportedInterfaces": {
          "Display": {},
          "AudioPlayer": {},
          "VideoApp": {}
        }
    

    更多信息在这里:https://developer.amazon.com/docs/custom-skills/best-practices-for-echo-show-skills.html#parse-supported-interfaces

    【讨论】:

      【解决方案2】:

      其次,您不应该在请求中包含"sessionAttributes": null。文档中也有写。

      注意:shouldEndSession 参数不能包含在 响应,即使值设置为 null。

      https://developer.amazon.com/de/docs/custom-skills/videoapp-interface-reference.html

      【讨论】:

        猜你喜欢
        • 2022-01-15
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-08-26
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多