Struct PlayerConfig
#[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§
§impl PlayerConfig
impl PlayerConfig
pub fn with_rendition(self, rendition: RenditionMode) -> PlayerConfig
pub fn with_rendition(self, rendition: RenditionMode) -> PlayerConfig
Returns this config with rendition choosing the video rendition.
pub fn with_latency(self, latency: Delay) -> PlayerConfig
pub fn with_latency(self, latency: Delay) -> PlayerConfig
Returns this config with latency as how far behind live to run.
pub fn with_audio(self, audio: AudioMode) -> PlayerConfig
pub fn with_audio(self, audio: AudioMode) -> PlayerConfig
Returns this config with audio as what to do with the audio.
pub fn with_decoder(self, decoder: Backend) -> PlayerConfig
pub fn with_decoder(self, decoder: Backend) -> PlayerConfig
Returns this config with decoder as the decoder backend to open.
pub fn with_adaptation(self, adaptation: Adaptation) -> PlayerConfig
pub fn with_adaptation(self, adaptation: Adaptation) -> PlayerConfig
Returns this config with adaptation as how automatic selection follows the link.
Trait Implementations§
§impl Clone for PlayerConfig
impl Clone for PlayerConfig
§fn clone(&self) -> PlayerConfig
fn clone(&self) -> PlayerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more