In the communication profile, interoperability is enabled by default.

In the live broadcast profile, to enable interoperability between a mobile device and a web browser or app, you need to adjust the 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.