question

newuser-5b3aad76-207f-4003-8023-0a4aa56631b6 avatar image

APL Pause and Resume Handling

Hi,


I'm trying to get to grips with how to manage the pause and resume functionality of Alexa with a video driven skill with APL.

Please see the source code of my skill here, https://github.com/nicktaras/alexa-go-fit


Here's a snippet of the code, where I'm trying to get the video to go into a paused state.


const PauseIntentHandler = {

canHandle(handlerInput) {

return handlerInput.requestEnvelope.request.type === 'IntentRequest'

&& (handlerInput.requestEnvelope.request.intent.name === 'AMAZON.PauseIntent')

},

handle(handlerInput) {

return handlerInput.responseBuilder

.speak("Hello pause")

.addDirective({

type: "Alexa.Presentation.APL.ExecuteCommands",

commands: [

{

id: "videoDisplay",

type: "ControlMedia",

command: "pause"

}

]

})

.withShouldEndSession(false)

.getResponse();

}

}


I did read that you can't use APL ExecuteCommands with video, where I've also followed these guides / code examples with no luck:

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

https://developer.amazon.com/es/docs/custom-skills/videoapp-interface-reference.html

https://developer.amazon.com/docs/alexa-presentation-language/apl-commands-media.html

https://github.com/alexa-labs/skill-sample-nodejs-firetv-vlogs/blob/896f0f4a93293315327a9e12dde65940ce1d3fc6/lambda/custom/videoPlayer.json#L305

Thanks for any help you can provide in getting to the bottom of this issue.

Nick



alexaaplvideo skill apicontroller
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

sungyoo avatar image
sungyoo answered

Hey there, can you explain more on what you are having issues with?

Are you trying to pause by voice or having a pause button so you can press to pause the video?

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.