pub enum Track {
LocalAudio(LocalAudioTrack),
LocalVideo(LocalVideoTrack),
RemoteAudio(RemoteAudioTrack),
RemoteVideo(RemoteVideoTrack),
}Variants§
LocalAudio(LocalAudioTrack)
LocalVideo(LocalVideoTrack)
RemoteAudio(RemoteAudioTrack)
RemoteVideo(RemoteVideoTrack)
Implementations§
Source§impl Track
impl Track
pub fn sid(&self) -> TrackSid
pub fn name(&self) -> String
pub fn kind(&self) -> TrackKind
pub fn source(&self) -> TrackSource
pub fn stream_state(&self) -> StreamState
pub fn is_enabled(&self) -> bool
pub fn enable(&self)
pub fn disable(&self)
pub fn is_muted(&self) -> bool
pub fn is_remote(&self) -> bool
pub fn on_muted(&self, on_mute: impl Fn(Track) + Send + 'static)
pub fn on_unmuted(&self, on_unmute: impl Fn(Track) + Send + 'static)
pub fn rtc_track(&self) -> MediaStreamTrack
pub async fn get_stats(&self) -> RoomResult<Vec<RtcStats>>
Trait Implementations§
Source§impl From<AudioTrack> for Track
impl From<AudioTrack> for Track
Source§fn from(track: AudioTrack) -> Self
fn from(track: AudioTrack) -> Self
Converts to this type from the input type.
Source§impl From<LocalTrack> for Track
impl From<LocalTrack> for Track
Source§fn from(track: LocalTrack) -> Self
fn from(track: LocalTrack) -> Self
Converts to this type from the input type.
Source§impl From<RemoteTrack> for Track
impl From<RemoteTrack> for Track
Source§fn from(track: RemoteTrack) -> Self
fn from(track: RemoteTrack) -> Self
Converts to this type from the input type.
Source§impl From<VideoTrack> for Track
impl From<VideoTrack> for Track
Source§fn from(track: VideoTrack) -> Self
fn from(track: VideoTrack) -> Self
Converts to this type from the input type.
Source§impl TryFrom<Track> for AudioTrack
impl TryFrom<Track> for AudioTrack
Source§impl TryFrom<Track> for LocalTrack
impl TryFrom<Track> for LocalTrack
Source§impl TryFrom<Track> for RemoteTrack
impl TryFrom<Track> for RemoteTrack
Auto Trait Implementations§
impl Freeze for Track
impl !RefUnwindSafe for Track
impl Send for Track
impl Sync for Track
impl Unpin for Track
impl UnsafeUnpin for Track
impl !UnwindSafe for Track
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