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