-
Notifications
You must be signed in to change notification settings - Fork 212
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
AudioPlayer functionality #88
Conversation
Alright, sorry for all the failed merges / coverage issues. |
@wschaeferiii Nice work here, exactly what I needed. You mentioned being able to play "long form audio", but I noticed that Alexa will continually loop a single section of an HLS live playlist instead of retrieving new segments. Have you experienced this? Are there additional flags to be set and/or intents to handle refreshing a live stream? |
@chrisdeely Have you tried listening on the request with type |
This looks good. It needs a README and CHANGELOG update, please. |
@wschaeferiii Thank you for working on this! AudioPlayer interface is really useful! What about adding a method like I imagine the code would be similar to |
@fremail I think that would be better. Want to try an alternate implementation? |
@wschaeferiii Using code from your branch I got an error. I have an app uploaded to Lambda. The error is caused on getting
I logged the
Though I think code from master has the same error. |
It seems the problem is in this:
|
Closed via https://github.com/matt-kruse/alexa-app/pull/92, thanks @fremail for finishing this! |
Added Audioplayer functionality to the alexa-app library.
Simply write
response.audioPlayerPlay(url, token, playBehavior, offsetInMilliseconds, expectedPreviousToken)
and you can play long form audio URL requests with a given url and token.playBehavior
defaults to"ENQUEUE_ALL"
, andoffsetInMilliseconds
defaults to 0, andexpectedPreviousToken
defaults toundefined
.Also, added is
response.audioPlayerStop()
andresponse.audioPlayerClearQueue(clearBehavior)
whereclearBehavior
defaults to"CLEAR_ALL"
.The request's
context
object is required in long form audio requests since the session object is not included once the player begins playing, but is copied from the request'ssession
object.