1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "::js_sys::Object",
9 js_name = "VideoFrame",
10 typescript_type = "VideoFrame"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `VideoFrame` class."]
14 #[doc = ""]
15 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame)"]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
18 pub type VideoFrame;
19 #[cfg(feature = "VideoPixelFormat")]
20 #[wasm_bindgen(method, getter, js_class = "VideoFrame", js_name = "format")]
21 #[doc = "Getter for the `format` field of this object."]
22 #[doc = ""]
23 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/format)"]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`, `VideoPixelFormat`*"]
26 pub fn format(this: &VideoFrame) -> Option<VideoPixelFormat>;
27 #[wasm_bindgen(method, getter, js_class = "VideoFrame", js_name = "codedWidth")]
28 #[doc = "Getter for the `codedWidth` field of this object."]
29 #[doc = ""]
30 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/codedWidth)"]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
33 pub fn coded_width(this: &VideoFrame) -> u32;
34 #[wasm_bindgen(method, getter, js_class = "VideoFrame", js_name = "codedHeight")]
35 #[doc = "Getter for the `codedHeight` field of this object."]
36 #[doc = ""]
37 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/codedHeight)"]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
40 pub fn coded_height(this: &VideoFrame) -> u32;
41 #[cfg(feature = "DomRectReadOnly")]
42 #[wasm_bindgen(method, getter, js_class = "VideoFrame", js_name = "codedRect")]
43 #[doc = "Getter for the `codedRect` field of this object."]
44 #[doc = ""]
45 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/codedRect)"]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `DomRectReadOnly`, `VideoFrame`*"]
48 pub fn coded_rect(this: &VideoFrame) -> Option<DomRectReadOnly>;
49 #[cfg(feature = "DomRectReadOnly")]
50 #[wasm_bindgen(method, getter, js_class = "VideoFrame", js_name = "visibleRect")]
51 #[doc = "Getter for the `visibleRect` field of this object."]
52 #[doc = ""]
53 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/visibleRect)"]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `DomRectReadOnly`, `VideoFrame`*"]
56 pub fn visible_rect(this: &VideoFrame) -> Option<DomRectReadOnly>;
57 #[wasm_bindgen(method, getter, js_class = "VideoFrame", js_name = "displayWidth")]
58 #[doc = "Getter for the `displayWidth` field of this object."]
59 #[doc = ""]
60 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/displayWidth)"]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
63 pub fn display_width(this: &VideoFrame) -> u32;
64 #[wasm_bindgen(method, getter, js_class = "VideoFrame", js_name = "displayHeight")]
65 #[doc = "Getter for the `displayHeight` field of this object."]
66 #[doc = ""]
67 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/displayHeight)"]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
70 pub fn display_height(this: &VideoFrame) -> u32;
71 #[wasm_bindgen(method, getter, js_class = "VideoFrame", js_name = "duration")]
72 #[doc = "Getter for the `duration` field of this object."]
73 #[doc = ""]
74 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/duration)"]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
77 pub fn duration(this: &VideoFrame) -> Option<f64>;
78 #[wasm_bindgen(method, getter, js_class = "VideoFrame", js_name = "timestamp")]
79 #[doc = "Getter for the `timestamp` field of this object."]
80 #[doc = ""]
81 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/timestamp)"]
82 #[doc = ""]
83 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
84 pub fn timestamp(this: &VideoFrame) -> f64;
85 #[cfg(feature = "VideoColorSpace")]
86 #[wasm_bindgen(method, getter, js_class = "VideoFrame", js_name = "colorSpace")]
87 #[doc = "Getter for the `colorSpace` field of this object."]
88 #[doc = ""]
89 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/colorSpace)"]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `VideoColorSpace`, `VideoFrame`*"]
92 pub fn color_space(this: &VideoFrame) -> VideoColorSpace;
93 #[cfg(web_sys_unstable_apis)]
94 #[wasm_bindgen(method, getter, js_class = "VideoFrame", js_name = "rotation")]
95 #[doc = "Getter for the `rotation` field of this object."]
96 #[doc = ""]
97 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/rotation)"]
98 #[doc = ""]
99 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
100 #[doc = ""]
101 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
102 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
103 pub fn rotation(this: &VideoFrame) -> f64;
104 #[cfg(web_sys_unstable_apis)]
105 #[wasm_bindgen(method, getter, js_class = "VideoFrame", js_name = "flip")]
106 #[doc = "Getter for the `flip` field of this object."]
107 #[doc = ""]
108 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/flip)"]
109 #[doc = ""]
110 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
111 #[doc = ""]
112 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
113 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
114 pub fn flip(this: &VideoFrame) -> bool;
115 #[cfg(feature = "HtmlImageElement")]
116 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
117 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
118 #[doc = ""]
119 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
120 #[doc = ""]
121 #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`, `VideoFrame`*"]
122 pub fn new_with_html_image_element(image: &HtmlImageElement) -> Result<VideoFrame, JsValue>;
123 #[cfg(feature = "SvgImageElement")]
124 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
125 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
126 #[doc = ""]
127 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
128 #[doc = ""]
129 #[doc = "*This API requires the following crate features to be activated: `SvgImageElement`, `VideoFrame`*"]
130 pub fn new_with_svg_image_element(image: &SvgImageElement) -> Result<VideoFrame, JsValue>;
131 #[cfg(feature = "HtmlCanvasElement")]
132 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
133 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
134 #[doc = ""]
135 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
136 #[doc = ""]
137 #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `VideoFrame`*"]
138 pub fn new_with_html_canvas_element(image: &HtmlCanvasElement) -> Result<VideoFrame, JsValue>;
139 #[cfg(feature = "HtmlVideoElement")]
140 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
141 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
142 #[doc = ""]
143 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
144 #[doc = ""]
145 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`, `VideoFrame`*"]
146 pub fn new_with_html_video_element(image: &HtmlVideoElement) -> Result<VideoFrame, JsValue>;
147 #[cfg(feature = "ImageBitmap")]
148 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
149 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
150 #[doc = ""]
151 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
152 #[doc = ""]
153 #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`, `VideoFrame`*"]
154 pub fn new_with_image_bitmap(image: &ImageBitmap) -> Result<VideoFrame, JsValue>;
155 #[cfg(feature = "OffscreenCanvas")]
156 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
157 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
158 #[doc = ""]
159 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
160 #[doc = ""]
161 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvas`, `VideoFrame`*"]
162 pub fn new_with_offscreen_canvas(image: &OffscreenCanvas) -> Result<VideoFrame, JsValue>;
163 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
164 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
165 #[doc = ""]
166 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
167 #[doc = ""]
168 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
169 pub fn new_with_video_frame(image: &VideoFrame) -> Result<VideoFrame, JsValue>;
170 #[cfg(all(feature = "HtmlImageElement", feature = "VideoFrameInit",))]
171 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
172 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
173 #[doc = ""]
174 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
175 #[doc = ""]
176 #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`, `VideoFrame`, `VideoFrameInit`*"]
177 pub fn new_with_html_image_element_and_video_frame_init(
178 image: &HtmlImageElement,
179 init: &VideoFrameInit,
180 ) -> Result<VideoFrame, JsValue>;
181 #[cfg(all(feature = "SvgImageElement", feature = "VideoFrameInit",))]
182 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
183 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
184 #[doc = ""]
185 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
186 #[doc = ""]
187 #[doc = "*This API requires the following crate features to be activated: `SvgImageElement`, `VideoFrame`, `VideoFrameInit`*"]
188 pub fn new_with_svg_image_element_and_video_frame_init(
189 image: &SvgImageElement,
190 init: &VideoFrameInit,
191 ) -> Result<VideoFrame, JsValue>;
192 #[cfg(all(feature = "HtmlCanvasElement", feature = "VideoFrameInit",))]
193 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
194 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
195 #[doc = ""]
196 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
197 #[doc = ""]
198 #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `VideoFrame`, `VideoFrameInit`*"]
199 pub fn new_with_html_canvas_element_and_video_frame_init(
200 image: &HtmlCanvasElement,
201 init: &VideoFrameInit,
202 ) -> Result<VideoFrame, JsValue>;
203 #[cfg(all(feature = "HtmlVideoElement", feature = "VideoFrameInit",))]
204 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
205 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
206 #[doc = ""]
207 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
208 #[doc = ""]
209 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`, `VideoFrame`, `VideoFrameInit`*"]
210 pub fn new_with_html_video_element_and_video_frame_init(
211 image: &HtmlVideoElement,
212 init: &VideoFrameInit,
213 ) -> Result<VideoFrame, JsValue>;
214 #[cfg(all(feature = "ImageBitmap", feature = "VideoFrameInit",))]
215 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
216 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
217 #[doc = ""]
218 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
219 #[doc = ""]
220 #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`, `VideoFrame`, `VideoFrameInit`*"]
221 pub fn new_with_image_bitmap_and_video_frame_init(
222 image: &ImageBitmap,
223 init: &VideoFrameInit,
224 ) -> Result<VideoFrame, JsValue>;
225 #[cfg(all(feature = "OffscreenCanvas", feature = "VideoFrameInit",))]
226 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
227 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
228 #[doc = ""]
229 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
230 #[doc = ""]
231 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvas`, `VideoFrame`, `VideoFrameInit`*"]
232 pub fn new_with_offscreen_canvas_and_video_frame_init(
233 image: &OffscreenCanvas,
234 init: &VideoFrameInit,
235 ) -> Result<VideoFrame, JsValue>;
236 #[cfg(feature = "VideoFrameInit")]
237 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
238 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
239 #[doc = ""]
240 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
241 #[doc = ""]
242 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`, `VideoFrameInit`*"]
243 pub fn new_with_video_frame_and_video_frame_init(
244 image: &VideoFrame,
245 init: &VideoFrameInit,
246 ) -> Result<VideoFrame, JsValue>;
247 #[cfg(feature = "VideoFrameBufferInit")]
248 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
249 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
250 #[doc = ""]
251 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
252 #[doc = ""]
253 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`, `VideoFrameBufferInit`*"]
254 pub fn new_with_buffer_source_and_video_frame_buffer_init(
255 data: &::js_sys::Object,
256 init: &VideoFrameBufferInit,
257 ) -> Result<VideoFrame, JsValue>;
258 #[cfg(feature = "VideoFrameBufferInit")]
259 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
260 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
261 #[doc = ""]
262 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
263 #[doc = ""]
264 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`, `VideoFrameBufferInit`*"]
265 pub fn new_with_u8_slice_and_video_frame_buffer_init(
266 data: &mut [u8],
267 init: &VideoFrameBufferInit,
268 ) -> Result<VideoFrame, JsValue>;
269 #[cfg(feature = "VideoFrameBufferInit")]
270 #[wasm_bindgen(catch, constructor, js_class = "VideoFrame")]
271 #[doc = "The `new VideoFrame(..)` constructor, creating a new instance of `VideoFrame`."]
272 #[doc = ""]
273 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame)"]
274 #[doc = ""]
275 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`, `VideoFrameBufferInit`*"]
276 pub fn new_with_u8_array_and_video_frame_buffer_init(
277 data: &::js_sys::Uint8Array,
278 init: &VideoFrameBufferInit,
279 ) -> Result<VideoFrame, JsValue>;
280 #[wasm_bindgen(catch, method, js_class = "VideoFrame", js_name = "allocationSize")]
281 #[doc = "The `allocationSize()` method."]
282 #[doc = ""]
283 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/allocationSize)"]
284 #[doc = ""]
285 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
286 pub fn allocation_size(this: &VideoFrame) -> Result<u32, JsValue>;
287 #[cfg(feature = "VideoFrameCopyToOptions")]
288 #[wasm_bindgen(catch, method, js_class = "VideoFrame", js_name = "allocationSize")]
289 #[doc = "The `allocationSize()` method."]
290 #[doc = ""]
291 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/allocationSize)"]
292 #[doc = ""]
293 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`, `VideoFrameCopyToOptions`*"]
294 pub fn allocation_size_with_options(
295 this: &VideoFrame,
296 options: &VideoFrameCopyToOptions,
297 ) -> Result<u32, JsValue>;
298 #[wasm_bindgen(catch, method, js_class = "VideoFrame")]
299 #[doc = "The `clone()` method."]
300 #[doc = ""]
301 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/clone)"]
302 #[doc = ""]
303 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
304 pub fn clone(this: &VideoFrame) -> Result<VideoFrame, JsValue>;
305 #[wasm_bindgen(method, js_class = "VideoFrame")]
306 #[doc = "The `close()` method."]
307 #[doc = ""]
308 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/close)"]
309 #[doc = ""]
310 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`*"]
311 pub fn close(this: &VideoFrame);
312 #[cfg(feature = "PlaneLayout")]
313 #[wasm_bindgen(method, js_class = "VideoFrame", js_name = "copyTo")]
314 #[doc = "The `copyTo()` method."]
315 #[doc = ""]
316 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/copyTo)"]
317 #[doc = ""]
318 #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`, `VideoFrame`*"]
319 pub fn copy_to_with_buffer_source(
320 this: &VideoFrame,
321 destination: &::js_sys::Object,
322 ) -> ::js_sys::Promise<::js_sys::Array<PlaneLayout>>;
323 #[cfg(feature = "PlaneLayout")]
324 #[wasm_bindgen(method, js_class = "VideoFrame", js_name = "copyTo")]
325 #[doc = "The `copyTo()` method."]
326 #[doc = ""]
327 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/copyTo)"]
328 #[doc = ""]
329 #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`, `VideoFrame`*"]
330 pub fn copy_to_with_u8_slice(
331 this: &VideoFrame,
332 destination: &mut [u8],
333 ) -> ::js_sys::Promise<::js_sys::Array<PlaneLayout>>;
334 #[cfg(feature = "PlaneLayout")]
335 #[wasm_bindgen(method, js_class = "VideoFrame", js_name = "copyTo")]
336 #[doc = "The `copyTo()` method."]
337 #[doc = ""]
338 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/copyTo)"]
339 #[doc = ""]
340 #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`, `VideoFrame`*"]
341 pub fn copy_to_with_u8_array(
342 this: &VideoFrame,
343 destination: &::js_sys::Uint8Array,
344 ) -> ::js_sys::Promise<::js_sys::Array<PlaneLayout>>;
345 #[cfg(all(feature = "PlaneLayout", feature = "VideoFrameCopyToOptions",))]
346 #[wasm_bindgen(method, js_class = "VideoFrame", js_name = "copyTo")]
347 #[doc = "The `copyTo()` method."]
348 #[doc = ""]
349 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/copyTo)"]
350 #[doc = ""]
351 #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`, `VideoFrame`, `VideoFrameCopyToOptions`*"]
352 pub fn copy_to_with_buffer_source_and_options(
353 this: &VideoFrame,
354 destination: &::js_sys::Object,
355 options: &VideoFrameCopyToOptions,
356 ) -> ::js_sys::Promise<::js_sys::Array<PlaneLayout>>;
357 #[cfg(all(feature = "PlaneLayout", feature = "VideoFrameCopyToOptions",))]
358 #[wasm_bindgen(method, js_class = "VideoFrame", js_name = "copyTo")]
359 #[doc = "The `copyTo()` method."]
360 #[doc = ""]
361 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/copyTo)"]
362 #[doc = ""]
363 #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`, `VideoFrame`, `VideoFrameCopyToOptions`*"]
364 pub fn copy_to_with_u8_slice_and_options(
365 this: &VideoFrame,
366 destination: &mut [u8],
367 options: &VideoFrameCopyToOptions,
368 ) -> ::js_sys::Promise<::js_sys::Array<PlaneLayout>>;
369 #[cfg(all(feature = "PlaneLayout", feature = "VideoFrameCopyToOptions",))]
370 #[wasm_bindgen(method, js_class = "VideoFrame", js_name = "copyTo")]
371 #[doc = "The `copyTo()` method."]
372 #[doc = ""]
373 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/copyTo)"]
374 #[doc = ""]
375 #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`, `VideoFrame`, `VideoFrameCopyToOptions`*"]
376 pub fn copy_to_with_u8_array_and_options(
377 this: &VideoFrame,
378 destination: &::js_sys::Uint8Array,
379 options: &VideoFrameCopyToOptions,
380 ) -> ::js_sys::Promise<::js_sys::Array<PlaneLayout>>;
381 #[cfg(web_sys_unstable_apis)]
382 #[cfg(feature = "VideoFrameMetadata")]
383 #[wasm_bindgen(method, js_class = "VideoFrame")]
384 #[doc = "The `metadata()` method."]
385 #[doc = ""]
386 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/metadata)"]
387 #[doc = ""]
388 #[doc = "*This API requires the following crate features to be activated: `VideoFrame`, `VideoFrameMetadata`*"]
389 #[doc = ""]
390 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
391 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
392 pub fn metadata(this: &VideoFrame) -> VideoFrameMetadata;
393}