Duplicate class found in Jitsi and WebRtc

I need to use both flutter_webrtc and jitsi_meet packages in my project.

Problem is (some errors like)

Duplicate class org.webrtc.YuvConverter$ShaderCallbacks found in modules
jetified-google-webrtc-1.0.32006-runtime.jar (org.webrtc:google-webrtc:1.0.32006) and
jetified-react-native-webrtc-1.84.1-jitsi-5932602-runtime.jar (com.facebook.react:react-native-webrtc:1.84.1-jitsi-5932602)

I tried to exclude one of the two modules

configurations {
    all {
         exclude group: 'org.webrtc', module: 'google-webrtc'
//       exclude group: 'com.facebook.react', module: 'react-native-webrtc'
    }
}

but obviously one of the two does not work anymore.

I’m not able to figure out a way to use both packages.
Thank you!