pub struct MediaStream {
pub cancel_token: CancellationToken,
pub packet_sender: TrackPacketSender,
/* private fields */
}Fields§
§cancel_token: CancellationToken§packet_sender: TrackPacketSenderImplementations§
Source§impl MediaStream
impl MediaStream
pub async fn serve(&self) -> Result<()>
Sourcepub async fn ensure_ambiance(
&self,
option: AmbianceOption,
source_track_id: TrackId,
) -> Result<Option<Arc<StdMutex<AmbianceProcessor>>>>
pub async fn ensure_ambiance( &self, option: AmbianceOption, source_track_id: TrackId, ) -> Result<Option<Arc<StdMutex<AmbianceProcessor>>>>
Load ambiance once per call and keep mixing it while TTS/file playback is silent.
pub fn stop(&self, _reason: Option<String>, _initiator: Option<String>)
pub async fn cleanup(&self) -> Result<()>
pub async fn track_count(&self) -> usize
pub async fn update_recorder_option(&self, recorder_config: RecorderOption)
pub async fn remove_track(&self, id: &TrackId, graceful: bool)
pub async fn update_remote_description( &self, track_id: &TrackId, answer: &String, ) -> Result<()>
pub async fn update_remote_description_force( &self, track_id: &TrackId, answer: &String, ) -> Result<()>
pub async fn handshake( &self, track_id: &TrackId, offer: String, timeout: Option<Duration>, ) -> Result<String>
pub async fn update_track(&self, track: Box<dyn Track>, play_id: Option<String>)
pub async fn mute_track(&self, id: Option<TrackId>)
pub async fn unmute_track(&self, id: Option<TrackId>)
Sourcepub async fn add_ice_candidate(
&self,
candidate: &str,
sdp_mid: Option<&str>,
sdp_mline_index: Option<u32>,
) -> Result<()>
pub async fn add_ice_candidate( &self, candidate: &str, sdp_mid: Option<&str>, sdp_mline_index: Option<u32>, ) -> Result<()>
Trickle ICE: feed a remote candidate into the ICE-backed (WebRTC)
track, if it’s up yet, or buffer it for update_track to replay
otherwise.
pub async fn pause_playback(&self, id: TrackId) -> Result<()>
pub async fn resume_playback(&self, id: TrackId) -> Result<()>
pub async fn hold_track(&self, id: Option<TrackId>)
pub async fn resume_track(&self, id: Option<TrackId>)
pub async fn suppress_forwarding(&self, track_id: &TrackId)
pub async fn resume_forwarding(&self, track_id: &TrackId)
pub async fn remove_processor<T: 'static>( &self, track_id: &TrackId, ) -> Result<()>
pub async fn append_processor( &self, track_id: &TrackId, processor: Box<dyn Processor>, ) -> Result<()>
Source§impl MediaStream
impl MediaStream
pub async fn start_recorder(&self) -> Result<()>
pub async fn set_track_refer(&self, track_id: &TrackId, refer: Option<bool>)
pub async fn set_track_dtmf_forward(&self, track_id: &TrackId, forward: bool)
Auto Trait Implementations§
impl !Freeze for MediaStream
impl !RefUnwindSafe for MediaStream
impl !UnwindSafe for MediaStream
impl Send for MediaStream
impl Sync for MediaStream
impl Unpin for MediaStream
impl UnsafeUnpin for MediaStream
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more