jovotech / jovo-framework

🔈 The React for Voice and Chat: Build Apps for Alexa, Messenger, Instagram, the Web, and more
https://www.jovo.tech
Apache License 2.0
1.67k stars 310 forks source link

Alexa play audio #352

Closed JordanMontel closed 5 years ago

JordanMontel commented 5 years ago

I'm submitting a...

Current Behavior

When we use audio player of Alexa and we have an empty Artwork image url we have an error and the skill crash.

Using this code :

            this.alexaSkill().audioPlayer()
                .setOffsetInMilliseconds(0)
                .setTitle(data.title)
                .setSubtitle(data.description)
                .addArtwork(data.imageUrl)
                .play(data.audioUrl, 'token')
                .tell(speech);

Error happened when data.imageUrl is empty (even if you have managed this in your addArtwork() method).

Error log

error": {
"type": "INVALID_RESPONSE",
"message": "Validation exception in class: ImageInstance field cannot be null at field url"
}

Your Environment

I have not update yet my project with Jovo CLI 2. Don't know if you change something of Alexa audio code.

jankoenig commented 5 years ago

Hi @JordanMontel, thank you. Will add this to the list for v2.2