webrtc-in-jetpack-compose icon indicating copy to clipboard operation
webrtc-in-jetpack-compose copied to clipboard

Black Screen Issues in Some Device Environments

Open YeonjunNotPed opened this issue 1 year ago • 0 comments

black screen issue occurs on a particular device (emulator: Pixel_3a_API_34_extension_level_7_arm64-v8a).

Please refer to the following link. https://github.com/react-native-webrtc/react-native-webrtc/issues/1332 https://stackoverflow.com/questions/56700614/android-webrtc-black-green-screen-with-uv4l-stream

Cause : Video decoder, encoder appears to be the cause of the problem. Or, considering it's an emulator, it could be a problem with a device that doesn't support hardware acceleration Solution : Resolved by changing video encoder and decoder to Software Video Factory

However, Software Video Factory does not use hardware acceleration, which may cause performance problems.

    private val videoDecoderFactory by lazy {
//        DefaultVideoDecoderFactory(eglBaseContext)
        SoftwareVideoDecoderFactory()
    }

    private val videoEncoderFactory by lazy {
        SoftwareVideoEncoderFactory()
//        val hardwareEncoder = HardwareVideoEncoderFactory(eglBaseContext, true, true)
//        SimulcastVideoEncoderFactory(hardwareEncoder, SoftwareVideoEncoderFactory())
    }

I have a log when the issue occurs, but I will attach it if necessary

YeonjunNotPed avatar Apr 05 '24 21:04 YeonjunNotPed