How to use CEF for Spotify

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

How to use CEF for Spotify

Postby RABBITSV » Sun Apr 15, 2018 9:01 am

I tried to use CEFSharp for open Spotify WebBrowser (https://open.spotify.com/browse/featured), and i got page with message "Enable player in your browser (Under Protected content, make sure Allow site to play protected content is enabled.)".
Spotify.png
Spotify.png (182.69 KiB) Viewed 15438 times


I used different command line arguments:
Code: Select all
settings.CefCommandLineArgs.Add("persist_session_cookies", "1");
settings.CefCommandLineArgs.Add("enable-automatic-password-saving", "enable-automatic-password-saving");
settings.CefCommandLineArgs.Add("enable-password-save-in-page-navigation", "enable-password-save-in-page-navigation");
settings.CefCommandLineArgs.Add("cache-path", @"D:\Chrome\1");
settings.CefCommandLineArgs.Add("enable-widevine-cdm", "1");
settings.CefCommandLineArgs.Add("ppapi-flash-path", Path.Combine(Environment.CurrentDirectory, @"pepflashplayer64_29_0_0_113.dll"));
settings.CefCommandLineArgs.Add("enable-npapi", "1");
settings.CefCommandLineArgs.Add("allow-running-insecure-content", "1");
settings.CefCommandLineArgs.Add("enable-media-stream", "1");


And succesfully registred WidevineCDM additionaly:
Code: Select all
Cef.RegisterWidevineCdm(Path.Combine(Environment.CurrentDirectory, @"widevinecdm"));


Ineffectually.

Then i downloaded a sample application from official Spotify page: http://opensource.spotify.com/cefbuilds/index.html (cef_binary_3.3325.1758.g9aea513_windows32_client.tar.bz2 - test program), and run it:
cefclient.exe --proxy-server=144.76.62.29:3128 --cache-path=D:\Chrome\4 --enable-widevine-cdm
The result is the same.

Spotify local client is based on CEF, therefore it must work. But how?
RABBITSV
Newbie
 
Posts: 3
Joined: Sun Apr 15, 2018 8:23 am

Re: How to use CEF for Spotify

Postby magreenblatt » Sun Apr 15, 2018 10:56 am

See the documentation for CefRegisterWidevineCdm
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: How to use CEF for Spotify

Postby RABBITSV » Sun Apr 15, 2018 12:05 pm

It registred without errors on callback and logs. Test page give out that:
widevine.png
widevine.png (39.22 KiB) Viewed 15431 times
RABBITSV
Newbie
 
Posts: 3
Joined: Sun Apr 15, 2018 8:23 am

Re: How to use CEF for Spotify

Postby magreenblatt » Sun Apr 15, 2018 12:43 pm

Does the "Test DRM video playback" link work with the Widevine asset? A license error is expected but the video should play for a few seconds before stopping.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: How to use CEF for Spotify

Postby magreenblatt » Sun Apr 15, 2018 12:52 pm

Also, what OS are you using? Does it work in Google Chrome with your proxy configuration at the same CEF version?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: How to use CEF for Spotify

Postby RABBITSV » Sun Apr 15, 2018 1:11 pm

OS is Windows 7 SP 1.
In cefclient.exe Shaka give out this:
Shaka.PNG
Shaka.PNG (14.26 KiB) Viewed 15426 times

cefclient.exe --proxy-server=144.76.62.29:3128 --cache-path=D:\Chrome\4 --enable-widevine-cdm --widevine-cdm-path=D:\Chrome\WidevineCdm --widevine-cdm-version=1.4.9.1070

My fault is that I used the downloaded WidevineCdm from forum. I did not understand how to get it from Google, but downloaded it myself.
RABBITSV
Newbie
 
Posts: 3
Joined: Sun Apr 15, 2018 8:23 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 89 guests