Struct web_sys::MediaStream
source · #[repr(transparent)]pub struct MediaStream { /* private fields */ }
Expand description
The MediaStream
object
This API requires the following crate features to be activated: MediaStream
Implementations§
source§impl MediaStream
impl MediaStream
sourcepub fn new() -> Result<MediaStream, JsValue>
pub fn new() -> Result<MediaStream, JsValue>
The new MediaStream(..)
constructor, creating a new instance of MediaStream
This API requires the following crate features to be activated: MediaStream
source§impl MediaStream
impl MediaStream
sourcepub fn new_with_stream(stream: &MediaStream) -> Result<MediaStream, JsValue>
pub fn new_with_stream(stream: &MediaStream) -> Result<MediaStream, JsValue>
The new MediaStream(..)
constructor, creating a new instance of MediaStream
This API requires the following crate features to be activated: MediaStream
source§impl MediaStream
impl MediaStream
sourcepub fn add_track(&self, track: &MediaStreamTrack)
pub fn add_track(&self, track: &MediaStreamTrack)
The addTrack()
method
This API requires the following crate features to be activated: MediaStream
, MediaStreamTrack
source§impl MediaStream
impl MediaStream
sourcepub fn clone(&self) -> MediaStream
pub fn clone(&self) -> MediaStream
The clone()
method
This API requires the following crate features to be activated: MediaStream
source§impl MediaStream
impl MediaStream
sourcepub fn get_track_by_id(&self, track_id: &str) -> Option<MediaStreamTrack>
pub fn get_track_by_id(&self, track_id: &str) -> Option<MediaStreamTrack>
The getTrackById()
method
This API requires the following crate features to be activated: MediaStream
, MediaStreamTrack
source§impl MediaStream
impl MediaStream
sourcepub fn remove_track(&self, track: &MediaStreamTrack)
pub fn remove_track(&self, track: &MediaStreamTrack)
The removeTrack()
method
This API requires the following crate features to be activated: MediaStream
, MediaStreamTrack
source§impl MediaStream
impl MediaStream
source§impl MediaStream
impl MediaStream
source§impl MediaStream
impl MediaStream
sourcepub fn onaddtrack(&self) -> Option<Function>
pub fn onaddtrack(&self) -> Option<Function>
The onaddtrack
getter
This API requires the following crate features to be activated: MediaStream
source§impl MediaStream
impl MediaStream
sourcepub fn set_onaddtrack(&self, onaddtrack: Option<&Function>)
pub fn set_onaddtrack(&self, onaddtrack: Option<&Function>)
The onaddtrack
setter
This API requires the following crate features to be activated: MediaStream
source§impl MediaStream
impl MediaStream
sourcepub fn onremovetrack(&self) -> Option<Function>
pub fn onremovetrack(&self) -> Option<Function>
The onremovetrack
getter
This API requires the following crate features to be activated: MediaStream
source§impl MediaStream
impl MediaStream
sourcepub fn set_onremovetrack(&self, onremovetrack: Option<&Function>)
pub fn set_onremovetrack(&self, onremovetrack: Option<&Function>)
The onremovetrack
setter
This API requires the following crate features to be activated: MediaStream
source§impl MediaStream
impl MediaStream
sourcepub fn current_time(&self) -> f64
pub fn current_time(&self) -> f64
The currentTime
getter
This API requires the following crate features to be activated: MediaStream
Trait Implementations§
source§impl AsRef<EventTarget> for MediaStream
impl AsRef<EventTarget> for MediaStream
source§fn as_ref(&self) -> &EventTarget
fn as_ref(&self) -> &EventTarget
source§impl AsRef<JsValue> for MediaStream
impl AsRef<JsValue> for MediaStream
source§impl AsRef<MediaStream> for CanvasCaptureMediaStream
impl AsRef<MediaStream> for CanvasCaptureMediaStream
source§fn as_ref(&self) -> &MediaStream
fn as_ref(&self) -> &MediaStream
source§impl AsRef<MediaStream> for LocalMediaStream
impl AsRef<MediaStream> for LocalMediaStream
source§fn as_ref(&self) -> &MediaStream
fn as_ref(&self) -> &MediaStream
source§impl AsRef<Object> for MediaStream
impl AsRef<Object> for MediaStream
source§impl Clone for MediaStream
impl Clone for MediaStream
source§fn clone(&self) -> MediaStream
fn clone(&self) -> MediaStream
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MediaStream
impl Debug for MediaStream
source§impl From<CanvasCaptureMediaStream> for MediaStream
impl From<CanvasCaptureMediaStream> for MediaStream
source§fn from(obj: CanvasCaptureMediaStream) -> MediaStream
fn from(obj: CanvasCaptureMediaStream) -> MediaStream
source§impl From<JsValue> for MediaStream
impl From<JsValue> for MediaStream
source§fn from(obj: JsValue) -> MediaStream
fn from(obj: JsValue) -> MediaStream
source§impl From<LocalMediaStream> for MediaStream
impl From<LocalMediaStream> for MediaStream
source§fn from(obj: LocalMediaStream) -> MediaStream
fn from(obj: LocalMediaStream) -> MediaStream
source§impl From<MediaStream> for EventTarget
impl From<MediaStream> for EventTarget
source§fn from(obj: MediaStream) -> EventTarget
fn from(obj: MediaStream) -> EventTarget
source§impl From<MediaStream> for JsValue
impl From<MediaStream> for JsValue
source§fn from(obj: MediaStream) -> JsValue
fn from(obj: MediaStream) -> JsValue
source§impl From<MediaStream> for Object
impl From<MediaStream> for Object
source§fn from(obj: MediaStream) -> Object
fn from(obj: MediaStream) -> Object
source§impl FromWasmAbi for MediaStream
impl FromWasmAbi for MediaStream
source§impl<'a> IntoWasmAbi for &'a MediaStream
impl<'a> IntoWasmAbi for &'a MediaStream
source§impl IntoWasmAbi for MediaStream
impl IntoWasmAbi for MediaStream
source§impl JsCast for MediaStream
impl JsCast for MediaStream
source§fn instanceof(val: &JsValue) -> bool
fn instanceof(val: &JsValue) -> bool
instanceof
check to see whether the JsValue
provided is an instance of this type. Read moresource§fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js(val: JsValue) -> Self
source§fn unchecked_from_js_ref(val: &JsValue) -> &Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self
source§fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
T
. Read moresource§fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
T
. Read moresource§fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
T
. Read moresource§fn unchecked_into<T>(self) -> Twhere
T: JsCast,
fn unchecked_into<T>(self) -> Twhere
T: JsCast,
source§impl OptionFromWasmAbi for MediaStream
impl OptionFromWasmAbi for MediaStream
source§impl<'a> OptionIntoWasmAbi for &'a MediaStream
impl<'a> OptionIntoWasmAbi for &'a MediaStream
source§impl OptionIntoWasmAbi for MediaStream
impl OptionIntoWasmAbi for MediaStream
source§impl RefFromWasmAbi for MediaStream
impl RefFromWasmAbi for MediaStream
§type Abi = <JsValue as RefFromWasmAbi>::Abi
type Abi = <JsValue as RefFromWasmAbi>::Abi
Self
are recovered from.§type Anchor = ManuallyDrop<MediaStream>
type Anchor = ManuallyDrop<MediaStream>
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous. Read moreAuto Trait Implementations§
impl RefUnwindSafe for MediaStream
impl Send for MediaStream
impl Sync for MediaStream
impl Unpin for MediaStream
impl UnwindSafe for MediaStream
Blanket Implementations§
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::Abi
source§fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
. Read more