Spotify Iframe

Hello Everybody,

I try to get a iframe with Spotify.
In the left on HA, there is the link to spotify, but the page is white.
I acces HA to SSL. I have also a http link as iframe, and this is good working.
Is there someone how has spotify working on a iframe?

Thanks for the help!

spotify:
  title: 'Spotify'
  icon: mdi:spotify
  url: 'https://www.spotify.com/nl/'
1 Like

Nobody have the same experiance with blanc iframe?

Do you have it like this

spotify:
  title: 'Spotify'
  icon: mdi:spotify
  url: 'https://www.spotify.com/nl/'

of this

panel_iframe:
  spotify:
    title: 'Spotify'
    icon: mdi:spotify
    url: 'https://www.spotify.com/nl/'

Think the bottom version should work for you.

Thanks Dennisaion, i going to try it. I lett you know

@ Dennisaion,

It wonā€™t work, still with screen. Here the complete panel_iframe.yaml
Number one is working well, the other two not, blanc screen.

parkeren:
  title: 'Bezoekersparkeren'
  icon: mdi:car
  url: 'https://parkeerloket.zwolle.nl/DVSPortal/bezoekersapp/www/#/'

kpn:
  title: 'KPN Itv Online'
  icon: mdi:television
  url: 'http://www.itvonline.nl'

spotify:
  title: 'Spotify'
  icon: mdi:spotify
  url: 'https://www.spotify.com/nl/'

Yeah I noticed it as well. Let me dive into this.

Hi!

Iā€™ve done this for an individual playlist, Iā€™m not sure you can put the entire Spotify player in an iframe though.

panel_iframe:
  spotify:
    title: "Spotify"
    url: "https://embed.spotify.com/?uri={{ spotify_playlist_uri }}"

That helped. That made me lookup following.

https://developer.spotify.com/technologies/widgets/spotify-play-button/

Unfortunately it looks like you can only put in specific uris, which gives you a bit of flexibility if you come up with some savvy automationā€¦

nice, thanks, that is working! For a artist or a album:

   spotify:
       title: "Spotify"
       url: "https://open.spotify.com/embed?uri=spotify%3Auser%3A*****username***%3Aplaylist%3A68THPWO8hkSVs1g6LRliJvs"

I have it not yet working to display the whole menu, so i can deside a artist or album.
But it is a stepā€¦ :slight_smile:

Is it possible to play the playlist from a automation, and then send it to att media_player?

I have been unable to do this. I can play individual tracks, but not the entire playlist. :frowning:

Yes, It is possible.

I use this in a script:

 - service: media_player.play_media
   data_template:
     media_content_type: PLAYLIST
     entity_id: media_player.<mediaplayername>
     media_content_id: spotify:user:<username>:playlist:<playlistid>

In this case the media_player is a LMS Player with the Spotify plugin.

Having tried this before, I am unable to replicate your success.

I only get the player to be IDLE.

Uhmm, weird. It works like a charm here.

What is your media player? Itā€™s a Sonos, LMS?? Can you play that playlist directly on it (without HA)??

My media_player is a Google Cast device. Doesnā€™t work on Chromecast Audio or Google Home.

Sidenote: Whatā€™s an LMS?

Sorry,

LMS: Logitech Media Server / SqueezeBox -> https://en.wikipedia.org/wiki/Logitech_Media_Server

Any progress to execute a Spotify playlist on google cast?

Havenā€™t tried, itā€™s become unimportant to me and I havenā€™t seen anything in recent updates to make me want to try again. :frowning:

I know this is an old post, but I had this running and now it doesnā€™t work anymore.

Currently Iā€™m getting the error: ā€œRefused to display ā€˜https://open.spotify.com/ā€™ in a frame because an ancestor violates the following Content Security Policy directive: ā€œframe-ancestors ā€˜noneā€™ā€.ā€