web_sys/features/
gen_VideoFrameBufferInit.rs#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = VideoFrameBufferInit)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `VideoFrameBufferInit` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type VideoFrameBufferInit;
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `codedHeight` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "codedHeight")]
pub fn get_coded_height(this: &VideoFrameBufferInit) -> u32;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `codedHeight` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "codedHeight")]
pub fn set_coded_height(this: &VideoFrameBufferInit, val: u32);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `codedWidth` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "codedWidth")]
pub fn get_coded_width(this: &VideoFrameBufferInit) -> u32;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `codedWidth` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "codedWidth")]
pub fn set_coded_width(this: &VideoFrameBufferInit, val: u32);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "VideoColorSpaceInit")]
#[doc = "Get the `colorSpace` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "colorSpace")]
pub fn get_color_space(this: &VideoFrameBufferInit) -> Option<VideoColorSpaceInit>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "VideoColorSpaceInit")]
#[doc = "Change the `colorSpace` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "colorSpace")]
pub fn set_color_space(this: &VideoFrameBufferInit, val: &VideoColorSpaceInit);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `displayHeight` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "displayHeight")]
pub fn get_display_height(this: &VideoFrameBufferInit) -> Option<u32>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `displayHeight` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "displayHeight")]
pub fn set_display_height(this: &VideoFrameBufferInit, val: u32);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `displayWidth` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "displayWidth")]
pub fn get_display_width(this: &VideoFrameBufferInit) -> Option<u32>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `displayWidth` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "displayWidth")]
pub fn set_display_width(this: &VideoFrameBufferInit, val: u32);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `duration` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "duration")]
pub fn get_duration(this: &VideoFrameBufferInit) -> Option<f64>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `duration` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "duration")]
pub fn set_duration(this: &VideoFrameBufferInit, val: f64);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "VideoPixelFormat")]
#[doc = "Get the `format` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`, `VideoPixelFormat`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "format")]
pub fn get_format(this: &VideoFrameBufferInit) -> VideoPixelFormat;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "VideoPixelFormat")]
#[doc = "Change the `format` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`, `VideoPixelFormat`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "format")]
pub fn set_format(this: &VideoFrameBufferInit, val: VideoPixelFormat);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `layout` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "layout")]
pub fn get_layout(this: &VideoFrameBufferInit) -> Option<::js_sys::Array>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `layout` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "layout")]
pub fn set_layout(this: &VideoFrameBufferInit, val: &::wasm_bindgen::JsValue);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `timestamp` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "timestamp")]
pub fn get_timestamp(this: &VideoFrameBufferInit) -> f64;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `timestamp` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "timestamp")]
pub fn set_timestamp(this: &VideoFrameBufferInit, val: f64);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "DomRectInit")]
#[doc = "Get the `visibleRect` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "visibleRect")]
pub fn get_visible_rect(this: &VideoFrameBufferInit) -> Option<DomRectInit>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "DomRectInit")]
#[doc = "Change the `visibleRect` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameBufferInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "visibleRect")]
pub fn set_visible_rect(this: &VideoFrameBufferInit, val: &DomRectInit);
}
#[cfg(web_sys_unstable_apis)]
impl VideoFrameBufferInit {
#[cfg(feature = "VideoPixelFormat")]
#[doc = "Construct a new `VideoFrameBufferInit`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`, `VideoPixelFormat`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new(
coded_height: u32,
coded_width: u32,
format: VideoPixelFormat,
timestamp: f64,
) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.coded_height(coded_height);
ret.coded_width(coded_width);
ret.format(format);
ret.timestamp(timestamp);
ret
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_coded_height()` instead."]
pub fn coded_height(&mut self, val: u32) -> &mut Self {
self.set_coded_height(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_coded_width()` instead."]
pub fn coded_width(&mut self, val: u32) -> &mut Self {
self.set_coded_width(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "VideoColorSpaceInit")]
#[deprecated = "Use `set_color_space()` instead."]
pub fn color_space(&mut self, val: &VideoColorSpaceInit) -> &mut Self {
self.set_color_space(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_display_height()` instead."]
pub fn display_height(&mut self, val: u32) -> &mut Self {
self.set_display_height(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_display_width()` instead."]
pub fn display_width(&mut self, val: u32) -> &mut Self {
self.set_display_width(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_duration()` instead."]
pub fn duration(&mut self, val: f64) -> &mut Self {
self.set_duration(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "VideoPixelFormat")]
#[deprecated = "Use `set_format()` instead."]
pub fn format(&mut self, val: VideoPixelFormat) -> &mut Self {
self.set_format(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_layout()` instead."]
pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
self.set_layout(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_timestamp()` instead."]
pub fn timestamp(&mut self, val: f64) -> &mut Self {
self.set_timestamp(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "DomRectInit")]
#[deprecated = "Use `set_visible_rect()` instead."]
pub fn visible_rect(&mut self, val: &DomRectInit) -> &mut Self {
self.set_visible_rect(val);
self
}
}