startMediaRenderingTracing

Enables tracing the video frame rendering process.

abstract startMediaRenderingTracing(): number;

Details

The SDK starts tracing the rendering status of the video frames in the channel from the moment this method is successfully called and reports information about the event through the onVideoRenderingTracingResult callback.

Note:
  • By default, the SDK starts tracing the video rendering event automatically when the local user successfully joins the channel. You can call this method at an appropriate time according to the actual application scenario to customize the tracing process.
  • After the local user leaves the current channel, the SDK automatically resets the time point to the next time when the user successfully joins the channel.

Applicable scenarios

Agora recommends that you use this method in conjunction with the UI settings (such as buttons and sliders) in your app to improve the user experience. For example, call this method when the user clicks the Join Channel button, and then get the indicators in the video frame rendering process through the onVideoRenderingTracingResult callback, so as to optimize the indicators accordingly.

Returns

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