Help Wizard

Step 1


Web Playback SDK should work on iOS 13.4+ but it does not

Web Playback SDK should work on iOS 13.4+ but it does not

I'm aware that when it was released, the Web Playback SDK did not support Safari on the desktop or mobile devices due to the lack of support for Encrypted Media Extensions and/or Widevine for DRM.


However, as you can see on the Mozilla developer page here, iOS and macOS finally added support for EME in iOS 13.4 and Safari 13.1 (released in March 2020).


I followed the Quick Start tutorial and was able to get a song to play back in Safari on the desktop, but I can't get it to work inside of a WKWebView on iOS. It says it connected to Spotify correctly and created the player, but when I try to begin playback it pauses and won't resume.


Is there any way to get this working? I know some apps like Noon Pacific have figured it out but I can't find anything publicly documenting how to do this.

2 Replies

It's an interesting use case for sure. We have not tested this scenario but given it is an embedded web view it should behave the same as Safari on iOS? At least that's the theory. 


From your other question I think that's the path forward. Getting it to work in Safari on iOS in itself would be step one. I provided some guidance on how to achieve that. Once it's working in Safari it should in theory work in the embedded view. I'd be keen to hear any updates on this one.

Thanks for your reply! I responded on that other thread and will try to initiate playback with a button.


RE: iOS Playback, I was actually kind-of able to get it to work. A developer open-sourced this JavaScript iPod that uses the Web Playback SDK:


I was able to load this page in Safari and a WKWebView in an iOS app on a device running iOS 14 and initiate playback. However, whenever I backgrounded the app, playback would stop.


I tried setting the AVAudioSession mode to playback and enabling the background audio entitlement but this doesn't seem to apply to WKWebView. I saw some logs about WKWebView (or the process that its content runs in) not having the appropriate entitlements. I'm not sure if you've encountered this before?


Suggested posts