Me and my podcast skill again...
Let's say, the user asks my skill to play episodes about astronomy. My skill fetches those podcast episodes and plays the first.
Alexa tells him: "I will now play episode XYZ from ABC". Great.
User doesn't like that episode and tells Alexa to go to the next episode: "Alexa, next".
My skill fetches the next episode in the playlist it created and Alexa says: "I now play episode ABC from XYZ". Fine, all ok.
Now the user likes the episode and it plays until the end. An AudioPlayer.PlaybackFinished comes along and well, I thought I could handle both cases (NextIntent and AP.PlaybackFinished) with the same code.
But: no! I'm not allowed to include an outputSpeech or card inside the response for the PlaybackFinished. I understand, where that comes from: Music-Playlists (say an album) have ONE cover (card) and Alexa needs only once to tell, which album it plays.
But in my case it's a mixed playlist from podcasts. I'd like to tell the user, what will be played and also I like to include a card with the podcasts logo.
Dear Amazon Developer Team: Please think outside your musicbox. There's more than music :)
But now my real problem: After removing card and outputSpeech I get that error:
[message] => The skill's response must not contain more than 0 AudioPlayer.Play directive(s) for this request type
Ok, now I am confused. I want to play along with the next episode (which works fine for the NextIntent), but I cannot include an Audioplayer.Play directive to continue with the next one?
Here's my response in full:
{ "response": { "card": null, "directives": [ { "audioItem": { "stream": { "offsetInMilliseconds": 0, "token": "episode-1314328-d10c8b49ca6bcba859e80f1747f48272", "url": "https://<removed>" } }, "playBehavior": "REPLACE_ALL", "type": "AudioPlayer.Play" } ], "outputSpeech": null, "reprompt": null, "shouldEndSession": true }, "sessionAttributes": { "episode": { "url": "https://<removed>" } }, "version": "1.0" }
Help!