y-hiraoka / react-spotify-web-playback-sdk

A React wrapper for Spotify Web Playback SDK.
https://react-spotify-web-playback-sdk.vercel.app
MIT License
62 stars 3 forks source link

Safari issues #1

Open philyboysmith opened 2 years ago

philyboysmith commented 2 years ago

Hi there, Great package. Thanks for all your work.

The example doesn't work in Safari on a Mac or on iOS for me. The track immediately pauses? Not sure if this is a known issue with the SDK or not.

y-hiraoka commented 2 years ago

I didn't reproduce the problem in my environment.

Perhaps you are not a Spotify Premium member? WebPlaybackSDK requires a premium membership.

Alternatively, playback in Safari has some limitations (no background playback, etc.)

https://developer.spotify.com/documentation/web-playback-sdk/

StefanLobbenmeier commented 1 month ago

To work around the background playback you have to call activateElement on the spotify player during an UI interaction (like button press): https://developer.spotify.com/documentation/web-playback-sdk/reference#spotifyplayeractivateelement

Maybe this should also be included in the samples in the readme