maxcountryman_web_sys/features/
gen_MediaRecorder.rs

1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6    # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = MediaRecorder , typescript_type = "MediaRecorder")]
7    #[derive(Debug, Clone, PartialEq, Eq)]
8    #[doc = "The `MediaRecorder` class."]
9    #[doc = ""]
10    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder)"]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
13    pub type MediaRecorder;
14    #[cfg(feature = "MediaStream")]
15    # [wasm_bindgen (structural , method , getter , js_class = "MediaRecorder" , js_name = stream)]
16    #[doc = "Getter for the `stream` field of this object."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/stream)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`, `MediaStream`*"]
21    pub fn stream(this: &MediaRecorder) -> MediaStream;
22    #[cfg(feature = "RecordingState")]
23    # [wasm_bindgen (structural , method , getter , js_class = "MediaRecorder" , js_name = state)]
24    #[doc = "Getter for the `state` field of this object."]
25    #[doc = ""]
26    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/state)"]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`, `RecordingState`*"]
29    pub fn state(this: &MediaRecorder) -> RecordingState;
30    # [wasm_bindgen (structural , method , getter , js_class = "MediaRecorder" , js_name = mimeType)]
31    #[doc = "Getter for the `mimeType` field of this object."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/mimeType)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
36    pub fn mime_type(this: &MediaRecorder) -> String;
37    # [wasm_bindgen (structural , method , getter , js_class = "MediaRecorder" , js_name = ondataavailable)]
38    #[doc = "Getter for the `ondataavailable` field of this object."]
39    #[doc = ""]
40    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/ondataavailable)"]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
43    pub fn ondataavailable(this: &MediaRecorder) -> Option<::js_sys::Function>;
44    # [wasm_bindgen (structural , method , setter , js_class = "MediaRecorder" , js_name = ondataavailable)]
45    #[doc = "Setter for the `ondataavailable` field of this object."]
46    #[doc = ""]
47    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/ondataavailable)"]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
50    pub fn set_ondataavailable(this: &MediaRecorder, value: Option<&::js_sys::Function>);
51    # [wasm_bindgen (structural , method , getter , js_class = "MediaRecorder" , js_name = onerror)]
52    #[doc = "Getter for the `onerror` field of this object."]
53    #[doc = ""]
54    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/onerror)"]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
57    pub fn onerror(this: &MediaRecorder) -> Option<::js_sys::Function>;
58    # [wasm_bindgen (structural , method , setter , js_class = "MediaRecorder" , js_name = onerror)]
59    #[doc = "Setter for the `onerror` field of this object."]
60    #[doc = ""]
61    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/onerror)"]
62    #[doc = ""]
63    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
64    pub fn set_onerror(this: &MediaRecorder, value: Option<&::js_sys::Function>);
65    # [wasm_bindgen (structural , method , getter , js_class = "MediaRecorder" , js_name = onstart)]
66    #[doc = "Getter for the `onstart` field of this object."]
67    #[doc = ""]
68    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/onstart)"]
69    #[doc = ""]
70    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
71    pub fn onstart(this: &MediaRecorder) -> Option<::js_sys::Function>;
72    # [wasm_bindgen (structural , method , setter , js_class = "MediaRecorder" , js_name = onstart)]
73    #[doc = "Setter for the `onstart` field of this object."]
74    #[doc = ""]
75    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/onstart)"]
76    #[doc = ""]
77    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
78    pub fn set_onstart(this: &MediaRecorder, value: Option<&::js_sys::Function>);
79    # [wasm_bindgen (structural , method , getter , js_class = "MediaRecorder" , js_name = onstop)]
80    #[doc = "Getter for the `onstop` field of this object."]
81    #[doc = ""]
82    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/onstop)"]
83    #[doc = ""]
84    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
85    pub fn onstop(this: &MediaRecorder) -> Option<::js_sys::Function>;
86    # [wasm_bindgen (structural , method , setter , js_class = "MediaRecorder" , js_name = onstop)]
87    #[doc = "Setter for the `onstop` field of this object."]
88    #[doc = ""]
89    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/onstop)"]
90    #[doc = ""]
91    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
92    pub fn set_onstop(this: &MediaRecorder, value: Option<&::js_sys::Function>);
93    # [wasm_bindgen (structural , method , getter , js_class = "MediaRecorder" , js_name = onwarning)]
94    #[doc = "Getter for the `onwarning` field of this object."]
95    #[doc = ""]
96    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/onwarning)"]
97    #[doc = ""]
98    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
99    pub fn onwarning(this: &MediaRecorder) -> Option<::js_sys::Function>;
100    # [wasm_bindgen (structural , method , setter , js_class = "MediaRecorder" , js_name = onwarning)]
101    #[doc = "Setter for the `onwarning` field of this object."]
102    #[doc = ""]
103    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/onwarning)"]
104    #[doc = ""]
105    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
106    pub fn set_onwarning(this: &MediaRecorder, value: Option<&::js_sys::Function>);
107    #[cfg(feature = "MediaStream")]
108    #[wasm_bindgen(catch, constructor, js_class = "MediaRecorder")]
109    #[doc = "The `new MediaRecorder(..)` constructor, creating a new instance of `MediaRecorder`."]
110    #[doc = ""]
111    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/MediaRecorder)"]
112    #[doc = ""]
113    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`, `MediaStream`*"]
114    pub fn new_with_media_stream(stream: &MediaStream) -> Result<MediaRecorder, JsValue>;
115    #[cfg(all(feature = "MediaRecorderOptions", feature = "MediaStream",))]
116    #[wasm_bindgen(catch, constructor, js_class = "MediaRecorder")]
117    #[doc = "The `new MediaRecorder(..)` constructor, creating a new instance of `MediaRecorder`."]
118    #[doc = ""]
119    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/MediaRecorder)"]
120    #[doc = ""]
121    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`, `MediaRecorderOptions`, `MediaStream`*"]
122    pub fn new_with_media_stream_and_media_recorder_options(
123        stream: &MediaStream,
124        options: &MediaRecorderOptions,
125    ) -> Result<MediaRecorder, JsValue>;
126    #[cfg(feature = "AudioNode")]
127    #[wasm_bindgen(catch, constructor, js_class = "MediaRecorder")]
128    #[doc = "The `new MediaRecorder(..)` constructor, creating a new instance of `MediaRecorder`."]
129    #[doc = ""]
130    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/MediaRecorder)"]
131    #[doc = ""]
132    #[doc = "*This API requires the following crate features to be activated: `AudioNode`, `MediaRecorder`*"]
133    pub fn new_with_audio_node(node: &AudioNode) -> Result<MediaRecorder, JsValue>;
134    #[cfg(feature = "AudioNode")]
135    #[wasm_bindgen(catch, constructor, js_class = "MediaRecorder")]
136    #[doc = "The `new MediaRecorder(..)` constructor, creating a new instance of `MediaRecorder`."]
137    #[doc = ""]
138    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/MediaRecorder)"]
139    #[doc = ""]
140    #[doc = "*This API requires the following crate features to be activated: `AudioNode`, `MediaRecorder`*"]
141    pub fn new_with_audio_node_and_u32(
142        node: &AudioNode,
143        output: u32,
144    ) -> Result<MediaRecorder, JsValue>;
145    #[cfg(all(feature = "AudioNode", feature = "MediaRecorderOptions",))]
146    #[wasm_bindgen(catch, constructor, js_class = "MediaRecorder")]
147    #[doc = "The `new MediaRecorder(..)` constructor, creating a new instance of `MediaRecorder`."]
148    #[doc = ""]
149    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/MediaRecorder)"]
150    #[doc = ""]
151    #[doc = "*This API requires the following crate features to be activated: `AudioNode`, `MediaRecorder`, `MediaRecorderOptions`*"]
152    pub fn new_with_audio_node_and_u32_and_options(
153        node: &AudioNode,
154        output: u32,
155        options: &MediaRecorderOptions,
156    ) -> Result<MediaRecorder, JsValue>;
157    # [wasm_bindgen (static_method_of = MediaRecorder , js_class = "MediaRecorder" , js_name = isTypeSupported)]
158    #[doc = "The `isTypeSupported()` method."]
159    #[doc = ""]
160    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/isTypeSupported)"]
161    #[doc = ""]
162    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
163    pub fn is_type_supported(type_: &str) -> bool;
164    # [wasm_bindgen (catch , method , structural , js_class = "MediaRecorder" , js_name = pause)]
165    #[doc = "The `pause()` method."]
166    #[doc = ""]
167    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/pause)"]
168    #[doc = ""]
169    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
170    pub fn pause(this: &MediaRecorder) -> Result<(), JsValue>;
171    # [wasm_bindgen (catch , method , structural , js_class = "MediaRecorder" , js_name = requestData)]
172    #[doc = "The `requestData()` method."]
173    #[doc = ""]
174    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/requestData)"]
175    #[doc = ""]
176    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
177    pub fn request_data(this: &MediaRecorder) -> Result<(), JsValue>;
178    # [wasm_bindgen (catch , method , structural , js_class = "MediaRecorder" , js_name = resume)]
179    #[doc = "The `resume()` method."]
180    #[doc = ""]
181    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/resume)"]
182    #[doc = ""]
183    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
184    pub fn resume(this: &MediaRecorder) -> Result<(), JsValue>;
185    # [wasm_bindgen (catch , method , structural , js_class = "MediaRecorder" , js_name = start)]
186    #[doc = "The `start()` method."]
187    #[doc = ""]
188    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/start)"]
189    #[doc = ""]
190    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
191    pub fn start(this: &MediaRecorder) -> Result<(), JsValue>;
192    # [wasm_bindgen (catch , method , structural , js_class = "MediaRecorder" , js_name = start)]
193    #[doc = "The `start()` method."]
194    #[doc = ""]
195    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/start)"]
196    #[doc = ""]
197    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
198    pub fn start_with_time_slice(this: &MediaRecorder, time_slice: i32) -> Result<(), JsValue>;
199    # [wasm_bindgen (catch , method , structural , js_class = "MediaRecorder" , js_name = stop)]
200    #[doc = "The `stop()` method."]
201    #[doc = ""]
202    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/stop)"]
203    #[doc = ""]
204    #[doc = "*This API requires the following crate features to be activated: `MediaRecorder`*"]
205    pub fn stop(this: &MediaRecorder) -> Result<(), JsValue>;
206}