Struct medea_jason::media::track::local::Track[][src]

pub struct Track { /* fields omitted */ }

Wrapper around sys::MediaStreamTrack received from from getUserMedia()/getDisplayMedia() request.

Underlying sys::MediaStreamTrack is stopped on this Track’s Drop.

Implementations

impl Track[src]

#[must_use]pub fn new(track: MediaStreamTrack, source_kind: MediaSourceKind) -> Self[src]

Builds a new Track from the provided sys::MediaStreamTrack and MediaSourceKind.

Panics

If the given sys::MediaStreamTrack’s kind is not audio or video.

pub fn set_enabled(&self, enabled: bool)[src]

Changes enabled attribute on the underlying MediaStreamTrack.

#[must_use]pub fn id(&self) -> String[src]

Returns id of underlying MediaStreamTrack.

#[must_use]pub fn media_source_kind(&self) -> MediaSourceKind[src]

Returns this Track’s media source kind.

#[must_use]pub fn kind(&self) -> MediaKind[src]

Returns this Track’s kind (audio/video).

#[must_use]pub fn fork(self: &Rc<Self>) -> Self[src]

Forks this Track.

Creates new sys::MediaStreamTrack from this Track’s sys::MediaStreamTrack using clone() method.

Forked Track will hold a strong reference to this Track.

#[must_use]pub fn sys_track(&self) -> &MediaStreamTrack[src]

Returns reference to the underlying sys::MediaStreamTrack of this Track.

Trait Implementations

impl Debug for Track[src]

impl Drop for Track[src]

Auto Trait Implementations

impl !RefUnwindSafe for Track

impl !Send for Track

impl !Sync for Track

impl Unpin for Track

impl !UnwindSafe for Track

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<E> WrapTraced<E> for E[src]