I’m trying to figure out how to play iHeartRadio streams on Chromecast. I have the initial stream URL: https://stream.revma.ihrhls.com/zc3949/hls.m3u8
But I can’t seem to get this to play properly. I’ve used the media_player.play_media service, url being the ID and type? I tried channel, music, playlist, but nothing seems to enable it to play.
I have verified this URL works via VLC player. But it doesn’t work on iTunes or Chromecast.
Here is what i got done today… the code reveals the URL’s i discovered and am now using. Took a little bit of playing around with the browser “inspect element > Network” to find the streams… unfortunately streams without a .aac extenstion take about 60 seconds to start, but they do start. *ok achievement for a few hours playing… i hope it helps you.
Sorry all for the way the code was posted first time round… would have been completely useless to anyone who has trouble with indentations in yaml like i do.
Please note i group my speakers to a main speaker “Home Audio Speakers” by creating a group in Google home app and then syncing all my devices between HA and Google.
Sorry to dig up old thread but came across this when experiencing the same issue. I had even manually written some python code with pychromecast to check if it was some funny home assistant thing, and that also failed with some unhelpful message.
The card from @automation_noob unfortunately wasn’t helpful as I didn’t have the custom:mini-media-player type card but I noticed in the example URLs some differences with what I was trying to use.
Using the same method as mentioned above (open stream in browser, view Network to get actual stream URL) gave me the URL https://ais-arn.streamguys1.com/au_006/playlist.m3u8 which I could see in browser would change to https://ais-arn.streamguys1.com/au_006/playlist.m3u8?listeningSessionID=abc123 or similar, and for the life of me couldn’t get it working.
Noticing the URLs from @automation_noob being both http (not https) and not including the actual playlist.m3u8 file I tried http://ais-arn.streamguys1.com/au_006 which didn’t work, but then I added the _icy on the end, and now home assistant can play this stream! Yay no more listening to ABC News (only local station I could get working through home assistant radio player). Guessing there are two different directories on this particular streaming host (eg au_006 and au_006_icy).
Of course this will be very dependent on the stream and where it’s hosted but maybe this will also help someone who stumbles on this or even @guice if you never resolved your issue.