spotify-web-playback-sdk-example icon indicating copy to clipboard operation
spotify-web-playback-sdk-example copied to clipboard

Spotify web playback sdk doesn't work with React 18

Open joceqo opened this issue 2 years ago • 1 comments

Well i was trying to implement spotify web sdk on react 18 ( with next 13 and others recent package). i spent an afternoon trying to debug error like

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://sdk.scdn.co') does not match the recipient window's origin ...

and this one https://stackoverflow.com/questions/76097035/spotify-sdk-throwing-this-streamer-is-null-error-when-trying-to-play-or-skip/76283570#76283570

in the end i found that the sdk doesn't work with React 18

joceqo avatar May 18 '23 18:05 joceqo

Just had to work in this myself. Found a fix and posted on StackOverflow - Spotify should still fix this, but in the meantime I believe my fix works.

cameronb23 avatar Dec 15 '23 04:12 cameronb23