<?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: Any way to stop the Spotify player (embed) when the user scrolls the website page? in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Any-way-to-stop-the-Spotify-player-embed-when-the-user-scrolls/m-p/5620292#M10242</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Is this feature no longer supported?&lt;/P&gt;</description>
    <pubDate>Tue, 08 Aug 2023 11:24:41 GMT</pubDate>
    <dc:creator>Galina777</dc:creator>
    <dc:date>2023-08-08T11:24:41Z</dc:date>
    <item>
      <title>Any way to stop the Spotify player (embed) when the user scrolls the website page?</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Any-way-to-stop-the-Spotify-player-embed-when-the-user-scrolls/m-p/5502612#M7924</link>
      <description>&lt;P&gt;Does anyone know of a way to stop the Spotify player (embed) when the user scrolls the website page?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;We have this code working now:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Get a reference to the embed iframe element
const spotifyEmbedWindow = document.querySelector('iframe[src*="spotify.com/embed"]').contentWindow;

spotifyEmbedWindow.postMessage({command: 'toggle'}, '*');&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, if the user has manually paused the player, it will start to play when the user scrolls.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a way to fully STOP or PAUSE the music instead of TOGGLING?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help here is appreciated.&lt;BR /&gt;Erica&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 16:01:18 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Any-way-to-stop-the-Spotify-player-embed-when-the-user-scrolls/m-p/5502612#M7924</guid>
      <dc:creator>ecinelli</dc:creator>
      <dc:date>2023-02-09T16:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Any way to stop the Spotify player (embed) when the user scrolls the website page?</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Any-way-to-stop-the-Spotify-player-embed-when-the-user-scrolls/m-p/5510021#M8098</link>
      <description>&lt;P&gt;Hi Erica,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm an engineer working on the Spotify embed player and we have now added "pause" command to the iframe API.&lt;/P&gt;&lt;P&gt;Please try the following code and let us know if it works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;spotifyEmbedWindow.postMessage({command: 'pause'}, '*');&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2023 09:12:23 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Any-way-to-stop-the-Spotify-player-embed-when-the-user-scrolls/m-p/5510021#M8098</guid>
      <dc:creator>sushants</dc:creator>
      <dc:date>2023-02-23T09:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Any way to stop the Spotify player (embed) when the user scrolls the website page?</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Any-way-to-stop-the-Spotify-player-embed-when-the-user-scrolls/m-p/5596149#M9618</link>
      <description>&lt;P&gt;Thanks I tried toggle and it works! Is there a full list of the commands that can be used with postMessage?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 18:35:33 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Any-way-to-stop-the-Spotify-player-embed-when-the-user-scrolls/m-p/5596149#M9618</guid>
      <dc:creator>graphen_devs</dc:creator>
      <dc:date>2023-06-14T18:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Any way to stop the Spotify player (embed) when the user scrolls the website page?</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Any-way-to-stop-the-Spotify-player-embed-when-the-user-scrolls/m-p/5620243#M10240</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Is this feature no longer supported?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 09:32:04 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Any-way-to-stop-the-Spotify-player-embed-when-the-user-scrolls/m-p/5620243#M10240</guid>
      <dc:creator>Galina777</dc:creator>
      <dc:date>2023-08-08T09:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Any way to stop the Spotify player (embed) when the user scrolls the website page?</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Any-way-to-stop-the-Spotify-player-embed-when-the-user-scrolls/m-p/5620292#M10242</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Is this feature no longer supported?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 11:24:41 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Any-way-to-stop-the-Spotify-player-embed-when-the-user-scrolls/m-p/5620292#M10242</guid>
      <dc:creator>Galina777</dc:creator>
      <dc:date>2023-08-08T11:24:41Z</dc:date>
    </item>
  </channel>
</rss>

