I'm developing an alexa skill that has an audio player interface, and am unable to pause the audio without leaving the playback screen. I've seen other apps have their alexa pause intent perform the same function as when you touch the pause button on the playback screen, and that is what I would like mine to do as well, but instead it takes me to a blank card with the name of my skill.
Currently I've been testing this on the amazon echo spot, and have been using the audio player stop directive in order to pause the audio as shown below. I don't care about when it was paused or any playback details because the audio I am playing is a stream so that doesn't matter.
const PauseIntentHandler = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'IntentRequest'
&& handlerInput.requestEnvelope.request.intent.name === 'AMAZON.PauseIntent';
},
handle(handlerInput) {
return handlerInput.responseBuilder
.addAudioPlayerStopDirective()
.getResponse();
}
}