Announcements

Help Wizard

Step 1

NEXT STEP

Issue using Widevine DRM (development license) in an Electron app

Issue using Widevine DRM (development license) in an Electron app

Hi,


I started using https://github.com/castlabs/electron-releases/ recently to build an app that uses the Spotify Playback SDK. Supposedly this version of electron comes with a signed development license of Widevine which i've tested on a couple sites like https://shaka-player-demo.appspot.com/demo/ and works fine. 

 

However, when I try to get the playback SDK working with Spotify, only the first few seconds of the song plays before it stops due to a request to `

`https://api.spotify.com/v1/widevine-license/v1/audio/license?exp=1591569937&cp=&tok=xxx` failing. 

 

Does anyone know if Spotify requires a production Widevine license or should a development Widevine license still allow playback of content through the spotify SDK?

 

Thanks

Reply
6 Replies

Hey @pirates19, help's here!

 

First things first, just to make sure, could you check the following items:

  • You have requested the right scopes: ["streaming", "user-read-email", "user-read-private"]
  • Your access token is not expired. Your access token expires in 1 hour. 
  • The Web Playback SDK only works in client-side JavaScript. Node.JS is not supported.

Let me know!

 

Have a good one, happy coding! 

Hubo

HuboSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Hi @hubo,

Thanks for the response. I have required those scopes, and the SDK works perfectly when running the app in a chrome browser (which has licensed Widevine DRM running behind the scenes); however, when running the same app in an electron app window, I get the issues. I noticed this issue was also posted on the SDK's github repo in April (https://github.com/spotify/web-playback-sdk/issues/117), however, Spotify has not acknowledged it yet.

Hey @pirates19, thanks for getting back to me!

 

Hmm, it looks like this could be happening due to the API's limitations. Right now, you can only use this API in Chrome, Firefox, Microsoft Edge and IE. You can't embed this API in an Electron app, just yet. 

 

If this is something you'd like to see I recommend posting this on the Ideas board! That way, Spotify can keep track of it. 🙂

Let me know if you have any questions.

 

Happy coding,

Hubo

HuboSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

hi! i'm having the same problem on web chrome when i try to play a song, strictly following the sdk tutorials so i'm kinda stuck

 

any help is appreciated

thanks!

It sounds like you're experiencing a separate issue because Chrome has a production licensed Widevine DRM built into it that should work out of the box (unlike electron). Maybe check that you aren't missing a scope that you need?

Hey you were absolutely right, thank you so much for your help!

for anyone wondering it worked with this scopes.

Suggested posts