Jovo Alexa 视频 onEnd 事件?

Jovo Alexa video onEnd event?

我正在尝试使用 Jovo 和 Alexa 的新 APL 播放视频。我 运行 遇到的问题是 Alexa 文档说他们可以收听 onEnd 事件,但它似乎没有触发?

https://developer.amazon.com/docs/alexa-presentation-language/apl-video.html#on-end

const handler = {

  ON_REQUEST()
  {
    console.log("Not Getting Here");
  },

  ON_ELEMENT_SELECTED()
  {
    console.log("not getting here either");
  }
}

这是我的 APL 文档的样子

{
    "type": "APL",
    "version": "1.0",
    "theme": "dark",
    "import": [],
    "resources": [],
    "styles": {},
    "layouts": {
        "videoContainer": {
            "item": [
                {
                    "type": "Container",
                    "width": "100%",
                    "height": "100%",
                    "direction": "column",
                    "items": [
                        {
                            "type": "Video",
                            "source": "https://myUrl/SampleVideo_1280x720.mp4",
                            "autoplay": true,
                            "width": "100%",
                            "height": "100%",
                            "onEnd": [
                                {
                                    "type": "SendEvent",
                                    "arguments": [
                                        "work?"
                                    ]
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    },
    "mainTemplate": {
        "item": [
            {
                "type": "videoContainer"
            }
        ]
    }
}

视频最后也挂了,好像是技能超时了? 我不确定这是否是 Alexa 的 APL 处理视频的方式,或者这可能是问题的征兆。

非常感谢任何帮助!

编辑: 这就是它在 Jovo 中的实现方式,这就是为什么我认为 APL 文档可能是问题所在。 https://github.com/jovotech/jovo-framework/blob/5544dc587c8c344a133e1a4b2cb659b4319954b4/jovo-integrations/jovo-platform-alexa/src/modules/Display.ts#L154

正如在 Jovo Framework GitHub Repository 上的一个问题中所讨论的,发送响应时必须使用 this.ask 而不是 this.tell,这样会话就不会关闭。

Learn more about sessions in the Jovo Docs.