Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlaybackController - physical button request api #204

Open
cargoudel opened this issue Mar 25, 2018 · 4 comments
Open

PlaybackController - physical button request api #204

cargoudel opened this issue Mar 25, 2018 · 4 comments

Comments

@cargoudel
Copy link

cargoudel commented Mar 25, 2018

Some devices like the Amazon Tap have physical next and back buttons. Mine don't seem to work at all.
While some buttons like Play/Pause are handed locally on the Tap, others like Next/Skip generate a PlaybackController.NextCommandIssued request (as I understand the documentation).

https://developer.amazon.com/docs/custom-skills/playback-controller-interface-reference.html

Is there a good way to implement these?
I tried adding a line like
@ask.intent('PlaybackController.NextCommandIssued') and the same code as the existing next function.
in playback.py
But I have a feeling I am way off and didn't seem to work.
Is there any easy way to see unhandled requests when running on the cloud with heroku.com?

What is the right way to implement this? Should they already work?
I don't think PlaybackController.NextCommandIssued is automatically mapped to AMAZON.NextIntent.

@fergyfresh
Copy link
Collaborator

It should be in the debug logs of the server as a 4XX/5XX request. I'm looking into it right now and it doesn't seem too hard. It seems like it would be a matter of figuring out if there is a decorator we can leverage or perhaps we'd have to make one if the decorator isn't baked into the base Flask-Ask.

@fergyfresh
Copy link
Collaborator

In the docs that you linked it says its not a DIRECTIVE. The NextIntent however, is most definitely a directive. You can physically see the difference between the two requests by looking at my adds-tests fork play_request request object and comparing it to the request object in the link you provided.

@fergyfresh
Copy link
Collaborator

I unfortunately don't have one of these devices so I couldn't test it personally, but I hope something I said spawns us into some more conversation so I can help you get this functionality in this repo!

@fergyfresh
Copy link
Collaborator

Probably going to require changes to the Flask-Ask code base I think.
https://github.com/johnwheeler/flask-ask/pull/189/files it is very similar to this I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants