sjmog / ralyxa

A Ruby framework for interacting with Amazon Alexa.
MIT License
180 stars 24 forks source link

No provision for passing metadata inside directives. #19

Open nidhinsg22 opened 5 years ago

nidhinsg22 commented 5 years ago

I want to show some titles and images while the audio is getting played. If I am able to pass the metadata directives under directives key after audioItem key then it can be done. But I think this gem won't support passing this metadata tag. It only supports normal cards.


"response": {
    "outputSpeech": {},
    "card": {},
    "reprompt": {},
    "shouldEndSession": true,
    "directives": [
      {
        "type": "AudioPlayer.Play",
        "playBehavior": "ENQUEUE",
        "audioItem": {
          "stream": {
            "url": "https://url-of-the-mp3-to-play/audiofile.mp3",
            "token": "1234AAAABBBBCCCCCDDDDEEEEEFFFF",
            "expectedPreviousToken": "9876ZZZZZZZYYYYYYYYYXXXXXXXXXXX",
            "offsetInMilliseconds": 0
          },
          "metadata": {
            "title": "My opinion: how could you diss-a-brie?",
            "subtitle": "Vince Fontana",
            "art": {
              "sources": [
                {
                  "url": "https://url-of-the-skill-image.com/brie-album-art.png"
                }
              ]
            },
            "backgroundImage": {
              "sources": [
                {
                  "url": "https://url-of-the-skill-image.com/brie-background.png"
                }
              ]
            }
          }
        }
      }
    ]
  }