I am developing an App using React Native with Expo and an accompanying website. I have just implemented screensharing for Android, but I am having a few issues with it.
First off, the video quality of the screen share is extremely low on the Web side. It also has very low FPS and is a couple of seconds delayed. The session I tried this in is GuaEp02JTOCv8z4kPrSj6Q==.
Another issue I had is that whenever I leave the Android app to show something while screen sharing, the video feed freezes, and when I come back, it does not recover, and I have to disable and reenable the video for it to work again.
In this statistic, are you referring to low FPS or low resolution? Resolution depends on the capture side’s resolution, and in normal screen sharing, FPS is generally lower than 5.
From my testing, the resolution was generally pretty bad - significantly worse than the camera video feed. It was low resolution, choppy, and quite laggy, and the FPS was hovering around 1-5 FPS.
Screen sharing typically shares the entire screen, and screen resolutions are usually high (1080P, 2K, 4K, etc.). If the corresponding FPS is also high, the amount of transmitted data will be large, making network bandwidth the bottleneck and potentially affecting video and audio performance.
If high-FPS sharing is truly required in certain scenarios, you can call stream.enableOptimizeForSharedVideo(true). However, you need to first call stream.lockShare or stream.setSharePrivilege and ensure it is not set to SharePrivilege.MultipleShare(3).