web_sys/features/
gen_RtcEncodedAudioFrameMetadata.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 = RTCEncodedAudioFrameMetadata)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `RtcEncodedAudioFrameMetadata` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
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 RtcEncodedAudioFrameMetadata;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `contributingSources` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
21 #[doc = ""]
22 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 #[wasm_bindgen(method, getter = "contributingSources")]
25 pub fn get_contributing_sources(this: &RtcEncodedAudioFrameMetadata)
26 -> Option<::js_sys::Array>;
27 #[cfg(web_sys_unstable_apis)]
28 #[doc = "Change the `contributingSources` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
34 #[wasm_bindgen(method, setter = "contributingSources")]
35 pub fn set_contributing_sources(
36 this: &RtcEncodedAudioFrameMetadata,
37 val: &::wasm_bindgen::JsValue,
38 );
39 #[cfg(web_sys_unstable_apis)]
40 #[doc = "Get the `mimeType` field of this object."]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
43 #[doc = ""]
44 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
45 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
46 #[wasm_bindgen(method, getter = "mimeType")]
47 pub fn get_mime_type(this: &RtcEncodedAudioFrameMetadata) -> Option<::alloc::string::String>;
48 #[cfg(web_sys_unstable_apis)]
49 #[doc = "Change the `mimeType` field of this object."]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
52 #[doc = ""]
53 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
54 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
55 #[wasm_bindgen(method, setter = "mimeType")]
56 pub fn set_mime_type(this: &RtcEncodedAudioFrameMetadata, val: &str);
57 #[cfg(web_sys_unstable_apis)]
58 #[doc = "Get the `payloadType` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
61 #[doc = ""]
62 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
63 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
64 #[wasm_bindgen(method, getter = "payloadType")]
65 pub fn get_payload_type(this: &RtcEncodedAudioFrameMetadata) -> Option<u8>;
66 #[cfg(web_sys_unstable_apis)]
67 #[doc = "Change the `payloadType` field of this object."]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
70 #[doc = ""]
71 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
72 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
73 #[wasm_bindgen(method, setter = "payloadType")]
74 pub fn set_payload_type(this: &RtcEncodedAudioFrameMetadata, val: u8);
75 #[cfg(web_sys_unstable_apis)]
76 #[doc = "Get the `rtpTimestamp` field of this object."]
77 #[doc = ""]
78 #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
79 #[doc = ""]
80 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
81 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
82 #[wasm_bindgen(method, getter = "rtpTimestamp")]
83 pub fn get_rtp_timestamp(this: &RtcEncodedAudioFrameMetadata) -> Option<u32>;
84 #[cfg(web_sys_unstable_apis)]
85 #[doc = "Change the `rtpTimestamp` field of this object."]
86 #[doc = ""]
87 #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
88 #[doc = ""]
89 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
90 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
91 #[wasm_bindgen(method, setter = "rtpTimestamp")]
92 pub fn set_rtp_timestamp(this: &RtcEncodedAudioFrameMetadata, val: u32);
93 #[cfg(web_sys_unstable_apis)]
94 #[doc = "Get the `sequenceNumber` field of this object."]
95 #[doc = ""]
96 #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
97 #[doc = ""]
98 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
99 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
100 #[wasm_bindgen(method, getter = "sequenceNumber")]
101 pub fn get_sequence_number(this: &RtcEncodedAudioFrameMetadata) -> Option<i16>;
102 #[cfg(web_sys_unstable_apis)]
103 #[doc = "Change the `sequenceNumber` field of this object."]
104 #[doc = ""]
105 #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
106 #[doc = ""]
107 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
108 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
109 #[wasm_bindgen(method, setter = "sequenceNumber")]
110 pub fn set_sequence_number(this: &RtcEncodedAudioFrameMetadata, val: i16);
111 #[cfg(web_sys_unstable_apis)]
112 #[doc = "Get the `synchronizationSource` field of this object."]
113 #[doc = ""]
114 #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
118 #[wasm_bindgen(method, getter = "synchronizationSource")]
119 pub fn get_synchronization_source(this: &RtcEncodedAudioFrameMetadata) -> Option<u32>;
120 #[cfg(web_sys_unstable_apis)]
121 #[doc = "Change the `synchronizationSource` field of this object."]
122 #[doc = ""]
123 #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
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 = "synchronizationSource")]
128 pub fn set_synchronization_source(this: &RtcEncodedAudioFrameMetadata, val: u32);
129}
130#[cfg(web_sys_unstable_apis)]
131impl RtcEncodedAudioFrameMetadata {
132 #[doc = "Construct a new `RtcEncodedAudioFrameMetadata`."]
133 #[doc = ""]
134 #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
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 #[deprecated = "Use `set_contributing_sources()` instead."]
145 pub fn contributing_sources(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
146 self.set_contributing_sources(val);
147 self
148 }
149 #[cfg(web_sys_unstable_apis)]
150 #[deprecated = "Use `set_mime_type()` instead."]
151 pub fn mime_type(&mut self, val: &str) -> &mut Self {
152 self.set_mime_type(val);
153 self
154 }
155 #[cfg(web_sys_unstable_apis)]
156 #[deprecated = "Use `set_payload_type()` instead."]
157 pub fn payload_type(&mut self, val: u8) -> &mut Self {
158 self.set_payload_type(val);
159 self
160 }
161 #[cfg(web_sys_unstable_apis)]
162 #[deprecated = "Use `set_rtp_timestamp()` instead."]
163 pub fn rtp_timestamp(&mut self, val: u32) -> &mut Self {
164 self.set_rtp_timestamp(val);
165 self
166 }
167 #[cfg(web_sys_unstable_apis)]
168 #[deprecated = "Use `set_sequence_number()` instead."]
169 pub fn sequence_number(&mut self, val: i16) -> &mut Self {
170 self.set_sequence_number(val);
171 self
172 }
173 #[cfg(web_sys_unstable_apis)]
174 #[deprecated = "Use `set_synchronization_source()` instead."]
175 pub fn synchronization_source(&mut self, val: u32) -> &mut Self {
176 self.set_synchronization_source(val);
177 self
178 }
179}
180#[cfg(web_sys_unstable_apis)]
181impl Default for RtcEncodedAudioFrameMetadata {
182 fn default() -> Self {
183 Self::new()
184 }
185}