How to catch webrtc.Logging: HardwareVideoEncoder: deliverOutput failed Exception Android

Hi
I use a fragment in my activity to join the desired room.

Noticing that sometimes the application causes exceptions on some android devices (some Samsung tab), I would like at least catch the exception in order to relaunch my fragment and rejoin the conference even after the exception

currently if the exception is thrown the application will crash complement and we have to click on restart the application

i tried this to catch any Exception from the activity parent :

but that’s not work , i tried also to put the same code in APP class but nothing :confused:

Any idea please ? thank’s

WebRTC processing happens in a different thread, and to be honest I don’t know if we can get notified about this failure. If at all possible, it would need to be caught in react-native-webrtc and then turned into a JS event so the user can do something about it.

So , how can i disable the click of the view

i mean, can i disable all click ( i don’t need all option like disable camera or microphone, message …, i need just the video)

i tried this, but it’s not working

i tried to implement an interface (onTouchListner) , also no

it’s inside a fragment, but i can’t intercept any events !!

I don’t think you can intercept them like that. The layout is built by the React Native bridge, so the view you have access to is not really where touched are being processed, but on a child (or granchild!) view.

So there is no solution for this exception that crash my application ?

There probably is one, but I don’t know it. Sorry.

1 Like

there is only you who develops the android side no ?

if you don’t have the solution, so i don’t think that i can find it differently lol

Thank you for quick answers

There are others. The solution would be to not initialize the HW encoder and use the software one (like we do on iOS because no iOS device has a VP8 encoder). Unfortunately, knowing when to do this is the key part, and integrating it into the whole application another key part.

This has been on my list of things to look at for a while, but I haven’t gotten to it yet, nor do I know when I will.

You could try to hack your way here: https://github.com/jitsi/react-native-webrtc/blob/master/android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java#L53 as you can see if eglContext is null we use the software renderer. You can try to force that, rebuild the library and the SDK and give it a shot.

1 Like