Enables audio and video frame instant rendering.

abstract enableInstantMediaRendering(): number;


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.
  • Once the instant rendering function is enabled, it can only be canceled by calling the release method to destroy the IRtcEngine 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.


  • 0: Success.
  • < 0: Failure.
    • -7: The method is called before IRtcEngine is initialized.