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

How do you add a context object to the request to enable audioplayer? #81

Closed
wschaeferiii opened this issue Sep 2, 2016 · 1 comment

Comments

@wschaeferiii
Copy link

With the new long form audio feature utilizing the audio player directives, how do you extend/add a context object to an intent request?

I can add the directives to the response, but the Alexa Skills Kit needs the request object to look like this:

{
"version": "string",
"session": {
"new": true,
"sessionId": "string",
"application": {
"applicationId": "string"
},
"attributes": {
"string": {}
},
"user": {
"userId": "string",
"accessToken": "string"
}
},
"context": {
"System": {
"application": {
"applicationId": "string"
},
"user": {
"userId": "string",
"accessToken": "string"
},
"device": {
"supportedInterfaces": {
"AudioPlayer": {}
}
}
},
"AudioPlayer": {
"token": "string",
"offsetInMilliseconds": 0,
"playerActivity": "string"
}
},
"request": {}
}

Can you use the app.pre() or app.post library features to add the context object seen above?

@dblock
Copy link
Collaborator

dblock commented Dec 16, 2016

I think https://github.com/matt-kruse/alexa-app/pull/88 would resolve this. Closing the issue, see the PR for anything missing.

@dblock dblock closed this as completed Dec 16, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants