Currently, I am attempting to integrate the Spotify SDK into an Angular application. While I have successfully imported the script from the CDN in index.html, I am encountering difficulties in utilizing it at the component level. It seems like there may be a fundamental step that I am overlooking, such as importing it correctly, as my attempts so far have been unsuccessful.
Although the information provided is limited, my primary query revolves around how to effectively utilize the imported script within a specific component.
Upon trying to employ the SDK at the component level, the following error message was displayed:
Property 'onSpotifyWebPlaybackSDKReady' does not exist on type 'Window & typeof globalThis'
In addition, I came across this source code, which I thought of using as an example to gain further insight into the integration. Despite my lack of understanding regarding its functioning, I noticed the inclusion of the following line in the project's package.json
:
"@types/spotify-web-playback-sdk": "0.1.9",