Chromium WebRTC M74

Hi, I’m wondering if the contributers have already started integrating newer chromium versions like M74.

I just went through the process on my end for M74, and it was mostly smooth sailing on the react-native-webrtc lib side for my purposes except for a few mods i needed to make to interface with M74:

  • A header fix in WebRTCModule.h for ios
  • Some changes to interface with videoCapturer changes for android camera.

Figured I’d share my progress here and see if it helps. The createVideoSource() command changed and the setEnableVideoHwAcceleration() got deprecated in the chromium webrtc code.
These changes I made got the android camera working again for me, however, i was unsure where to store the SurfaceTextureHelper and which thread to use where it uses “CaptureThread”. I modified these changes from what i saw in:
https://chromium.googlesource.com/external/webrtc/+/master/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java

Changes for android in GetUserMediaImpl.java and WebRTCModule.java
— a/android/src/main/java/com/oney/WebRTCModule/GetUserMediaImpl.java
+++ b/android/src/main/java/com/oney/WebRTCModule/GetUserMediaImpl.java
@@ -87,7 +87,11 @@ class GetUserMediaImpl {
}

     PeerConnectionFactory pcFactory = webRTCModule.mFactory;
  •    VideoSource videoSource = pcFactory.createVideoSource(videoCapturer);
    
  •    EglBase.Context eglContext = EglUtils.getRootEglBaseContext();
    
  •    SurfaceTextureHelper surfaceTextureHelper =
    
  •      SurfaceTextureHelper.create("CaptureThread", eglContext);
    
  •    VideoSource videoSource = pcFactory.createVideoSource(videoCapturer.isScreencast());
    
  •    videoCapturer.initialize(surfaceTextureHelper, this.reactContext, videoSource.getCapturerObserver());
    

+++ b/android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java

@@ -58,7 +64,7 @@ public class WebRTCModule extends ReactContextBaseJavaModule {

     PeerConnectionFactory.initialize(
         PeerConnectionFactory.InitializationOptions.builder(reactContext)
  •            .setEnableVideoHwAcceleration(eglContext != null)
    
  •            //.setEnableVideoHwAcceleration(eglContext != null)
2 Likes

Hi there!

No work has been done yet for M74, so all help is welcome.

Your code above looks good, so feel free to open a PR when ready!

Is there any plan to post a new release of react-native-webrtc with M74 ? Seems that latest release is based on M69 that is close to one year old…

I plan on starting to work on it shortly. Is there anything specific from M74 you need or do you also suffer from versionitis? :wink:

1 Like

First, in this wonderful open source world, I do often suffer from versionitis, indeed.

But more concretely I see one important update on webrtc in 73 about QUIC Transport https://developers.google.com/web/updates/2019/01/rtcquictransport-api

Thanks for the quick reply - Philippe

I see. Note that updating to M74 won’t make that API available right away. It would need to wrapped as a JS API. That will not happen as part of the M74 update. Once done, however, you can probably start tinkering with it and maybe send us a PR!

I will be glad to give it a try!

Another important feature I do realize is to have full support for the SDP Unified Plan and not just for Google Plan B. Is it today part of the current release ?

Nobody has looked into that yet.

I took the time to submit a PR which updates to WebRTC m74 for iOS and Android: https://github.com/react-native-webrtc/react-native-webrtc/pull/648

1 Like