Announcements

Help Wizard

Step 1

NEXT STEP

Spotify Web SDK - iOS Safari/Chrome Playback Issues (Setting Volume + Activate Element)

Spotify Web SDK - iOS Safari/Chrome Playback Issues (Setting Volume + Activate Element)

Plan

Premium

Country

United States

Device

iPhone 12 Pro Max

Operating System

iOS 15.1

 

My Question or Issue

I've been developing a player using the Spotify Web SDK and testing it out on my iPhone using the Safari and Chrome apps for iOS. I've noticed the following and wanted to check in whether this is the expected behavior because I see no mention of it in the documentation:


- Volume changes using the Web Playback SDK are not working on iOS browsers.
When I change the volume using the Web Playback SDK's setVolume in response to UI events, no volume change is observed. I see the volume bar change on my Mac Spotify client in response to the calls, but the actual volume of the playback in the iOS browser does not change. The setVolume function does work on all desktop and Android device browsers though. Is this the expected behavior for iOS?

- The activateElement method does not work as described in the documentation/reference for iOS browsers:

The activateElement method seems to make no difference when triggered on UI touches, in allowing for deferred playback. If I call activateElement on a button UI touch and then resume/togglePlay a song after a 10 second timeout I'll receive the following error: Authentication Error: Browser prevented autoplay due to lack of interaction. This does not seem to match the behavior described in the reference documentation or in the SDK release blog links listed below. Is this the expected behavior for iOS browsers?

https://developer.spotify.com/documentation/web-playback-sdk/reference/#api-spotify-player-activatee...

https://developer.spotify.com/community/news/2021/09/13/web-playback-sdk-out-of-beta/

Reply
2 Replies

There are new updates on the documentation.
For short, the volume control doesn't in iOS is because of the Apple restriction and the activeElement issue seems to be the out dated documentation.

https://developer.spotify.com/documentation/web-playback-sdk/reference/#api-spotify-player-activatee...
https://developer.spotify.com/documentation/web-playback-sdk/reference/#api-spotify-player-setvolume

 

There are new updates on the documentation.
For short, the volume control doesn't in iOS is because of the Apple restriction and the activeElement issue seems to be the out dated documentation.

https://developer.spotify.com/documentation/web-playback-sdk/reference/#api-spotify-player-activatee...
https://developer.spotify.com/documentation/web-playback-sdk/reference/#api-spotify-player-setvolume

Suggested posts