Skip to main content
This page describes the camera track preset PreOptionCamera, and PublishCustomOptions, which overrides the preset’s publish parameters at publish time. For microphone and screen sharing presets, see Microphone preset and Screen sharing preset.

General notes

All PreOption* presets share a “capture options + publish options” structure:
  • Capture options: control local capture behavior (resolution, frame rate, sample rate, device parameters, and so on).
  • Publish options: control publishing behavior (desc, codec, maxBitrate, simulcast parameters, and so on).

PreOptionCamera

Purpose: The camera track preset, combining camera capture parameters with video publish parameters.

Structure

PreOptionCamera(capture: CameraCaptureOptions, publish: VideoPublishOptions)

Capture options CameraCaptureOptions

Purpose: Configures camera capture parameters.

Publish options VideoPublishOptions

Purpose: Configures video track publish parameters.

Built-in presets

Purpose: The SDK provides presets by resolution tier: _1080P, _720P, _480P, and _180P (default _480P).

Custom publish parameters: PublishCustomOptions

Purpose: Overrides the preset’s publish parameters at publish time in publishLocalVideo / publishLocalAudio, mainly to customize the track desc.

Fields

Recommendations

  • If you only need to change the track description, pass desc.
  • For the camera’s high / low streams, you can override the low stream parameters through simulcasts.
  • Microphone, screen sharing, and custom video tracks usually need only the main track parameters, not simulcasts.