web_sys/features/
gen_VideoFrameCopyToOptions.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = VideoFrameCopyToOptions)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `VideoFrameCopyToOptions` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"]
12 pub type VideoFrameCopyToOptions;
13 #[cfg(feature = "VideoPixelFormat")]
14 #[doc = "Get the `format` field of this object."]
15 #[doc = ""]
16 #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`, `VideoPixelFormat`*"]
17 #[wasm_bindgen(method, getter = "format")]
18 pub fn get_format(this: &VideoFrameCopyToOptions) -> Option<VideoPixelFormat>;
19 #[cfg(feature = "VideoPixelFormat")]
20 #[doc = "Change the `format` field of this object."]
21 #[doc = ""]
22 #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`, `VideoPixelFormat`*"]
23 #[wasm_bindgen(method, setter = "format")]
24 pub fn set_format(this: &VideoFrameCopyToOptions, val: VideoPixelFormat);
25 #[cfg(feature = "PlaneLayout")]
26 #[doc = "Get the `layout` field of this object."]
27 #[doc = ""]
28 #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`, `VideoFrameCopyToOptions`*"]
29 #[wasm_bindgen(method, getter = "layout")]
30 pub fn get_layout(this: &VideoFrameCopyToOptions) -> Option<::js_sys::Array<PlaneLayout>>;
31 #[cfg(feature = "PlaneLayout")]
32 #[doc = "Change the `layout` field of this object."]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`, `VideoFrameCopyToOptions`*"]
35 #[wasm_bindgen(method, setter = "layout")]
36 pub fn set_layout(this: &VideoFrameCopyToOptions, val: &[PlaneLayout]);
37 #[cfg(feature = "DomRectInit")]
38 #[doc = "Get the `rect` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameCopyToOptions`*"]
41 #[wasm_bindgen(method, getter = "rect")]
42 pub fn get_rect(this: &VideoFrameCopyToOptions) -> Option<DomRectInit>;
43 #[cfg(feature = "DomRectInit")]
44 #[doc = "Change the `rect` field of this object."]
45 #[doc = ""]
46 #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameCopyToOptions`*"]
47 #[wasm_bindgen(method, setter = "rect")]
48 pub fn set_rect(this: &VideoFrameCopyToOptions, val: &DomRectInit);
49}
50impl VideoFrameCopyToOptions {
51 #[doc = "Construct a new `VideoFrameCopyToOptions`."]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"]
54 pub fn new() -> Self {
55 #[allow(unused_mut)]
56 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
57 ret
58 }
59 #[cfg(feature = "VideoPixelFormat")]
60 #[deprecated = "Use `set_format()` instead."]
61 pub fn format(&mut self, val: VideoPixelFormat) -> &mut Self {
62 self.set_format(val);
63 self
64 }
65 #[cfg(feature = "PlaneLayout")]
66 #[deprecated = "Use `set_layout()` instead."]
67 pub fn layout(&mut self, val: &[PlaneLayout]) -> &mut Self {
68 self.set_layout(val);
69 self
70 }
71 #[cfg(feature = "DomRectInit")]
72 #[deprecated = "Use `set_rect()` instead."]
73 pub fn rect(&mut self, val: &DomRectInit) -> &mut Self {
74 self.set_rect(val);
75 self
76 }
77}
78impl Default for VideoFrameCopyToOptions {
79 fn default() -> Self {
80 Self::new()
81 }
82}