<?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 Spotify SDK doesn't seem compatible with SharePoint framework anymore in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-SDK-doesn-t-seem-compatible-with-SharePoint-framework/m-p/5222369#M2727</link>
    <description>&lt;P&gt;We are a team of developers working on a product based on the SharePoint framework. The product we are working on has a couple of API integrations and one of them is Spotify's web player that is implemented using Spotify's Web SDK. A few months back our Spotify SDK-based web player was working fine however recently it has started encountering a serious issue when the page tries to load the SDK using the following CDN path ends up in an issue with the following stack trace.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://sdk.scdn.co/spotify-player.js" target="_blank" rel="noopener"&gt;https://sdk.scdn.co/spotify-player.js&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;spotify-player.js:18 Uncaught TypeError: r.__extends is not a function&lt;BR /&gt;at spotify-player.js:18&lt;BR /&gt;at Object.6.tslib (spotify-player.js:18)&lt;BR /&gt;at s (spotify-player.js:3)&lt;BR /&gt;at spotify-player.js:3&lt;BR /&gt;at Object.7.../enums/errors (spotify-player.js:18)&lt;BR /&gt;at s (spotify-player.js:3)&lt;BR /&gt;at e (spotify-player.js:3)&lt;BR /&gt;at spotify-player.js:3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Plan&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Premium&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Country&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Australia&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Device&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Chrome Desktop browser&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Operating System&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Windows 10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Question or Issue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jun 2021 12:55:17 GMT</pubDate>
    <dc:creator>hasannaqvi</dc:creator>
    <dc:date>2021-06-14T12:55:17Z</dc:date>
    <item>
      <title>Spotify SDK doesn't seem compatible with SharePoint framework anymore</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-SDK-doesn-t-seem-compatible-with-SharePoint-framework/m-p/5222369#M2727</link>
      <description>&lt;P&gt;We are a team of developers working on a product based on the SharePoint framework. The product we are working on has a couple of API integrations and one of them is Spotify's web player that is implemented using Spotify's Web SDK. A few months back our Spotify SDK-based web player was working fine however recently it has started encountering a serious issue when the page tries to load the SDK using the following CDN path ends up in an issue with the following stack trace.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://sdk.scdn.co/spotify-player.js" target="_blank" rel="noopener"&gt;https://sdk.scdn.co/spotify-player.js&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;spotify-player.js:18 Uncaught TypeError: r.__extends is not a function&lt;BR /&gt;at spotify-player.js:18&lt;BR /&gt;at Object.6.tslib (spotify-player.js:18)&lt;BR /&gt;at s (spotify-player.js:3)&lt;BR /&gt;at spotify-player.js:3&lt;BR /&gt;at Object.7.../enums/errors (spotify-player.js:18)&lt;BR /&gt;at s (spotify-player.js:3)&lt;BR /&gt;at e (spotify-player.js:3)&lt;BR /&gt;at spotify-player.js:3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Plan&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Premium&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Country&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Australia&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Device&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Chrome Desktop browser&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Operating System&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Windows 10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Question or Issue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 12:55:17 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-SDK-doesn-t-seem-compatible-with-SharePoint-framework/m-p/5222369#M2727</guid>
      <dc:creator>hasannaqvi</dc:creator>
      <dc:date>2021-06-14T12:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Spotify SDK doesn't seem compatible with SharePoint framework anymore</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-SDK-doesn-t-seem-compatible-with-SharePoint-framework/m-p/5262099#M3243</link>
      <description>&lt;P&gt;I got this error too in Flutter Web, when using this: &lt;A href="https://pub.dev/packages/spotify_sdk" target="_blank" rel="noopener"&gt;https://pub.dev/packages/spotify_sdk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I was able to work around it by downloading spotify-player.js in index.html:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;&amp;lt;script &lt;/SPAN&gt;&lt;SPAN&gt;src&lt;/SPAN&gt;&lt;SPAN&gt;="https://sdk.scdn.co/spotify-player.js"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;  window.onSpotifyWebPlaybackSDKReady = (evt) =&amp;gt; {&lt;BR /&gt;&lt;BR /&gt;  };&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Internally, when calling a spotify_sdk function for the first time, it initializes the Spotify SDK by injecting an onSpotifyWebPlaybackSDKReady function and adding &lt;SPAN&gt;&amp;lt;script &lt;/SPAN&gt;&lt;SPAN&gt;src&lt;/SPAN&gt;&lt;SPAN&gt;="&lt;A href="https://sdk.scdn.co/spotify-player.js" target="_blank" rel="noopener"&gt;https://sdk.scdn.co/spotify-player.js&lt;/A&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt; to the HTML.&lt;/P&gt;&lt;P&gt;Then, it waits until its injected&amp;nbsp;onSpotifyWebPlaybackSDKReady function is called, and then sets an internal flag (&lt;EM&gt;_sdkLoaded&lt;/EM&gt;) to indicate that the SDK has been initialized. Because of the JS error - onSpotifyWebPlaybackSDKReady is never called and spotify_sdk gets stuck in an infinite loop.&lt;/P&gt;&lt;P&gt;However, before spotify_sdk attempts to initialize the SDK, it checks to see if an&amp;nbsp;onSpotifyWebPlaybackSDKReady function had already been installed. If it was - it skips the initialization and directly sets the "SDK loaded" flag.&lt;/P&gt;&lt;P&gt;So the above code seems to fix the issue, but it's important to not call spotify_sdk functions until the Spotify SDK is actually initialized (i.e. because spotify_sdk no longer takes care of that).&lt;/P&gt;</description>
      <pubDate>Sat, 18 Sep 2021 20:21:20 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Spotify-SDK-doesn-t-seem-compatible-with-SharePoint-framework/m-p/5262099#M3243</guid>
      <dc:creator>obeobe</dc:creator>
      <dc:date>2021-09-18T20:21:20Z</dc:date>
    </item>
  </channel>
</rss>

