我正在尝试在我的自定义技能中使用 VideoApp.Launch 指令。因此,我将视频应用程序的技能信息全局字段设置为 true,并添加了视频播放器所需的意图。
之后我开始用 example from this page 来测试它
在添加 Video 指令之前,alexa 很简单地返回输出内容。但添加此目录后,我收到错误:目标设备不支持指定的指令。我找不到任何解决此问题的文档。是否有我错过的设备设置?
更新:我也尝试了 Display.RenderTemplate 并得到了相同的结果。错误:目标设备不支持指定的指令。我将音频、渲染模板和视频所需的全局字段设置为 true。
到目前为止我检查的是:msg.context.System.device.supportedInterfaces
"supportedInterfaces": {
"AudioPlayer": {}
}
我正在使用回声。为什么这里没有其他可用的接口(interface)?我怎样才能让它们可用?
我的代码和错误消息如下。
/**
*
* 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 历史记录中的错误消息:
最佳答案
问题是您的设备“Amazon Echo”没有视频显示屏。 “Amazon Echo Show”支持以下内容:
"supportedInterfaces": {
"Display": {},
"AudioPlayer": {},
"VideoApp": {}
}
关于alexa-skills-kit - Alexa VideoApp.Launch 指令 - 目标设备不支持指定的指令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45946690/