Alexa VideoApp.Launch指令 - 目标设备不支持指定的指令

问题描述 投票:2回答:2

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

之后我开始用example from this page测试它

在我添加Video指令之前,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")
   };
};

Error Message in Alexa History:

Error Message

alexa alexa-skill
2个回答
2
投票

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

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

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


0
投票

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

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

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

© www.soinside.com 2019 - 2024. All rights reserved.