PlayCommandIssued
事件必须在用户使用客户端上的按钮开始或继续音频播放时上报给精灵服务。
{ "context": [ // This is an array of context objects that are used to communicate the // state of all client components to Alexa. See Context for details. ], "event": { "header": { "namespace": "PlaybackController", "name": "PlayCommandIssued", "messageId": "{{STRING}}" }, "payload": { } } }
此事件需要客户端在上下文对象中上报客户端所有组件的状态。
参数 | 描述 | 型态 |
---|---|---|
messageId | 用以代表一个特定报文的唯一ID。 | 字串 |
此事件应该上报一个空payload。
PauseCommandIssued
事件必须在用户使用客户端上的按钮暂停音频播放时上报给精灵服务。
当 PauseCommandIssued
上报后,客户端必须持续等到直到收到 Stop
指令后才能在本地对音频进行暂停或停止操作。
小技巧:或者可以这样做,客户端可能在本地先暂停音频,接著发送一个 PlaybackStopped
事件给精灵服务。这样可以在没有延迟的情况下直接暂停掉音频。
{ "context": [ // This is an array of context objects that are used to communicate the // state of all client components to Alexa. See Context for details. ], "event": { "header": { "namespace": "PlaybackController", "name": "PauseCommandIssued", "messageId": "{{STRING}}" }, "payload": { } } }
此事件需要客户端在上下文对象中上报客户端所有组件的状态。
参数 | 描述 | 型态 |
---|---|---|
messageId | 用以代表一个特定报文的唯一ID。 | 字串 |
此事件应该上报一个空payload。
NextCommandIssued
事件必须在用户使用客户端上的按钮跳过目前音频时上报给精灵服务。而下一个音频应该要在收到 Play
指令之后才能开始播放。
{ "context": [ // This is an array of context objects that are used to communicate the // state of all client components to Alexa. See Context for details. ], "event": { "header": { "namespace": "PlaybackController", "name": "NextCommandIssued", "messageId": "{{STRING}}" }, "payload": { } } }
此事件需要客户端在上下文对象中上报客户端所有组件的状态。
参数 | 描述 | 型态 |
---|---|---|
messageId | 用以代表一个特定报文的唯一ID。 | 字串 |
此事件应该上报一个空payload。
PreviousCommandIssued
事件必须在用户使用客户端上的按钮跳到前一个音频时上报给精灵服务。
{ "context": [ // This is an array of context objects that are used to communicate the // state of all client components to Alexa. See Context for details. ], "event": { "header": { "namespace": "PlaybackController", "name": "PreviousCommandIssued", "messageId": "{{STRING}}" }, "payload": { } } }
此事件需要客户端在上下文对象中上报客户端所有组件的状态。
参数 | 描述 | 型态 |
---|---|---|
messageId | 用以代表一个特定报文的唯一ID。 | 字串 |
此事件应该上报一个空payload。