Video playback issues in CefGlue

Having problems with building or using the CefGlue .NET/Mono binding? Ask your questions here.

Moderator: fddima

Video playback issues in CefGlue

Postby bdbai » Wed Jan 09, 2019 3:04 am

I am trying to play the video available on https://v.qq.com/ using CefGlue on Unity3D.
Ex) https://v.qq.com/x/page/a0824du40g4.html

I found an example that uses CefGlue to run WebView In Unity3D.
https://github.com/aleab/cef-unity-sample
https://github.com/SethGibson/CEF_01

First, I took CefGlue (version 3578) and tested it with CefGlue.Demo.WinForms to see if the video plays with CefGlue.
I discovered that Flash should be supported and added "enable-system-flash" to OnBeforeCommandLineProcessing in DemoCefApp.cs.
I have installed the Flash plugin.
I tried the test again, but the video did not play.

To find other ways, I downloaded CefSharp (version 69) and checked the video at that address with CefSharp.Winforms.Example.
It plays without any modification. However, I was unable to find a sample running on Unity and the direct attempt failed.

I downloaded CEF (version 3.3578) and tested it with cefclient, but it does not play either.
(Find ClientAppBrowser :: OnBeforeCommandLineProcessing and add "enable-system-flash" but it will not play.)

How can CefSharp play video?
What kind of work does CefGlue play?

Is it possible to play in CEF?
bdbai
Newbie
 
Posts: 5
Joined: Wed Jan 09, 2019 2:34 am

Re: Video playback issues in CefGlue

Postby salvadordf » Wed Jan 09, 2019 4:07 am

Use this command line with cefclient :
Code: Select all
cefclient.exe --enable-system-flash --cache-path=cache


The video works once you add the cache directory
Maintainer of the CEF4Delphi project.
User avatar
salvadordf
Mentor
 
Posts: 94
Joined: Sun Dec 18, 2016 8:39 am
Location: Spain

Re: Video playback issues in CefGlue

Postby bdbai » Wed Jan 09, 2019 7:37 pm

salvadordf wrote:Use this command line with cefclient :
Code: Select all
cefclient.exe --enable-system-flash --cache-path=cache


The video works once you add the cache directory


I added cache-path but the video does not play in cefclient.

Cache directory was not created. so i was created. I tried it again and it is empty.
I think it's streaming video.

Here is my command line:
"F:\...\cefclient\Debug\cefclient.exe" --lang=en-US --log-file="F:\...\cefclient\Debug\debug.log" --disable-gpu-shader-disk-cache --enable-system-flash --cache-path=cache
bdbai
Newbie
 
Posts: 5
Joined: Wed Jan 09, 2019 2:34 am

Re: Video playback issues in CefGlue

Postby salvadordf » Thu Jan 10, 2019 3:02 am

bdbai wrote:I added cache-path but the video does not play in cefclient.
Cache directory was not created. so i was created. I tried it again and it is empty.


cefclient will create a cache directory if Windows allows it. You don't need to create it yourself.

I used --cache-path=cache because I copied cefclient to the desktop and cefclient can create subdirectories freely inside that directory.

The directory used with --cache-path can be a relative or absolute path but it must have write permissions.

Please, also check that the flash plugin installed in your system was the PPAPI plugin.
The Adobe website calls it "FP 32 for Opera and Chromium - PPAPI"
https://get.adobe.com/flashplayer/otherversions/

You can check if the Flash plugin is installed in cefclient in this web page. Click the "Check Now" button :
https://helpx.adobe.com/flash-player.html
Maintainer of the CEF4Delphi project.
User avatar
salvadordf
Mentor
 
Posts: 94
Joined: Sun Dec 18, 2016 8:39 am
Location: Spain

Re: Video playback issues in CefGlue

Postby bdbai » Sun Jan 13, 2019 9:04 pm

salvadordf wrote:
bdbai wrote:I added cache-path but the video does not play in cefclient.
Cache directory was not created. so i was created. I tried it again and it is empty.


cefclient will create a cache directory if Windows allows it. You don't need to create it yourself.

I used --cache-path=cache because I copied cefclient to the desktop and cefclient can create subdirectories freely inside that directory.

The directory used with --cache-path can be a relative or absolute path but it must have write permissions.

Please, also check that the flash plugin installed in your system was the PPAPI plugin.
The Adobe website calls it "FP 32 for Opera and Chromium - PPAPI"
https://get.adobe.com/flashplayer/otherversions/

You can check if the Flash plugin is installed in cefclient in this web page. Click the "Check Now" button :
https://helpx.adobe.com/flash-player.html


I tried to force write permissions but it does not work.
I do not think it's a permission issue. because CefSharp.WinForms.Example records files and folders well in cache folder (for example, blob_storage, GPUCache).

I have installed the PPAPI plugin. CfSharp checks for proper operation with the installed plugin.
However, the cefclient sample in CEF (version 3.3578) is still not playing.

I have received the source code from http://opensource.spotify.com/cefbuilds/index.html (CEF 3.3578.1860.g36610bd)
and I have built the source code into Visual Studio 2017 (ver. 15.7.2) and run it in Debug mode.

Recently uploaded a new CEF version, so I'll download it again and check it out.
bdbai
Newbie
 
Posts: 5
Joined: Wed Jan 09, 2019 2:34 am

Re: Video playback issues in CefGlue

Postby bdbai » Mon Jan 14, 2019 2:30 am

I was trying to test it with the latest version of CEF and found that the execution path contained spaces.
I tested it in a path that does not include spaces, and I tried it in various ways.
Here's what we found out.

1. The path must not contain a space character.
2. The cache path option should be used.
3. The long path is not a problem.
4. It has nothing to do with log options.
5. If an error occurs, reboot and test again.

I am going to test again with CefGlue for the fact that I have learned.
bdbai
Newbie
 
Posts: 5
Joined: Wed Jan 09, 2019 2:34 am

Re: Video playback issues in CefGlue

Postby bdbai » Mon Jan 14, 2019 4:06 am

CefGlue's Xilium.CefGlue.Demo.WinForms also ran successfully.
I found "OnBeforeCommandLineProcessing" and append "enable-system-flash" and found CefSettings configuration code and specified settings.CachePath = "cache".

CEF's cefclient and CefGlue's Xilium.CefGlue.Demo.WinForms behave a little different.
If you add the --cache-path = cache option to cefclient, use C: \ Users \ {Your Account} \ cache as the cache path.
and Xilium.CefGlue.Demo.WinForms creates and uses the cache folder under the executable folder.

@salvadordf I got inspired thanks to you
bdbai
Newbie
 
Posts: 5
Joined: Wed Jan 09, 2019 2:34 am


Return to CefGlue Forum

Who is online

Users browsing this forum: No registered users and 2 guests