Skip to content

Black Screen Issues in Some Device Environments #4

@YeonjunNotFR

Description

@YeonjunNotFR

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

Please refer to the following link.
react-native-webrtc/react-native-webrtc#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions