Skip to main content

web_sys/features/
gen_EncodedVideoChunk.rs

1#![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(
9        extends = "::js_sys::Object",
10        js_name = "EncodedVideoChunk",
11        typescript_type = "EncodedVideoChunk"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `EncodedVideoChunk` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedVideoChunk)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunk`*"]
19    #[doc = ""]
20    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
21    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
22    pub type EncodedVideoChunk;
23    #[cfg(web_sys_unstable_apis)]
24    #[cfg(feature = "EncodedVideoChunkType")]
25    #[wasm_bindgen(method, getter, js_class = "EncodedVideoChunk", js_name = "type")]
26    #[doc = "Getter for the `type` field of this object."]
27    #[doc = ""]
28    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedVideoChunk/type)"]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunk`, `EncodedVideoChunkType`*"]
31    #[doc = ""]
32    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
33    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
34    pub fn type_(this: &EncodedVideoChunk) -> EncodedVideoChunkType;
35    #[cfg(web_sys_unstable_apis)]
36    #[wasm_bindgen(method, getter, js_class = "EncodedVideoChunk", js_name = "timestamp")]
37    #[doc = "Getter for the `timestamp` field of this object."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedVideoChunk/timestamp)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunk`*"]
42    #[doc = ""]
43    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
44    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
45    pub fn timestamp(this: &EncodedVideoChunk) -> f64;
46    #[cfg(web_sys_unstable_apis)]
47    #[wasm_bindgen(method, getter, js_class = "EncodedVideoChunk", js_name = "duration")]
48    #[doc = "Getter for the `duration` field of this object."]
49    #[doc = ""]
50    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedVideoChunk/duration)"]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunk`*"]
53    #[doc = ""]
54    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
55    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
56    pub fn duration(this: &EncodedVideoChunk) -> Option<f64>;
57    #[cfg(web_sys_unstable_apis)]
58    #[wasm_bindgen(method, getter, js_class = "EncodedVideoChunk", js_name = "byteLength")]
59    #[doc = "Getter for the `byteLength` field of this object."]
60    #[doc = ""]
61    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedVideoChunk/byteLength)"]
62    #[doc = ""]
63    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunk`*"]
64    #[doc = ""]
65    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
66    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
67    pub fn byte_length(this: &EncodedVideoChunk) -> u32;
68    #[cfg(web_sys_unstable_apis)]
69    #[cfg(feature = "EncodedVideoChunkInit")]
70    #[wasm_bindgen(catch, constructor, js_class = "EncodedVideoChunk")]
71    #[doc = "The `new EncodedVideoChunk(..)` constructor, creating a new instance of `EncodedVideoChunk`."]
72    #[doc = ""]
73    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedVideoChunk/EncodedVideoChunk)"]
74    #[doc = ""]
75    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunk`, `EncodedVideoChunkInit`*"]
76    #[doc = ""]
77    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
78    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
79    pub fn new(init: &EncodedVideoChunkInit) -> Result<EncodedVideoChunk, JsValue>;
80    #[cfg(web_sys_unstable_apis)]
81    #[wasm_bindgen(catch, method, js_class = "EncodedVideoChunk", js_name = "copyTo")]
82    #[doc = "The `copyTo()` method."]
83    #[doc = ""]
84    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedVideoChunk/copyTo)"]
85    #[doc = ""]
86    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunk`*"]
87    #[doc = ""]
88    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
89    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
90    pub fn copy_to_with_buffer_source(
91        this: &EncodedVideoChunk,
92        destination: &::js_sys::Object,
93    ) -> Result<(), JsValue>;
94    #[cfg(web_sys_unstable_apis)]
95    #[wasm_bindgen(catch, method, js_class = "EncodedVideoChunk", js_name = "copyTo")]
96    #[doc = "The `copyTo()` method."]
97    #[doc = ""]
98    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedVideoChunk/copyTo)"]
99    #[doc = ""]
100    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunk`*"]
101    #[doc = ""]
102    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
103    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
104    pub fn copy_to_with_u8_slice(
105        this: &EncodedVideoChunk,
106        destination: &mut [u8],
107    ) -> Result<(), JsValue>;
108    #[cfg(web_sys_unstable_apis)]
109    #[wasm_bindgen(catch, method, js_class = "EncodedVideoChunk", js_name = "copyTo")]
110    #[doc = "The `copyTo()` method."]
111    #[doc = ""]
112    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedVideoChunk/copyTo)"]
113    #[doc = ""]
114    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunk`*"]
115    #[doc = ""]
116    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
117    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
118    pub fn copy_to_with_u8_array(
119        this: &EncodedVideoChunk,
120        destination: &::js_sys::Uint8Array,
121    ) -> Result<(), JsValue>;
122}