java-cef
                                
                                 java-cef copied to clipboard
                                
                                    java-cef copied to clipboard
                            
                            
                            
                        Linux Share Screen Doesn't Work
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:
- 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?)
- 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.
Original comment by Yongcheng Fang (Bitbucket: Yongcheng Fang).
Does anyone can help to answer my question? I’ve been waiting for several months.
Original comment by FriwiDev (Bitbucket: Fritz Windisch).
Have you passed --enable-media-stream --use-fake-ui-for-media-stream to CEF?
Original comment by Yongcheng Fang (Bitbucket: Yongcheng Fang).
I am sure I passed these two parameters to CEF. It works well on Windows.
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
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?
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.