client-sdk-android
client-sdk-android copied to clipboard
camera failed in some devices
Describe the bug camera in some devices (Redmi note 11pro, Redmi note 11, one plus) does not show in other device,
Screenshots
Device Info:
- Device: Redmi note 11pro
- OS: Android 12
- LiveKit SDK version: 1.1.6
I'am experiencing same issue on redmi note 7 device and changing version of protobuf to "3.21.12" solves it for me, can you please release a new version by merging this fix if possible @davidliu
@Test-isom Hmm, I'll upgrade protobuf, but @dat0106 reported that it didn't end up fixing things, and I'm still unsure how this would fix things.
Yeah i was going through his comment and even saw another videos he uploaded on youtube for issue, but for now i added these lines in build.gradle along with the livekit sdk dependency and since grade would take latest version of dependency if there are conflicting version so it works for me for now on redmi note devices.
//For https://github.com/livekit/client-sdk-android/issues/179 implementation "com.google.protobuf:protobuf-javalite:3.21.12"
But thanks a lot for the reply, will be actively following the repo for a better fix,until than this works for me so i guess no need for a updated sdk.
On 27-Feb-2023, at 5:16 PM, davidliu @.***> wrote:
@Test-isom https://github.com/Test-isom Hmm, I'll upgrade protobuf, but @dat0106 https://github.com/dat0106 reported that it didn't end up fixing things, and I'm still unsure how this would fix things.
— Reply to this email directly, view it on GitHub https://github.com/livekit/client-sdk-android/issues/179#issuecomment-1446186380, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6DKUVYTKNPQ7L3JOTSHHNLWZSHZ7ANCNFSM6AAAAAAUWKSUNE. You are receiving this because you were mentioned.
Protobuf updated to 3.22.0 in #186.
I use Huawei tablet and Huawei mobile phone to test the same problem, but the system uses Huawei's own Harmony OS 3.0 system. The current test situation is that there is no video screen and only audio
You can pass in the LiveKitOverrides class to solve this problem, for example:
LiveKit.create( appContext = MyApplication.getInstance2(), options = RoomOptions(adaptiveStream = true, dynacast = true), overrides = LiveKitOverrides( okHttpClient = OkHttpClientBuilder.builder(mutableListOf(HttpLoggingInterceptor { LogUtil.d(Constant.TAG_HTTP, it) }.setLevel(BODY))).build(), videoEncoderFactory = HardwareVideoEncoderFactory(EglBase.create().eglBaseContext, false, true), ) )
Resolve using HardwareVideoEncoderFactory.
@MikuMikuQAQ Thank you very much, it has been solved!
Hmm, looks like there's some issues here, perhaps with either the simulcast encoding or software encoding. I'll dig into this a little more and see if we can fix it so that the overrides aren't needed.
Looks like this device has issues with H264 simulcast, and then switches to VP8 encoding on the fly. At the moment, the server doesn't handle these switches well, and ends up failing.
You can pass in the LiveKitOverrides class to solve this problem, for example:
LiveKit.create( appContext = MyApplication.getInstance2(), options = RoomOptions(adaptiveStream = true, dynacast = true), overrides = LiveKitOverrides( okHttpClient = OkHttpClientBuilder.builder(mutableListOf(HttpLoggingInterceptor { LogUtil.d(Constant.TAG_HTTP, it) }.setLevel(BODY))).build(), videoEncoderFactory = HardwareVideoEncoderFactory(EglBase.create().eglBaseContext, false, true), ) )
Resolve using HardwareVideoEncoderFactory.
@MikuMikuQAQ @davidliu
this method can solve the camera problem on Huawei phones or Hongmeng OS, but there is a new problem with screen sharing: other phones cannot decode the screen sharing of Huawei phones or HarmonyOS.
If you don't use HardwareVideoEncoderFactory, the camera will have problems again, which is really worrying.
Copying over comment from #245
I think the better thing to do is to:
- do not override to
HardwareVideoEncoderFactory
- publish videos with VP8 instead of H.264
- this can be done either via changing it in your project settings (or config.yaml if self-hosting)
- or setting
videoCodec
to vp8 in VideoTrackPublishOptions here