我第一次在Alexa上工作,我正在开发一个音乐应用程序。我需要添加一位艺术家的多个曲目并连续播放。我无法这样做。但是,一首歌曲工作正常,但无法添加和播放多首歌曲。
这是我的代码,
$response = '{
"version" : "1.0",
"response" : {
"outputSpeech": {
"type": "PlainText",
"text": "Playing song for Acon"
},
'.$card.',
"directives": [
{
"type": "AudioPlayer.Play",
"playBehavior": "REPLACE_ALL",
"audioItem": {
"stream": {
"token": "track1",
"url": "https://p.scdn.co/mp3-preview/9153bcc4d7bef50eb80a809fa34e694f2854e539?cid=null",
"offsetInMilliseconds": 0
}
}
}
],
"shouldEndSession" : true
}
}';