pub struct RtcConfig { /* private fields */ }
Expand description
Implementations§
source§impl RtcConfig
impl RtcConfig
sourcepub fn clear_codecs(self) -> Self
pub fn clear_codecs(self) -> Self
Clear all configured codecs.
// For the session to use only OPUS and VP8.
let mut rtc = RtcConfig::default()
.clear_codecs()
.enable_opus()
.enable_vp8()
.build();
sourcepub fn enable_opus(self) -> Self
pub fn enable_opus(self) -> Self
Enable opus audio codec.
Enabled by default.
sourcepub fn enable_vp8(self) -> Self
pub fn enable_vp8(self) -> Self
Enable VP8 video codec.
Enabled by default.
sourcepub fn enable_h264(self) -> Self
pub fn enable_h264(self) -> Self
Enable H264 video codec.
Enabled by default.
sourcepub fn enable_vp9(self) -> Self
pub fn enable_vp9(self) -> Self
Enable VP9 video codec.
Enabled by default.
sourcepub fn codec_config(&mut self) -> &mut CodecConfig
pub fn codec_config(&mut self) -> &mut CodecConfig
Lower level access to precis configuration of codecs (payload types).
sourcepub fn set_stats_interval(self, interval: Duration) -> Self
pub fn set_stats_interval(self, interval: Duration) -> Self
Set the interval between statistics events This includes Event::MediaEgressStats, Event::MediaIngressStats, Event::MediaEgressStats
Defaults to Duration::from_secs(1)
.