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.68k stars 309 forks source link

Change metadata streaming #889

Closed zigou13 closed 3 years ago

zigou13 commented 3 years ago

I'm submitting a...

Your Environment

Hello, is it possible to change on a streaming stream the setTitle () and setSubtitle () to update the songs live API ?

aswetlow commented 3 years ago

Hey @zigou13

Need more context here. Are you using the Alexa Audioplayer?

zigou13 commented 3 years ago

Hello @aswetlow Yes I am using Alexa Audioplayer, I want to update setTitle () and setSubtitle VIA API PHP. is it possible to update both functions?

aswetlow commented 3 years ago

I'm not sure I understand this correctly. You set the metadata before you call the play function

https://www.jovo.tech/docs/v1/amazon-alexa/audioplayer#set-track-metadata

this.alexaSkill().audioPlayer()
    .setTitle('First Track')
    .setSubtitle('A simple subtitle')
    .addArtwork('https://www.somewhere.com/image.png')
    .addBackgroundImage('https://www.somewhere.com/background.jpg')
    // The above method calls need to be before play()
    .play(url, token);

What do you mean by "API PHP"?

zigou13 commented 3 years ago

I have found my answer, for the moment this is not possible. https://forums.developer.amazon.com/questions/233299/updating-audioplayer-interface-metadata-while-play-1.html