Hello people.
I'm having a hard time making the playback controller interface to work. I don't know why the following code is never reached (on Cloudwatch I can't see the INFO).
class PlayCommandHandler(AbstractRequestHandler):
def can_handle(self, handler_input):
# type: (HandlerInput) -> bool
return is_request_type("PlaybackController.PlayCommandIssued")(handler_input)
def handle(self, handler_input):
# type: (HandlerInput) -> Response
logger.info("In PlayCommandHandler")
return <AUDIO_PLAYER_DIRECTIVES>
I have it added to skillbuilder:
sb.add_request_handler(PlayCommandHandler())
The code I'm using is based on this one:
I've read many documentation on PlaybackCommand, I know that the pause button on Echo devices treats it locally. But I can't make the play (resume) button work.
I also checked this blog post, but unfortunatelly it's example code is in nodejs.
Other strange thing that I noted on my skill is that the PlaybackStartedHandler also does't register any logs on CloudWatch.
class PlaybackStartedHandler(AbstractRequestHandler):
def can_handle(self, handler_input):
# type: (HandlerInput) -> bool
return is_request_type("AudioPlayer.PlaybackStarted")(handler_input)
def handle(self, handler_input):
# type: (HandlerInput) -> Response
logger.info("In PlaybackStartedHandler")
logger.info("Playback started")
return handler_input.response_builder.response
Isn't it supposed to log "In PlaybackStartedHandler" and "Playback started" when the audio starts?
I would appreciate any help on making the echo show play button work. It's the only thing left to certificate my skill.
Thank you very much!