web_sys/features/
gen_VideoFrameInit.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = VideoFrameInit)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `VideoFrameInit` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"]
13 #[doc = ""]
14 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type VideoFrameInit;
17 #[cfg(web_sys_unstable_apis)]
18 #[cfg(feature = "AlphaOption")]
19 #[doc = "Get the `alpha` field of this object."]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `AlphaOption`, `VideoFrameInit`*"]
22 #[doc = ""]
23 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
24 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
25 #[wasm_bindgen(method, getter = "alpha")]
26 pub fn get_alpha(this: &VideoFrameInit) -> Option<AlphaOption>;
27 #[cfg(web_sys_unstable_apis)]
28 #[cfg(feature = "AlphaOption")]
29 #[doc = "Change the `alpha` field of this object."]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `AlphaOption`, `VideoFrameInit`*"]
32 #[doc = ""]
33 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
34 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
35 #[wasm_bindgen(method, setter = "alpha")]
36 pub fn set_alpha(this: &VideoFrameInit, val: AlphaOption);
37 #[cfg(web_sys_unstable_apis)]
38 #[doc = "Get the `displayHeight` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"]
41 #[doc = ""]
42 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
43 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
44 #[wasm_bindgen(method, getter = "displayHeight")]
45 pub fn get_display_height(this: &VideoFrameInit) -> Option<u32>;
46 #[cfg(web_sys_unstable_apis)]
47 #[doc = "Change the `displayHeight` field of this object."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"]
50 #[doc = ""]
51 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
52 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
53 #[wasm_bindgen(method, setter = "displayHeight")]
54 pub fn set_display_height(this: &VideoFrameInit, val: u32);
55 #[cfg(web_sys_unstable_apis)]
56 #[doc = "Get the `displayWidth` field of this object."]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"]
59 #[doc = ""]
60 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
61 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
62 #[wasm_bindgen(method, getter = "displayWidth")]
63 pub fn get_display_width(this: &VideoFrameInit) -> Option<u32>;
64 #[cfg(web_sys_unstable_apis)]
65 #[doc = "Change the `displayWidth` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"]
68 #[doc = ""]
69 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
70 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
71 #[wasm_bindgen(method, setter = "displayWidth")]
72 pub fn set_display_width(this: &VideoFrameInit, val: u32);
73 #[cfg(web_sys_unstable_apis)]
74 #[doc = "Get the `duration` field of this object."]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"]
77 #[doc = ""]
78 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
79 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
80 #[wasm_bindgen(method, getter = "duration")]
81 pub fn get_duration(this: &VideoFrameInit) -> Option<f64>;
82 #[cfg(web_sys_unstable_apis)]
83 #[doc = "Change the `duration` field of this object."]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"]
86 #[doc = ""]
87 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
88 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
89 #[wasm_bindgen(method, setter = "duration")]
90 pub fn set_duration(this: &VideoFrameInit, val: f64);
91 #[cfg(web_sys_unstable_apis)]
92 #[doc = "Get the `timestamp` field of this object."]
93 #[doc = ""]
94 #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"]
95 #[doc = ""]
96 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
97 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
98 #[wasm_bindgen(method, getter = "timestamp")]
99 pub fn get_timestamp(this: &VideoFrameInit) -> Option<f64>;
100 #[cfg(web_sys_unstable_apis)]
101 #[doc = "Change the `timestamp` field of this object."]
102 #[doc = ""]
103 #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"]
104 #[doc = ""]
105 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
106 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
107 #[wasm_bindgen(method, setter = "timestamp")]
108 pub fn set_timestamp(this: &VideoFrameInit, val: f64);
109 #[cfg(web_sys_unstable_apis)]
110 #[cfg(feature = "DomRectInit")]
111 #[doc = "Get the `visibleRect` field of this object."]
112 #[doc = ""]
113 #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameInit`*"]
114 #[doc = ""]
115 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
116 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
117 #[wasm_bindgen(method, getter = "visibleRect")]
118 pub fn get_visible_rect(this: &VideoFrameInit) -> Option<DomRectInit>;
119 #[cfg(web_sys_unstable_apis)]
120 #[cfg(feature = "DomRectInit")]
121 #[doc = "Change the `visibleRect` field of this object."]
122 #[doc = ""]
123 #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameInit`*"]
124 #[doc = ""]
125 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
126 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
127 #[wasm_bindgen(method, setter = "visibleRect")]
128 pub fn set_visible_rect(this: &VideoFrameInit, val: &DomRectInit);
129}
130#[cfg(web_sys_unstable_apis)]
131impl VideoFrameInit {
132 #[doc = "Construct a new `VideoFrameInit`."]
133 #[doc = ""]
134 #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"]
135 #[doc = ""]
136 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
137 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
138 pub fn new() -> Self {
139 #[allow(unused_mut)]
140 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
141 ret
142 }
143 #[cfg(web_sys_unstable_apis)]
144 #[cfg(feature = "AlphaOption")]
145 #[deprecated = "Use `set_alpha()` instead."]
146 pub fn alpha(&mut self, val: AlphaOption) -> &mut Self {
147 self.set_alpha(val);
148 self
149 }
150 #[cfg(web_sys_unstable_apis)]
151 #[deprecated = "Use `set_display_height()` instead."]
152 pub fn display_height(&mut self, val: u32) -> &mut Self {
153 self.set_display_height(val);
154 self
155 }
156 #[cfg(web_sys_unstable_apis)]
157 #[deprecated = "Use `set_display_width()` instead."]
158 pub fn display_width(&mut self, val: u32) -> &mut Self {
159 self.set_display_width(val);
160 self
161 }
162 #[cfg(web_sys_unstable_apis)]
163 #[deprecated = "Use `set_duration()` instead."]
164 pub fn duration(&mut self, val: f64) -> &mut Self {
165 self.set_duration(val);
166 self
167 }
168 #[cfg(web_sys_unstable_apis)]
169 #[deprecated = "Use `set_timestamp()` instead."]
170 pub fn timestamp(&mut self, val: f64) -> &mut Self {
171 self.set_timestamp(val);
172 self
173 }
174 #[cfg(web_sys_unstable_apis)]
175 #[cfg(feature = "DomRectInit")]
176 #[deprecated = "Use `set_visible_rect()` instead."]
177 pub fn visible_rect(&mut self, val: &DomRectInit) -> &mut Self {
178 self.set_visible_rect(val);
179 self
180 }
181}
182#[cfg(web_sys_unstable_apis)]
183impl Default for VideoFrameInit {
184 fn default() -> Self {
185 Self::new()
186 }
187}