【发布时间】: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