enableInstantMediaRendering

Enables audio and video frame instant rendering.

Future<void> enableInstantMediaRendering();

Details

After successfully calling this method, the SDK enables the instant frame rendering mode, which can speed up the first frame rendering speed after the user joins the channel.
Attention:
  • Once the instant rendering function is enabled, it can only be canceled by calling the release method to destroy the RtcEngine object.
  • In this mode, the SDK uses Agora's custom encryption algorithm to shorten the time required to establish transmission links, and the security is reduced compared to the standard DTLS (Datagram Transport Layer Security). If the application scenario requires higher security standards, Agora recommends that you do not use this method.

Applicable scenarios

Agora recommends that you enable this mode for the audience in a live streaming scenario.

Exceptions

When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly.