Struct web_sys::MediaDevices
source · #[repr(transparent)]pub struct MediaDevices { /* private fields */ }
Expand description
The MediaDevices
object
This API requires the following crate features to be activated: MediaDevices
Implementations§
source§impl MediaDevices
impl MediaDevices
sourcepub fn enumerate_devices(&self) -> Result<Promise, JsValue>
pub fn enumerate_devices(&self) -> Result<Promise, JsValue>
The enumerateDevices()
method
This API requires the following crate features to be activated: MediaDevices
source§impl MediaDevices
impl MediaDevices
sourcepub fn get_supported_constraints(&self) -> MediaTrackSupportedConstraints
pub fn get_supported_constraints(&self) -> MediaTrackSupportedConstraints
The getSupportedConstraints()
method
This API requires the following crate features to be activated: MediaDevices
, MediaTrackSupportedConstraints
source§impl MediaDevices
impl MediaDevices
sourcepub fn get_user_media(&self) -> Result<Promise, JsValue>
pub fn get_user_media(&self) -> Result<Promise, JsValue>
The getUserMedia()
method
This API requires the following crate features to be activated: MediaDevices
source§impl MediaDevices
impl MediaDevices
sourcepub fn get_user_media_with_constraints(
&self,
constraints: &MediaStreamConstraints
) -> Result<Promise, JsValue>
pub fn get_user_media_with_constraints(
&self,
constraints: &MediaStreamConstraints
) -> Result<Promise, JsValue>
The getUserMedia()
method
This API requires the following crate features to be activated: MediaDevices
, MediaStreamConstraints
source§impl MediaDevices
impl MediaDevices
sourcepub fn ondevicechange(&self) -> Option<Function>
pub fn ondevicechange(&self) -> Option<Function>
The ondevicechange
getter
This API requires the following crate features to be activated: MediaDevices
source§impl MediaDevices
impl MediaDevices
sourcepub fn set_ondevicechange(&self, ondevicechange: Option<&Function>)
pub fn set_ondevicechange(&self, ondevicechange: Option<&Function>)
The ondevicechange
setter
This API requires the following crate features to be activated: MediaDevices
Trait Implementations§
source§impl AsRef<EventTarget> for MediaDevices
impl AsRef<EventTarget> for MediaDevices
source§fn as_ref(&self) -> &EventTarget
fn as_ref(&self) -> &EventTarget
source§impl AsRef<JsValue> for MediaDevices
impl AsRef<JsValue> for MediaDevices
source§impl AsRef<Object> for MediaDevices
impl AsRef<Object> for MediaDevices
source§impl Clone for MediaDevices
impl Clone for MediaDevices
source§fn clone(&self) -> MediaDevices
fn clone(&self) -> MediaDevices
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MediaDevices
impl Debug for MediaDevices
source§impl From<JsValue> for MediaDevices
impl From<JsValue> for MediaDevices
source§fn from(obj: JsValue) -> MediaDevices
fn from(obj: JsValue) -> MediaDevices
source§impl From<MediaDevices> for EventTarget
impl From<MediaDevices> for EventTarget
source§fn from(obj: MediaDevices) -> EventTarget
fn from(obj: MediaDevices) -> EventTarget
source§impl From<MediaDevices> for JsValue
impl From<MediaDevices> for JsValue
source§fn from(obj: MediaDevices) -> JsValue
fn from(obj: MediaDevices) -> JsValue
source§impl From<MediaDevices> for Object
impl From<MediaDevices> for Object
source§fn from(obj: MediaDevices) -> Object
fn from(obj: MediaDevices) -> Object
source§impl FromWasmAbi for MediaDevices
impl FromWasmAbi for MediaDevices
source§impl<'a> IntoWasmAbi for &'a MediaDevices
impl<'a> IntoWasmAbi for &'a MediaDevices
source§impl IntoWasmAbi for MediaDevices
impl IntoWasmAbi for MediaDevices
source§impl JsCast for MediaDevices
impl JsCast for MediaDevices
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 MediaDevices
impl OptionFromWasmAbi for MediaDevices
source§impl<'a> OptionIntoWasmAbi for &'a MediaDevices
impl<'a> OptionIntoWasmAbi for &'a MediaDevices
source§impl OptionIntoWasmAbi for MediaDevices
impl OptionIntoWasmAbi for MediaDevices
source§impl RefFromWasmAbi for MediaDevices
impl RefFromWasmAbi for MediaDevices
§type Abi = <JsValue as RefFromWasmAbi>::Abi
type Abi = <JsValue as RefFromWasmAbi>::Abi
Self
are recovered from.§type Anchor = ManuallyDrop<MediaDevices>
type Anchor = ManuallyDrop<MediaDevices>
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 MediaDevices
impl !Send for MediaDevices
impl !Sync for MediaDevices
impl Unpin for MediaDevices
impl UnwindSafe for MediaDevices
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