1

我正在创建一个 Echo Show 技能,可以根据命令播放特定视频。我创建了一个包含 speak 和 playVideo 命令的意图。但是,当提示特定意图时,虽然 Alexa 执行了说话命令,但视频从不播放。相反,该技能以没有错误报告结束。

奇怪的是,当我将 if/else 块移动到我的开始函数时,视频播放正常。据我了解,视频被跳过是因为它是有意图的。由于 videoPlay 命令的意图,我是否缺少/无法启用某些内容?

这是我的意图:

'PlayVideoA'() {
        new Logger(__filename, 'PlayVideoA');
        if (this.event.context.System.device.supportedInterfaces.VideoApp) {
            this.response.playVideo(LINK);
            const message = 'A video should have played';
            this.response.speak(message);
            this.emit(':responseReady');
        } else {
            this.response.speak("The video cannot be played on your device. " +
            "To watch this video, try launching the skill from your echo show device.");
            this.emit(':responseReady');
        }  
    }
4

0 回答 0