ndg63276/alexa-youtube

Sorry something went wrong - Alexa message

Closed this issue · 5 comments

if-ai commented

It looks it is having a problem with the live videos.
Alexa find the video it says playing JapaNews24 live but then says "Sorry something went wrong"

  1. What are you saying to Alexa?
    Play videos by ANNnews
  2. What video are you trying to play? Please provide the youtube URL.
    https://www.youtube.com/watch?v=coYw-eVU0Ks
  3. Are you running your own lambda instance, or are you using mine? (ie What is your endpoint? Is it "arn:aws:lambda:eu-west-1:175548706300:function:YouTube"?)
    My own
  4. If you are running your own lambda instance, have you uploaded the latest lambda_function.zip file? This changes regularly to fix problems.
    Yes latest from today few hours ago
  5. What language are you using?
    English UK

What hardware do you have? I have a feeling live videos don't work on older Echos.

if-ai commented

Well the good news is, I can reproduce the error. The bad news is, I can't fix it. My skill is providing a URL for Alexa to play (from the original live video), but it doesn't work for some reason. I've tried two different libraries for getting the URL from youtube, but the same thing happens with either.

It only appears to be that live video though, I can get other videos to play, for example, if you set MY_CHANNEL_ID to UCGCZAYq5Xxojl_tSXcVJhiQ, which is ANNnewsCH channel. You can then say "Alexa, ask YouTube to play my latest video" and it will play some the latest video on that channel. (If you change 'audio' to 'video' on line 222 of lambda_function.py, it will play as a video as well).

The reason you get "I wasn't able to play a video", is that YouTube's search API is awful, it can take months to list new playlists. So it doesn't find the playlist you just created. You can test this yourself by going to:

https://www.googleapis.com/youtube/v3/search?part=snippet&channelId={MY_CHANNEL_ID}&q={NAME_OF_PLAYLIST}&type=playlist&key={DEVELOPER_KEY}

(change {MY_CHANNEL_ID} to your channel id, {NAME_OF_PLAYLIST} to the name of your playlist, and {DEVELOPER_KEY} to your google developer key.

if-ai commented
if-ai commented