spotify / web-playback-sdk

This issue tracker is no longer used. Join us in the Spotify for Developers forum for support with the Spotify Web Playback SDK ➡️ https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer
107 stars 7 forks source link

Spotify WebPlayer SDK and Qt #18

Open jgueytat opened 6 years ago

jgueytat commented 6 years ago

Issue found on 08/03/2018.

Scope(s):

user-read-playback-state streaming user-read-birthdate user-read-email user-read-private

Steps to reproduce:

  1. Compile and run https://github.com/jgueytat/UnofficialSpotify on a Sailfish OS device

Expected behaviour:

No error displayed and the application listed as a "Spotify Connect device".

Actual behaviour:

Initialization failed.


The OAuth part is properly done. The Qt WebView starts on this page https://github.com/jgueytat/UnofficialSpotify/blob/master/html/spotify-player.html.in with a proper TOKEN. I should understand now why the initialization failed.

I was able to get the player found on a Spotify Windows application but I have an initialization error :

[D] onMessageReceived:16 - Message received from javascript : {"data":"Failed to initialize player","origin":file:///home/nemo/.local/share/UnofficialSpotify/UnofficialSpotify/spotify-player.html} [D] onMessageReceived:16 - Message received from javascript : {"data":"Ready with Device ID","origin":file:///home/nemo/.local/share/UnofficialSpotify/UnofficialSpotify/spotify-player.html}

I have many of those also :

[D] unknown:0 - "Unexpected reply signature: got \"\", expected \"a{sv}\""

It would be much easier to work on a not uglified spotify-player.js to debug.

Thanks for contacting me! :) Best Regards,

jgueytat commented 6 years ago

Here is an easy to try Qt repository to test the Spotify WebPlayer SDK on desktop. https://github.com/jgueytat/UnofficialSpotify-desktop

hughrawlinson commented 6 years ago

Hi @jgueytat - the Web Playback SDK only works on browsers that support Encrypted Media Extensions. I'm unfamiliar with Qt WebView in Sailfish OS, does the underlying browser have EME support?

jgueytat commented 6 years ago

https://github.com/jgueytat/UnofficialSpotify-desktop

An application with Qt is possible as long you worry to enable the EME. So the problem is just to have a Qt library properly configured which is not the case for Sailfish OS for the moment.

https://together.jolla.com/question/86110/support-for-encrypted-media-extensions-drm-content-in-html5/