Skip to main content

web_sys/features/
gen_RtcRtpReceiver.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "::js_sys::Object",
9        js_name = "RTCRtpReceiver",
10        typescript_type = "RTCRtpReceiver"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `RtcRtpReceiver` class."]
14    #[doc = ""]
15    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver)"]
16    #[doc = ""]
17    #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`*"]
18    pub type RtcRtpReceiver;
19    #[cfg(feature = "MediaStreamTrack")]
20    #[wasm_bindgen(method, getter, js_class = "RTCRtpReceiver", js_name = "track")]
21    #[doc = "Getter for the `track` field of this object."]
22    #[doc = ""]
23    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver/track)"]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `RtcRtpReceiver`*"]
26    pub fn track(this: &RtcRtpReceiver) -> MediaStreamTrack;
27    #[cfg(web_sys_unstable_apis)]
28    #[wasm_bindgen(
29        method,
30        getter,
31        js_class = "RTCRtpReceiver",
32        js_name = "jitterBufferTarget"
33    )]
34    #[doc = "Getter for the `jitterBufferTarget` field of this object."]
35    #[doc = ""]
36    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver/jitterBufferTarget)"]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`*"]
39    #[doc = ""]
40    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
42    pub fn jitter_buffer_target(this: &RtcRtpReceiver) -> Option<f64>;
43    #[cfg(web_sys_unstable_apis)]
44    #[wasm_bindgen(
45        catch,
46        method,
47        setter,
48        js_class = "RTCRtpReceiver",
49        js_name = "jitterBufferTarget"
50    )]
51    #[doc = "Setter for the `jitterBufferTarget` field of this object."]
52    #[doc = ""]
53    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver/jitterBufferTarget)"]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`*"]
56    #[doc = ""]
57    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
58    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
59    pub fn set_jitter_buffer_target(
60        this: &RtcRtpReceiver,
61        value: Option<f64>,
62    ) -> Result<(), JsValue>;
63    #[cfg(web_sys_unstable_apis)]
64    #[wasm_bindgen(method, getter, js_class = "RTCRtpReceiver", js_name = "transform")]
65    #[doc = "Getter for the `transform` field of this object."]
66    #[doc = ""]
67    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver/transform)"]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
73    pub fn transform(this: &RtcRtpReceiver) -> Option<::js_sys::Object>;
74    #[cfg(web_sys_unstable_apis)]
75    #[cfg(feature = "SFrameTransform")]
76    #[wasm_bindgen(method, setter, js_class = "RTCRtpReceiver", js_name = "transform")]
77    #[doc = "Setter for the `transform` field of this object."]
78    #[doc = ""]
79    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver/transform)"]
80    #[doc = ""]
81    #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`, `SFrameTransform`*"]
82    #[doc = ""]
83    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
84    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
85    pub fn set_transform_opt_s_frame_transform(
86        this: &RtcRtpReceiver,
87        value: Option<&SFrameTransform>,
88    );
89    #[cfg(web_sys_unstable_apis)]
90    #[cfg(feature = "RtcRtpScriptTransform")]
91    #[wasm_bindgen(method, setter, js_class = "RTCRtpReceiver", js_name = "transform")]
92    #[doc = "Setter for the `transform` field of this object."]
93    #[doc = ""]
94    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver/transform)"]
95    #[doc = ""]
96    #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`, `RtcRtpScriptTransform`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
100    pub fn set_transform_opt_rtc_rtp_script_transform(
101        this: &RtcRtpReceiver,
102        value: Option<&RtcRtpScriptTransform>,
103    );
104    #[cfg(feature = "RtcRtpCapabilities")]
105    #[wasm_bindgen(
106        static_method_of = "RtcRtpReceiver",
107        js_class = "RTCRtpReceiver",
108        js_name = "getCapabilities"
109    )]
110    #[doc = "The `getCapabilities()` method."]
111    #[doc = ""]
112    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver/getCapabilities_static)"]
113    #[doc = ""]
114    #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`, `RtcRtpReceiver`*"]
115    pub fn get_capabilities(kind: &str) -> Option<RtcRtpCapabilities>;
116    #[wasm_bindgen(
117        method,
118        js_class = "RTCRtpReceiver",
119        js_name = "getContributingSources"
120    )]
121    #[doc = "The `getContributingSources()` method."]
122    #[doc = ""]
123    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver/getContributingSources)"]
124    #[doc = ""]
125    #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`*"]
126    pub fn get_contributing_sources(this: &RtcRtpReceiver) -> ::js_sys::Array;
127    #[wasm_bindgen(method, js_class = "RTCRtpReceiver", js_name = "getStats")]
128    #[doc = "The `getStats()` method."]
129    #[doc = ""]
130    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver/getStats)"]
131    #[doc = ""]
132    #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`*"]
133    pub fn get_stats(this: &RtcRtpReceiver) -> ::js_sys::Promise;
134    #[wasm_bindgen(
135        method,
136        js_class = "RTCRtpReceiver",
137        js_name = "getSynchronizationSources"
138    )]
139    #[doc = "The `getSynchronizationSources()` method."]
140    #[doc = ""]
141    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver/getSynchronizationSources)"]
142    #[doc = ""]
143    #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`*"]
144    pub fn get_synchronization_sources(this: &RtcRtpReceiver) -> ::js_sys::Array;
145}