#![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 = VideoEncoderConfig)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `VideoEncoderConfig` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
#[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 VideoEncoderConfig;
#[cfg(feature = "AlphaOption")]
#[wasm_bindgen(method, setter = "alpha")]
fn alpha_shim(this: &VideoEncoderConfig, val: AlphaOption);
#[wasm_bindgen(method, setter = "bitrate")]
fn bitrate_shim(this: &VideoEncoderConfig, val: f64);
#[wasm_bindgen(method, setter = "codec")]
fn codec_shim(this: &VideoEncoderConfig, val: &str);
#[wasm_bindgen(method, setter = "displayHeight")]
fn display_height_shim(this: &VideoEncoderConfig, val: u32);
#[wasm_bindgen(method, setter = "displayWidth")]
fn display_width_shim(this: &VideoEncoderConfig, val: u32);
#[wasm_bindgen(method, setter = "framerate")]
fn framerate_shim(this: &VideoEncoderConfig, val: f64);
#[cfg(feature = "HardwareAcceleration")]
#[wasm_bindgen(method, setter = "hardwareAcceleration")]
fn hardware_acceleration_shim(this: &VideoEncoderConfig, val: HardwareAcceleration);
#[wasm_bindgen(method, setter = "height")]
fn height_shim(this: &VideoEncoderConfig, val: u32);
#[cfg(feature = "LatencyMode")]
#[wasm_bindgen(method, setter = "latencyMode")]
fn latency_mode_shim(this: &VideoEncoderConfig, val: LatencyMode);
#[wasm_bindgen(method, setter = "scalabilityMode")]
fn scalability_mode_shim(this: &VideoEncoderConfig, val: &str);
#[wasm_bindgen(method, setter = "width")]
fn width_shim(this: &VideoEncoderConfig, val: u32);
}
#[cfg(web_sys_unstable_apis)]
impl VideoEncoderConfig {
#[doc = "Construct a new `VideoEncoderConfig`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
#[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(codec: &str, height: u32, width: u32) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.codec(codec);
ret.height(height);
ret.width(width);
ret
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "AlphaOption")]
#[doc = "Change the `alpha` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AlphaOption`, `VideoEncoderConfig`*"]
#[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 alpha(&mut self, val: AlphaOption) -> &mut Self {
self.alpha_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `bitrate` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
#[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 bitrate(&mut self, val: f64) -> &mut Self {
self.bitrate_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `codec` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
#[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 codec(&mut self, val: &str) -> &mut Self {
self.codec_shim(val);
self
}
#[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: `VideoEncoderConfig`*"]
#[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 display_height(&mut self, val: u32) -> &mut Self {
self.display_height_shim(val);
self
}
#[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: `VideoEncoderConfig`*"]
#[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 display_width(&mut self, val: u32) -> &mut Self {
self.display_width_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `framerate` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
#[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 framerate(&mut self, val: f64) -> &mut Self {
self.framerate_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "HardwareAcceleration")]
#[doc = "Change the `hardwareAcceleration` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `HardwareAcceleration`, `VideoEncoderConfig`*"]
#[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 hardware_acceleration(&mut self, val: HardwareAcceleration) -> &mut Self {
self.hardware_acceleration_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `height` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
#[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 height(&mut self, val: u32) -> &mut Self {
self.height_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "LatencyMode")]
#[doc = "Change the `latencyMode` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `LatencyMode`, `VideoEncoderConfig`*"]
#[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 latency_mode(&mut self, val: LatencyMode) -> &mut Self {
self.latency_mode_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `scalabilityMode` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
#[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 scalability_mode(&mut self, val: &str) -> &mut Self {
self.scalability_mode_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `width` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
#[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 width(&mut self, val: u32) -> &mut Self {
self.width_shim(val);
self
}
}