Page 1 of 1

Setting the “Protected content” setting

PostPosted: Mon Jun 13, 2016 9:41 pm
by cas4
When watching videos from XFinity (http://xfinitytv.comcast.net/watch-live-tv/) inside the Chrome browser, the videos will only play when the "Allow identifiers for protected content" setting is checked (Settings -> Content settings... -> Protected content). I've created a simple c# winforms app with a cefsharp browser control. When I navigate to the video URL, I receive the same error as when the "Allow identifiers for protected content" setting is unchecked in Chrome. Is there a command-line argument or some other way in CEF to set this setting? I can't find any documentation related to this setting anywhere. Any help would be greatly appreciated.

Re: Setting the “Protected content” setting

PostPosted: Tue Jun 14, 2016 10:52 am
by magreenblatt
It depends on what DRM system and video codecs they're using. If they're using Widevine then you can pass the `--enable-widevine-cdm` command-line flag. If they're using proprietary codecs then you'll need to build CEF/Chromium from source code yourself to enable them.

Re: Setting the “Protected content” setting

PostPosted: Thu Jun 16, 2016 11:35 am
by cas4
I tried setting the '-enable-widevine-cdm' flag, but no luck. I don't think it's a codec issue, unless XFinity uses different codecs for different stations. For example, ESPN (http://tvgo.xfinity.com/live/network/es ... ivetv_espn) plays just fine, but HGTV (http://tvgo.xfinity.com/live/network/hg ... ivetv_hgtv) does not. Is there a way to determine what Chrome's "Protected content" setting actually does and how it might translate to CEF? From everything I read about the Flash error code and from my testing in the Chrome browser, that is the setting I need to replicate in CEF.

Thanks.

Re: Setting the “Protected content” setting

PostPosted: Thu Jun 16, 2016 12:31 pm
by magreenblatt
It's possible that different stations require different DRM. As stated above CEF only supports Widevine (should be `--enable-widevine-cdm`, note the 2 slashes) and does not ship with proprietary media codecs. You can search the Chromium source code here: https://cs.chromium.org/.

Re: Setting the “Protected content” setting

PostPosted: Thu Jun 16, 2016 1:09 pm
by cas4
How can you determine which codec the flash player is using when playing a video?

Re: Setting the “Protected content” setting

PostPosted: Thu Jun 16, 2016 1:24 pm
by magreenblatt
cas4 wrote:How can you determine which codec the flash player is using when playing a video?

If the video is played via Flash then it wouldn't depend on CEF for codec support. Are you specifying a `--cache-path` value?

Re: Setting the “Protected content” setting

PostPosted: Fri Jun 17, 2016 3:55 pm
by cas4
I'm using cefsharp so I think so. I'm setting the CefSettings.CachePath property along with the PersistSessionCookies setting.
Code: Select all
var settings = new CefSharp.CefSettings();
settings.CefCommandLineArgs.Add("--enable-widevine-cdm", "1");
settings.CachePath = System.IO.Path.Combine(Application.StartupPath, "Cache");
settings.PersistSessionCookies = true;
CefSharp.Cef.Initialize(settings, false, true);

Re: Setting the “Protected content” setting

PostPosted: Mon Jun 20, 2016 9:59 am
by magreenblatt
What OS, CEF and Flash versions are you using? How does it behave in the cefclient sample application when you run with `--enable-system-flash --cache-path=c:\path\to\cache`?

Re: Setting the “Protected content” setting

PostPosted: Mon Jun 27, 2016 7:35 pm
by cas4
OS: Windows 10
CEF version: 51
Flash versions: latest version.

Using the sample application, I logged in and navigated to http://xfinitytv.comcast.net/live/netwo ... ivetv_hgtv. I get the same error. Attached is a screenshot.

Re: Setting the “Protected content” setting

PostPosted: Tue Aug 30, 2016 4:49 am
by visuall
The same thing happens if you try to play videos from http://view.yahoo.com. Sometimes video will play for 2-3 seconds and the message will be displayed after this. All is set correctly on my side including cache path but still fails. Any ideas ?