mozilla-extensions / firefox-voice

Firefox Voice is an experiment in a voice-controlled web user agent
Mozilla Public License 2.0
287 stars 121 forks source link

Enable YouTube Music as music service #858

Open firefoxvoiceissuebot opened 4 years ago

firefoxvoiceissuebot commented 4 years ago

Issue Type: Doesn't behave as expected Firefox Version: Mozilla/5.0 (X11; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0 Device: Acer Aspire A515-51G Location: BULGARIA GitHub Username: @liubomirwm

Steps to Reproduce

1) Say "Play YouTube Music"

Expected Behavior

Opens YouTube Music and plays the "Your Mix" endless mix

Actual Behavior

Currently opens Spotify and searches inside it for a song named "Youtube Music"

GangaChatrvedi commented 4 years ago

@ianb Youtube music does not seem to have "Your mix" as default so can you please explain what am I supposed to do in this case.

awallin commented 4 years ago

We should probably gracefully handle "Play " when no artist or song has been specified. I expect the user expects to have music played but it's not clear what they want to hear and the options will vary by platform.

I propose opening the services home page and trying to play the first playlist on the page. For example in YouTube Music I see 'Top 100 music' as the first playlist and on Spotify I see a series of 'Made for abe' playlists.

If a login is required we should prompt the user in the doorhanger to login.

mystiquewolf commented 4 years ago

I'm not sure it's a constant URL, but it might be.

If you are logged in to YouTube Music, visit https://music.youtube.com/watch?playlist=RDDM and see if it loads the "Your mix" playlist. I have sent feedback to YouTube to make their playlists with permalinks.

ianb commented 4 years ago

Actually the "right" thing to do here would be to add music.youtube.com as a new service, like Spotify or SoundCloud. Then "Play YouTube Music" would invoke the music.unpause intent (the phrase (unpause | continue | play | resume) [service:musicServiceName])

GangaChatrvedi commented 4 years ago

Thanks @ianb

@liubomirwm https://music.youtube.com/watch?playlist=RDDM does not load "Your mix" playlist so I think I should play first playlist on the page as @awallin suggested.

GangaChatrvedi commented 4 years ago

@ianb can you please asign this issue to me.

GangaChatrvedi commented 4 years ago

@ianb I was drafting PR for this but was not able to create selector so I was thinking can I use XPath for selectors. I am using XPath for now and it is working fine. Should I continue with this?

awallin commented 4 years ago

A new request for YouTube Music support https://github.com/mozilla/firefox_voice_community/issues/392