I am trying to user both MediaSoup and WebRTC libraries in my app. Separately it works flawlessly, but when trying to add both in the same project I have some conflicts.
It's either:
I add both mediasoup ('org.mediasoup.droid:mediasoup-client:3.0.8-beta-3') and webRTC ('org.webrtc:google-webrtc:1.0.32006') in my project, I can sync my gradle. But when trying to build the project, I get an error saying that I got a lot of duplicated class, as such:
Duplicate class org.webrtc.AndroidVideoDecoder found in modules jetified-google-webrtc-1.0.32006-runtime.jar (org.webrtc:google-webrtc:1.0.32006) and jetified-mediasoup-client-3.0.8-beta-3-runtime.jar (org.mediasoup.droid:mediasoup-client:3.0.8-beta-3)
I add only WebRTC library: impossible to use MediaSoup so not a solution
I add only MediaSoup. So far I can compile and even build my app, but it crashes on the first statement where I use WebRTC, on: PeerConnectionFactory.initialize() AS is telling me that the native lib is not found:
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file ".../base.apk"],nativeLibraryDirectories=[/data/app/dev.arvuz-fuhAdJV_sT2-PQyEHP0vxg==/lib/arm64, /data/app/dev.arvuz-fuhAdJV_sT2-PQyEHP0vxg==/base.apk!/lib/arm64-v8a, /system/lib64]]] couldn't find "libjingle_peerconnection_so.so"
So, that's where I am stuck. How (is it even possible?) to use WebRTC in combination with MediaSoup libraries on Android? I tried excluding some WebRTC module in my gradle file but couldn't achieve anything.