#[non_exhaustive]pub struct PlayerConfig {
pub rendition: RenditionMode,
pub latency: Delay,
pub audio: AudioMode,
pub decoder: Backend,
pub adaptation: Adaptation,
}Expand description
How a player plays.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rendition: RenditionModeHow to choose the video rendition.
latency: DelayHow far behind live to run, as the media reader’s Delay.
The playout clock runs at least min behind the live edge. Each track
asks for more when it needs it: video for its catalog delay plus its
catalog jitter, and audio for its catalog delay plus the jitter its
decoder measures as packets arrive. The clock follows the largest ask,
up to a frame below max, so the delay rises on a jittery link and
returns to min on a clean one. While audio plays, pictures show when
their sound does. Media later than max is skipped. Both reach the
transport, so media relays and the publisher see them too. Setting
min == max gives a fixed latency, and an unset min counts as zero.
DEFAULT_LATENCY by default.
audio: AudioModeWhat to do with the audio, AudioMode::Off by default.
decoder: BackendThe decoder backend to open, Auto by default.
adaptation: AdaptationHow automatic selection follows the link.
Implementations§
Source§impl PlayerConfig
impl PlayerConfig
Sourcepub fn with_rendition(self, rendition: RenditionMode) -> Self
pub fn with_rendition(self, rendition: RenditionMode) -> Self
Returns this config with rendition choosing the video rendition.
Sourcepub fn with_latency(self, latency: Delay) -> Self
pub fn with_latency(self, latency: Delay) -> Self
Returns this config with latency as how far behind live to run.
Sourcepub fn with_audio(self, audio: AudioMode) -> Self
pub fn with_audio(self, audio: AudioMode) -> Self
Returns this config with audio as what to do with the audio.
Sourcepub fn with_decoder(self, decoder: Backend) -> Self
pub fn with_decoder(self, decoder: Backend) -> Self
Returns this config with decoder as the decoder backend to open.
Sourcepub fn with_adaptation(self, adaptation: Adaptation) -> Self
pub fn with_adaptation(self, adaptation: Adaptation) -> Self
Returns this config with adaptation as how automatic selection follows the link.