pub struct TrackPublishOptions {Show 14 fields
pub video_encoding: Option<VideoEncoding>,
pub audio_encoding: Option<AudioEncoding>,
pub video_codec: VideoCodec,
pub dtx: bool,
pub red: bool,
pub simulcast: bool,
pub simulcast_layers: Option<Vec<VideoPreset>>,
pub source: TrackSource,
pub stream: String,
pub preconnect_buffer: bool,
pub frame_metadata_features: FrameMetadataFeatures,
pub video_encoder: VideoEncoderBackend,
pub scalability_mode: Option<String>,
pub degradation_preference: Option<DegradationPreference>,
}Fields§
§video_encoding: Option<VideoEncoding>§audio_encoding: Option<AudioEncoding>§video_codec: VideoCodec§dtx: bool§red: bool§simulcast: bool§simulcast_layers: Option<Vec<VideoPreset>>Custom simulcast layer presets (low, mid). When set, these override the SDK’s built-in defaults which reduce fps on lower layers.
source: TrackSource§stream: String§preconnect_buffer: bool§frame_metadata_features: FrameMetadataFeatures§video_encoder: VideoEncoderBackendPreferred encoder backend for video tracks published with these options.
If the requested backend is unavailable, the SDK logs a warning and falls back to another compatible encoder.
scalability_mode: Option<String>RTP scalability mode (e.g. “L3T3_KEY”). When set, a single RTP encoding is produced and that mode is forwarded to libwebrtc to enable true SVC for VP9/AV1. Has no effect for VP8/H264.
degradation_preference: Option<DegradationPreference>Controls how the encoder trades off between resolution and framerate when bandwidth is constrained.
MaintainFramerate: Prioritizes framerate, reduces resolution if neededMaintainResolution: Prioritizes resolution, drops frames if neededBalanced: Balances between both
If not set, the SDK uses defaults based on track source:
- Camera:
MaintainFramerate(smoother video for real-time communication) - Screen share:
MaintainResolution(clarity is critical for text/UI) - Other/unknown:
Balanced
Trait Implementations§
Source§impl Clone for TrackPublishOptions
impl Clone for TrackPublishOptions
Source§fn clone(&self) -> TrackPublishOptions
fn clone(&self) -> TrackPublishOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TrackPublishOptions
impl Debug for TrackPublishOptions
Auto Trait Implementations§
impl Freeze for TrackPublishOptions
impl RefUnwindSafe for TrackPublishOptions
impl Send for TrackPublishOptions
impl Sync for TrackPublishOptions
impl Unpin for TrackPublishOptions
impl UnsafeUnpin for TrackPublishOptions
impl UnwindSafe for TrackPublishOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more