Interface CustomVideoTrackInitConfig

Configurations for the custom video track. Set these configurations when calling AgoraRTC.createCustomVideoTrack.


  • CustomVideoTrackInitConfig



Optional bitrateMax

bitrateMax: undefined | number

The maximum bitrate of sending the video track (Kbps).

Optional bitrateMin

bitrateMin: undefined | number

The minimum bitrate of sending the video track (Kbps).


mediaStreamTrack: MediaStreamTrack

Your MediaStreamTrack object.

Optional optimizationMode

optimizationMode: "motion" | "detail"


Transmission optimization mode. Whether to prioritize video quality or smoothness:

  • "detail": Prioritizes video quality.
    • The SDK ensures high-quality images by automatically calculating a minimum bitrate based on the capturing resolution and frame rate. No matter how poor the network condition is, the sending bitrate will never be lower than the minimum value.
    • In most cases, the SDK does not reduce the sending resolution, but may reduce the frame rate.
  • "motion": Prioritizes video smoothness.
    • In poor network conditions, the SDK reduces the sending bitrate to minimize video freezes.
    • In most cases, the SDK does not reduce the frame rate, but may reduce the sending resolution.
  • Empty: Uses the default transmission optimization mode. The SDK may reduce the frame rate or the sending resolution in poor network conditions.

Note: This method is only supported on Chrome.