Search code examples
androidwebrtcandroid-7.1-nougat

Libjingle webrtc failed to init camera on android 7


I'm using libjingle in one of my project for webrtc video/audio stream and video stream just not working on android 7 for no reason(at least there is no crashes), it works fine on android 4,5,6. Had anyone face this issue already?


Solution

  • Got emailed about same issue. Due to a7 changes, you need to update to ~fresh webrtc version. If you cant compile it from source code(nothing wrong with you)- here is the ~fresh libjingle with fix (NOTE, code most be redone a little for video to work). Drive archive with libjingle.cc

    Just put all files from archive to app/src/main/jniLibs and add to your gradle

    compile files('src/main/jniLibs/autobanh.jar')
    compile files('src/main/jniLibs/base_java.jar')
    compile files('src/main/jniLibs/libjingle_peerconnection.jar')
    

    Archive containes everything for webrtc to work on a7 with every processor type, so you can play with werbrtc on every device and even emulator. Have fun.

    WARNING! 2018 UPDATE

    For everyone still having issues with webrtc versioning, you dont need to build it anymore from sources, just visit https://bintray.com/google/webrtc/google-webrtc, pick version and implement it into your build.gradle, feels good

    exmaple:

    dependencies {
         implementation 'org.webrtc:google-webrtc:1.0.21217'
    }