Reputation: 11
I'm developing a desktop application that shares the computer screen with other users over the internet.
The cef supports WebRTC technology and I'm trying to use it to screen sharing. Unfortunately cef does not support the capture of native screen. I followed some tutorials that show how to make changes to the source code of cef to share the screen, but no success.
The processes that follow are 1 and 2:
1- Settings (on windows) specified in: https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart.md
2- Changes specified in: http://arkenthera.github.io/blog/Enabling-CEF-to-Screen-Share-using-getUserMedia-API/
In the process 2 occurred error to run patch.bat file located in chromium/src/cef/tools. Identified that the path of some specified files within the patch.bat was incoherent, I copied the patch.bat for chromium/src/cef and ran. In execution error occurred in allow_screen_sharing.patch file located in chromium/src/cef/patch/patches.
This topic (https:// bitbucket.org/chromiumembedded/cef/issues/1065) in the CEF forum has some information on how to modify the cef to support screen sharing. Despite making changes, when I run cefclient with --enable - usermedia -screen- capturing flag and access https:// html5-demos.appspot.com/static/getusermedia/screenshare.html to screen capture, i get the message requesting activation of the flag.
Someone worked with o cef to screen sharing and successful? They know how to give this support to an application that uses the cef?
Thank you all.
Upvotes: 1
Views: 1871
Reputation: 63
If you haven't solved it yet (otherwise, for other people with the same problem): I have recently made it work in both Chromium 53 and 54. You have to manually edit libcef/browser/browser_host_impl.cc with the changes in the patch file https://github.com/buglloc/cef-builds/blob/master/patches/allow_screen_sharing.patch
The line numbers have changed, so you will have to look for the code before/after each change. Just make the changes before the ninja build.
Upvotes: 2