<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Iframe api doesn't play since some days in App &amp; Features</title>
    <link>https://community.spotify.com/t5/App-Features/Iframe-api-doesn-t-play-since-some-days/m-p/5623019#M13758</link>
    <description>&lt;P&gt;Same here, since a few days,&amp;nbsp;EmbedController play controls does nothing at all, tested on several browsers. This is true even if the frame is not in preview mode.&lt;/P&gt;&lt;P&gt;Here is a small adaptation of the tutorial from&amp;nbsp;&lt;A href="https://developer.spotify.com/documentation/embeds/tutorials/using-the-iframe-api" target="_blank" rel="noopener"&gt;https://developer.spotify.com/documentation/embeds/tutorials/using-the-iframe-api&lt;/A&gt;&amp;nbsp;to reproduce the 'togglePlay' issue :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;html&amp;gt;

&amp;lt;head&amp;gt;
  &amp;lt;style&amp;gt;
    body {
      display: flex;
      gap: 1rem;
    }

    .episodes {
      display: flex;
      flex-direction: column;
    }

    .episode {
      min-width: max-content;
      margin-bottom: .8rem;
      padding: .8rem 1rem;
      border-radius: 10px;
      border: 0;
      background: #191414;
      color: #fff;
      cursor: pointer;
    }

    .episode:hover {
      background: #1Db954;
    }

  &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
  &amp;lt;div class="episodes"&amp;gt;
    &amp;lt;button class="episode" data-spotify-id="spotify:episode:7makk4oTQel546B0PZlDM5"&amp;gt;
      My Path to Spotify: Women in Engineering
    &amp;lt;/button&amp;gt;
    &amp;lt;button class="episode" data-spotify-id="spotify:episode:43cbJh4ccRD7lzM2730YK3"&amp;gt;
      What is Backstage?
    &amp;lt;/button&amp;gt;
    &amp;lt;button class="episode" data-spotify-id="spotify:episode:6I3ZzCxRhRkNqnQNo8AZPV"&amp;gt;
      Introducing Nerd Out@Spotify
    &amp;lt;/button&amp;gt;
    &amp;lt;button id="control"&amp;gt;
      Toggle Play
    &amp;lt;/button&amp;gt;
  &amp;lt;/div&amp;gt;

  &amp;lt;div id="embed-iframe"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;script src="https://open.spotify.com/embed-podcast/iframe-api/v1" async&amp;gt;
  &amp;lt;/script&amp;gt;
  &amp;lt;script type="text/javascript"&amp;gt;
    window.onSpotifyIframeApiReady = (IFrameAPI) =&amp;gt; {
      const element = document.getElementById('embed-iframe');
      const options = {
        width: '100%',
        height: '200',
        uri: 'spotify:episode:7makk4oTQel546B0PZlDM5'
      };
      const callback = (EmbedController) =&amp;gt; {
        document.querySelectorAll('.episode').forEach(
          episode =&amp;gt; {
            episode.addEventListener('click', () =&amp;gt; {
              EmbedController.loadUri(episode.dataset.spotifyId)
            });
          });
        document.getElementById('control').addEventListener('click', () =&amp;gt; {
            console.log("Toggle play on EmbedController")
            EmbedController.togglePlay();
          });
      };
      IFrameAPI.createController(element, options, callback);
    };
  &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 15 Aug 2023 09:32:49 GMT</pubDate>
    <dc:creator>Trikto</dc:creator>
    <dc:date>2023-08-15T09:32:49Z</dc:date>
    <item>
      <title>Iframe api doesn't play since some days</title>
      <link>https://community.spotify.com/t5/App-Features/Iframe-api-doesn-t-play-since-some-days/m-p/5618225#M13584</link>
      <description>&lt;P&gt;Since some days my iframe player is not working.&lt;/P&gt;&lt;P&gt;I embedded a pause and play functionality.&lt;/P&gt;&lt;P&gt;But since some days the play(); function doesn't work on the api.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's a message 'encrypted media access has been blocked...'.&lt;/P&gt;&lt;P&gt;The play(); and pause(); function doesn't work.&lt;/P&gt;&lt;P&gt;'encrypted-media' is allowed.&lt;/P&gt;&lt;P&gt;It plays only in preview mode!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you assist?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 12:55:20 GMT</pubDate>
      <guid>https://community.spotify.com/t5/App-Features/Iframe-api-doesn-t-play-since-some-days/m-p/5618225#M13584</guid>
      <dc:creator>Highlight-Concerts</dc:creator>
      <dc:date>2023-08-03T12:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Iframe api doesn't play since some days</title>
      <link>https://community.spotify.com/t5/App-Features/Iframe-api-doesn-t-play-since-some-days/m-p/5620713#M13668</link>
      <description>&lt;P&gt;We got the same issue, can't get the spotify controller to control the iframed song. Anyone from Spotify around to shine some light? Is the&amp;nbsp;EmbedController.play()&amp;nbsp;function still supported?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 10:04:15 GMT</pubDate>
      <guid>https://community.spotify.com/t5/App-Features/Iframe-api-doesn-t-play-since-some-days/m-p/5620713#M13668</guid>
      <dc:creator>florinTAP</dc:creator>
      <dc:date>2023-08-09T10:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Iframe api doesn't play since some days</title>
      <link>https://community.spotify.com/t5/App-Features/Iframe-api-doesn-t-play-since-some-days/m-p/5623019#M13758</link>
      <description>&lt;P&gt;Same here, since a few days,&amp;nbsp;EmbedController play controls does nothing at all, tested on several browsers. This is true even if the frame is not in preview mode.&lt;/P&gt;&lt;P&gt;Here is a small adaptation of the tutorial from&amp;nbsp;&lt;A href="https://developer.spotify.com/documentation/embeds/tutorials/using-the-iframe-api" target="_blank" rel="noopener"&gt;https://developer.spotify.com/documentation/embeds/tutorials/using-the-iframe-api&lt;/A&gt;&amp;nbsp;to reproduce the 'togglePlay' issue :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;html&amp;gt;

&amp;lt;head&amp;gt;
  &amp;lt;style&amp;gt;
    body {
      display: flex;
      gap: 1rem;
    }

    .episodes {
      display: flex;
      flex-direction: column;
    }

    .episode {
      min-width: max-content;
      margin-bottom: .8rem;
      padding: .8rem 1rem;
      border-radius: 10px;
      border: 0;
      background: #191414;
      color: #fff;
      cursor: pointer;
    }

    .episode:hover {
      background: #1Db954;
    }

  &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
  &amp;lt;div class="episodes"&amp;gt;
    &amp;lt;button class="episode" data-spotify-id="spotify:episode:7makk4oTQel546B0PZlDM5"&amp;gt;
      My Path to Spotify: Women in Engineering
    &amp;lt;/button&amp;gt;
    &amp;lt;button class="episode" data-spotify-id="spotify:episode:43cbJh4ccRD7lzM2730YK3"&amp;gt;
      What is Backstage?
    &amp;lt;/button&amp;gt;
    &amp;lt;button class="episode" data-spotify-id="spotify:episode:6I3ZzCxRhRkNqnQNo8AZPV"&amp;gt;
      Introducing Nerd Out@Spotify
    &amp;lt;/button&amp;gt;
    &amp;lt;button id="control"&amp;gt;
      Toggle Play
    &amp;lt;/button&amp;gt;
  &amp;lt;/div&amp;gt;

  &amp;lt;div id="embed-iframe"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;script src="https://open.spotify.com/embed-podcast/iframe-api/v1" async&amp;gt;
  &amp;lt;/script&amp;gt;
  &amp;lt;script type="text/javascript"&amp;gt;
    window.onSpotifyIframeApiReady = (IFrameAPI) =&amp;gt; {
      const element = document.getElementById('embed-iframe');
      const options = {
        width: '100%',
        height: '200',
        uri: 'spotify:episode:7makk4oTQel546B0PZlDM5'
      };
      const callback = (EmbedController) =&amp;gt; {
        document.querySelectorAll('.episode').forEach(
          episode =&amp;gt; {
            episode.addEventListener('click', () =&amp;gt; {
              EmbedController.loadUri(episode.dataset.spotifyId)
            });
          });
        document.getElementById('control').addEventListener('click', () =&amp;gt; {
            console.log("Toggle play on EmbedController")
            EmbedController.togglePlay();
          });
      };
      IFrameAPI.createController(element, options, callback);
    };
  &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 15 Aug 2023 09:32:49 GMT</pubDate>
      <guid>https://community.spotify.com/t5/App-Features/Iframe-api-doesn-t-play-since-some-days/m-p/5623019#M13758</guid>
      <dc:creator>Trikto</dc:creator>
      <dc:date>2023-08-15T09:32:49Z</dc:date>
    </item>
  </channel>
</rss>

