So Iāve started to digg into the given URL on the top. I can login and get the playlists and also narrow it down to the song ID. e.g. O6FrmB81bRU. Pushing that into the browser like https://www.youtube.com/watch?v=O6FrmB81bRU (just an example link) works fine, I get the song, playing on the website, but I canāt pass that link to a chromcast / home / generic device.
Does anyone know how to convert that videoId or even the cypher to a playable link?
JKW
@JKW You can use the media_extractor.play_media to give it the YouTube ID and it will play it for you.
I have a mod for the Cast app to add support for YouTube app and supporting playing videoās like we do via the YouTube controller in pychromecast. it unfortunately will only work with video Chromecast devices. Need to work on building a controller for YouTube Music app but that is a larger challenge.
Additionally If you want to have playlists instead of controlling one song at a time we will need to have the YouTube or YouTube Music App
Hi, media_extractor didnāt work for me ā¦ works fine for regular youtube video IDs but did not work for the Youtube Music IDs.
Iāve written a (somewhat) working version with the help of pytube + ytmusicapi. Still a few kinks to work out, but even āauto track advanceā is working now ā¦ This is based on the great work of @troyhttps://github.com/tprelog/homeassistant-gmusic_player but replaces gmusic with ytube music
I know that this steps is very complicated, Iām considering to create a config flow for this component to ease the file creation. Any other thoughts?
It wasnāt too bad doing this manually (I think it was easier than getting the oauth creds in gmusic_player) but a config flow would be much appreciated for most users.
Please make your repository HACS compatible
For the configuration example, I think you forgot the input_select for the speakers. Also over time, I found it is better to include some sort of default value for the input selects helpers. Please consider the following updated example:
Should already work with custom repository in HACS
Default HACS entry should follow soon, brand and wheel pull_request are submitted
config_flow to import the cookie works here, but setting up the player is apparently above my capabilities, although Iāve written two other config_flow without isses
I canāt wrap my head around the async generation of the YouTube object. Anyone willing to work with me on that?
I was able to get authenticated, I had to read through your const.py to see which headers were needed, then put it in the json format from ytmusicapi link. Copying the whole thing didnāt work.
I am not able to load any playlists, I tried private, unlisted and public but it just shows āloadingā