web_sys/features/
gen_MediaStreamTrack.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = MediaStreamTrack , typescript_type = "MediaStreamTrack")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `MediaStreamTrack` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`*"]
14    pub type MediaStreamTrack;
15    # [wasm_bindgen (structural , method , getter , js_class = "MediaStreamTrack" , js_name = kind)]
16    #[doc = "Getter for the `kind` field of this object."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/kind)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`*"]
21    pub fn kind(this: &MediaStreamTrack) -> ::alloc::string::String;
22    # [wasm_bindgen (structural , method , getter , js_class = "MediaStreamTrack" , js_name = id)]
23    #[doc = "Getter for the `id` field of this object."]
24    #[doc = ""]
25    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/id)"]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`*"]
28    pub fn id(this: &MediaStreamTrack) -> ::alloc::string::String;
29    # [wasm_bindgen (structural , method , getter , js_class = "MediaStreamTrack" , js_name = label)]
30    #[doc = "Getter for the `label` field of this object."]
31    #[doc = ""]
32    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/label)"]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`*"]
35    pub fn label(this: &MediaStreamTrack) -> ::alloc::string::String;
36    # [wasm_bindgen (structural , method , getter , js_class = "MediaStreamTrack" , js_name = enabled)]
37    #[doc = "Getter for the `enabled` field of this object."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/enabled)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`*"]
42    pub fn enabled(this: &MediaStreamTrack) -> bool;
43    # [wasm_bindgen (structural , method , setter , js_class = "MediaStreamTrack" , js_name = enabled)]
44    #[doc = "Setter for the `enabled` field of this object."]
45    #[doc = ""]
46    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/enabled)"]
47    #[doc = ""]
48    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`*"]
49    pub fn set_enabled(this: &MediaStreamTrack, value: bool);
50    # [wasm_bindgen (structural , method , getter , js_class = "MediaStreamTrack" , js_name = muted)]
51    #[doc = "Getter for the `muted` field of this object."]
52    #[doc = ""]
53    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/muted)"]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`*"]
56    pub fn muted(this: &MediaStreamTrack) -> bool;
57    # [wasm_bindgen (structural , method , getter , js_class = "MediaStreamTrack" , js_name = onmute)]
58    #[doc = "Getter for the `onmute` field of this object."]
59    #[doc = ""]
60    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/onmute)"]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`*"]
63    pub fn onmute(this: &MediaStreamTrack) -> Option<::js_sys::Function>;
64    # [wasm_bindgen (structural , method , setter , js_class = "MediaStreamTrack" , js_name = onmute)]
65    #[doc = "Setter for the `onmute` field of this object."]
66    #[doc = ""]
67    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/onmute)"]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`*"]
70    pub fn set_onmute(this: &MediaStreamTrack, value: Option<&::js_sys::Function>);
71    # [wasm_bindgen (structural , method , getter , js_class = "MediaStreamTrack" , js_name = onunmute)]
72    #[doc = "Getter for the `onunmute` field of this object."]
73    #[doc = ""]
74    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/onunmute)"]
75    #[doc = ""]
76    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`*"]
77    pub fn onunmute(this: &MediaStreamTrack) -> Option<::js_sys::Function>;
78    # [wasm_bindgen (structural , method , setter , js_class = "MediaStreamTrack" , js_name = onunmute)]
79    #[doc = "Setter for the `onunmute` field of this object."]
80    #[doc = ""]
81    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/onunmute)"]
82    #[doc = ""]
83    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`*"]
84    pub fn set_onunmute(this: &MediaStreamTrack, value: Option<&::js_sys::Function>);
85    #[cfg(feature = "MediaStreamTrackState")]
86    # [wasm_bindgen (structural , method , getter , js_class = "MediaStreamTrack" , js_name = readyState)]
87    #[doc = "Getter for the `readyState` field of this object."]
88    #[doc = ""]
89    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/readyState)"]
90    #[doc = ""]
91    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaStreamTrackState`*"]
92    pub fn ready_state(this: &MediaStreamTrack) -> MediaStreamTrackState;
93    # [wasm_bindgen (structural , method , getter , js_class = "MediaStreamTrack" , js_name = onended)]
94    #[doc = "Getter for the `onended` field of this object."]
95    #[doc = ""]
96    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/onended)"]
97    #[doc = ""]
98    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`*"]
99    pub fn onended(this: &MediaStreamTrack) -> Option<::js_sys::Function>;
100    # [wasm_bindgen (structural , method , setter , js_class = "MediaStreamTrack" , js_name = onended)]
101    #[doc = "Setter for the `onended` field of this object."]
102    #[doc = ""]
103    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/onended)"]
104    #[doc = ""]
105    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`*"]
106    pub fn set_onended(this: &MediaStreamTrack, value: Option<&::js_sys::Function>);
107    # [wasm_bindgen (catch , method , structural , js_class = "MediaStreamTrack" , js_name = applyConstraints)]
108    #[doc = "The `applyConstraints()` method."]
109    #[doc = ""]
110    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/applyConstraints)"]
111    #[doc = ""]
112    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`*"]
113    pub fn apply_constraints(this: &MediaStreamTrack) -> Result<::js_sys::Promise, JsValue>;
114    #[cfg(feature = "MediaTrackConstraints")]
115    # [wasm_bindgen (catch , method , structural , js_class = "MediaStreamTrack" , js_name = applyConstraints)]
116    #[doc = "The `applyConstraints()` method."]
117    #[doc = ""]
118    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/applyConstraints)"]
119    #[doc = ""]
120    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaTrackConstraints`*"]
121    pub fn apply_constraints_with_constraints(
122        this: &MediaStreamTrack,
123        constraints: &MediaTrackConstraints,
124    ) -> Result<::js_sys::Promise, JsValue>;
125    # [wasm_bindgen (method , structural , js_class = "MediaStreamTrack" , js_name = clone)]
126    #[doc = "The `clone()` method."]
127    #[doc = ""]
128    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/clone)"]
129    #[doc = ""]
130    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`*"]
131    pub fn clone(this: &MediaStreamTrack) -> MediaStreamTrack;
132    #[cfg(web_sys_unstable_apis)]
133    #[cfg(feature = "MediaTrackCapabilities")]
134    # [wasm_bindgen (method , structural , js_class = "MediaStreamTrack" , js_name = getCapabilities)]
135    #[doc = "The `getCapabilities()` method."]
136    #[doc = ""]
137    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/getCapabilities)"]
138    #[doc = ""]
139    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaTrackCapabilities`*"]
140    #[doc = ""]
141    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
142    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
143    pub fn get_capabilities(this: &MediaStreamTrack) -> MediaTrackCapabilities;
144    #[cfg(feature = "MediaTrackConstraints")]
145    # [wasm_bindgen (method , structural , js_class = "MediaStreamTrack" , js_name = getConstraints)]
146    #[doc = "The `getConstraints()` method."]
147    #[doc = ""]
148    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/getConstraints)"]
149    #[doc = ""]
150    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaTrackConstraints`*"]
151    pub fn get_constraints(this: &MediaStreamTrack) -> MediaTrackConstraints;
152    #[cfg(feature = "MediaTrackSettings")]
153    # [wasm_bindgen (method , structural , js_class = "MediaStreamTrack" , js_name = getSettings)]
154    #[doc = "The `getSettings()` method."]
155    #[doc = ""]
156    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/getSettings)"]
157    #[doc = ""]
158    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaTrackSettings`*"]
159    pub fn get_settings(this: &MediaStreamTrack) -> MediaTrackSettings;
160    # [wasm_bindgen (method , structural , js_class = "MediaStreamTrack" , js_name = stop)]
161    #[doc = "The `stop()` method."]
162    #[doc = ""]
163    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/stop)"]
164    #[doc = ""]
165    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`*"]
166    pub fn stop(this: &MediaStreamTrack);
167}