Interface ScreenVideoTrackInitConfig

Configurations for the video track for screen sharing. Set these configurations when calling AgoraRTC.createScreenVideoTrack.

Hierarchy

  • ScreenVideoTrackInitConfig

Index

Properties

Optional electronScreenSourceId

electronScreenSourceId: undefined | string

The sourceId when you share the screen through Electron.

Optional encoderConfig

The video encoder configurations for screen sharing.

You can set the video encoder configurations in either of the following ways:

Optional extensionId

extensionId: undefined | string

The extensionId when you share the screen with a Chrome extension.

Optional optimizationMode

optimizationMode: "motion" | "detail"

Since
   4.0.0

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

  • "detail": (Default) 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.

Note: This method is only supported on Chrome.

Optional screenSourceType

screenSourceType: ScreenSourceType

The type of the source for screen sharing.

This parameter is valid only on Firefox.