java-cef icon indicating copy to clipboard operation
java-cef copied to clipboard

Linux Share Screen Doesn't Work

Open magreenblatt opened this issue 3 years ago • 6 comments

Original report by Yongcheng Fang (Bitbucket: Yongcheng Fang).


I was using the JCEF Linux 64 build (v1.0.10-84.3.8+gc8a556f+chromium-84.0.4147.105) in my java Swing application for screen sharing via Zoom VideoSDK, but got below error log from debug console.
Error checking screen sharing TypeError: Cannot read properties of undefined (reading 'getDisplayMedia')
at Function.checkSystemRequirements
....
While it works fine on JCEF Windows 10 java Swing application, it also works fine on Windows 10 and Linux Chrome browser.

Some observations for you:

  1. While sharing screen on Chrome browser, the browser will pop up a dialog for user to select to share the whole screen or just an application window, if I click the cancel button, the debug console will also show the same error log like on JCEF Linux 64 java Swing application. (So I doubt if the JCEF Linux 64 rejcts the screen sharing by default?)
  2. The JCEF Windows version will not pop up a dialog like Chrome browser for user to select share the whole screen or just an application window. It will share the whole screen immediately.

magreenblatt avatar Nov 16 '21 08:11 magreenblatt

Original comment by Yongcheng Fang (Bitbucket: Yongcheng Fang).


Does anyone can help to answer my question? I’ve been waiting for several months.

magreenblatt avatar Jan 13 '22 08:01 magreenblatt

Original comment by FriwiDev (Bitbucket: Fritz Windisch).


Have you passed --enable-media-stream --use-fake-ui-for-media-stream to CEF?

magreenblatt avatar Jan 17 '22 17:01 magreenblatt

Original comment by Yongcheng Fang (Bitbucket: Yongcheng Fang).


I am sure I passed these two parameters to CEF. It works well on Windows.

magreenblatt avatar Jan 18 '22 06:01 magreenblatt

Original comment by FriwiDev (Bitbucket: Fritz Windisch).


I debugged this for you with the latest version on Linux, to get some output to work with on this issue:

[0119/145432.058360:ERROR:gl_surface_egl.cc(780)] EGL Driver message (Error) eglSwapBuffers: Failed to retrieve the size of the parent window.
[0119/145432.058757:ERROR:skia_output_surface_impl_on_gpu.cc(1585)] Failed to make current.
[0119/145432.059216:ERROR:skia_output_surface_impl_on_gpu.cc(1585)] Failed to make current.
[0119/145432.059857:ERROR:skia_output_surface_impl_on_gpu.cc(1585)] Failed to make current.
[0119/145432.065334:ERROR:gl_surface_egl.cc(1510)] eglCreateWindowSurface failed with error EGL_BAD_NATIVE_WINDOW
[0119/145432.073729:ERROR:x11_software_bitmap_presenter.cc(140)] XGetWindowAttributes failed for window [60817412 (bb)](https://bitbucket.org/chromiumembedded/java-cef/commits/60817412)
[0119/145432.074178:WARNING:connection.cc(61)] X error received.  Request: CreateGCRequest, Error: DrawableError{.sequence = 36, .bad_value = [60817412 (bb)](https://bitbucket.org/chromiumembedded/java-cef/commits/60817412), .minor_opcode = 0, .major_opcode = 55}
[0119/145432.093086:ERROR:shared_image_stub.cc(508)] SharedImageStub: context already lost

magreenblatt avatar Jan 19 '22 14:01 magreenblatt

Original comment by Yongcheng Fang (Bitbucket: Yongcheng Fang).


So it is an CEF issue? Or browser issue? Should I fix it myself? Or you will consider fix is on next release?

magreenblatt avatar Jan 20 '22 02:01 magreenblatt

Original comment by FriwiDev (Bitbucket: Fritz Windisch).


I don’t think this is a CEF error. Most likely the window that would normally allow you to choose a window or whole screen is skipped and thus there is no valid reference to a window or screen made. Retrieving the size of the window fails then. Most likely the sharing selection feature would be something to implement in a future version then.

magreenblatt avatar Jan 21 '22 16:01 magreenblatt