As of v3.0.0, the interoperability between the RTC Native SDK and the RTC Web SDK is enabled by default for both the COMMUNICATION and the LIVE_BROADCASTING profile.

For RTC native SDKs prior to v3.0.0, the interoperability with the Web SDK is enabled by default in the COMMUNICATION profile. In the LIVE_BROADCASTING profile, however, to enable interoperability between a mobile device and a web browser or app, you need to make the following settings on both platforms.

  • On the mobile/desktop device, call the enableWebSdkInteroperability method.

      // java
      // Ensure that this methid is called from the native side to interoperate with Web SDK.
      rtcEngine.enableWebSdkInteroperability(true);
      // swift
      // Ensure that this method is called from the native side to interoperate with the Web SDK.
      agoraKit.enableWebSdkInteroperability(true)
      // objective-c
      // Ensure that this method is called from the native side to interoperate with the Web SDK.
      [agoraKit enableWebSdkInteroperability: YES];
      // cpp
      //  Ensure that this method is called from the native side to interoperate with the Web SDK.
      lpAgoraEngine->enableWebSdkInteroperability
  • For the Web, in the createClient method, set the mode argument as 'live'.

      // javascript
      // Choose the current mode and codec.
      var client = AgoraRTC.createClient({ mode: 'live', codec: 'h264' });
Given known test experience, if your scenario involves Safari, we recommend setting codec at the Web Client as h264; otherwise, set it as vp8.