Skip to main content

web_sys/features/
gen_RtcRtpTransceiver.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 = "RTCRtpTransceiver",
10        typescript_type = "RTCRtpTransceiver"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `RtcRtpTransceiver` class."]
14    #[doc = ""]
15    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver)"]
16    #[doc = ""]
17    #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`*"]
18    pub type RtcRtpTransceiver;
19    #[wasm_bindgen(method, getter, js_class = "RTCRtpTransceiver", js_name = "mid")]
20    #[doc = "Getter for the `mid` field of this object."]
21    #[doc = ""]
22    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/mid)"]
23    #[doc = ""]
24    #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`*"]
25    pub fn mid(this: &RtcRtpTransceiver) -> Option<::alloc::string::String>;
26    #[cfg(feature = "RtcRtpSender")]
27    #[wasm_bindgen(method, getter, js_class = "RTCRtpTransceiver", js_name = "sender")]
28    #[doc = "Getter for the `sender` field of this object."]
29    #[doc = ""]
30    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/sender)"]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `RtcRtpSender`, `RtcRtpTransceiver`*"]
33    pub fn sender(this: &RtcRtpTransceiver) -> RtcRtpSender;
34    #[cfg(feature = "RtcRtpReceiver")]
35    #[wasm_bindgen(method, getter, js_class = "RTCRtpTransceiver", js_name = "receiver")]
36    #[doc = "Getter for the `receiver` field of this object."]
37    #[doc = ""]
38    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/receiver)"]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`, `RtcRtpTransceiver`*"]
41    pub fn receiver(this: &RtcRtpTransceiver) -> RtcRtpReceiver;
42    #[wasm_bindgen(method, getter, js_class = "RTCRtpTransceiver", js_name = "stopped")]
43    #[doc = "Getter for the `stopped` field of this object."]
44    #[doc = ""]
45    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/stopped)"]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`*"]
48    pub fn stopped(this: &RtcRtpTransceiver) -> bool;
49    #[cfg(feature = "RtcRtpTransceiverDirection")]
50    #[wasm_bindgen(method, getter, js_class = "RTCRtpTransceiver", js_name = "direction")]
51    #[doc = "Getter for the `direction` field of this object."]
52    #[doc = ""]
53    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/direction)"]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`, `RtcRtpTransceiverDirection`*"]
56    pub fn direction(this: &RtcRtpTransceiver) -> RtcRtpTransceiverDirection;
57    #[cfg(feature = "RtcRtpTransceiverDirection")]
58    #[wasm_bindgen(method, setter, js_class = "RTCRtpTransceiver", js_name = "direction")]
59    #[doc = "Setter for the `direction` field of this object."]
60    #[doc = ""]
61    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/direction)"]
62    #[doc = ""]
63    #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`, `RtcRtpTransceiverDirection`*"]
64    pub fn set_direction(this: &RtcRtpTransceiver, value: RtcRtpTransceiverDirection);
65    #[cfg(feature = "RtcRtpTransceiverDirection")]
66    #[wasm_bindgen(
67        method,
68        getter,
69        js_class = "RTCRtpTransceiver",
70        js_name = "currentDirection"
71    )]
72    #[doc = "Getter for the `currentDirection` field of this object."]
73    #[doc = ""]
74    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/currentDirection)"]
75    #[doc = ""]
76    #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`, `RtcRtpTransceiverDirection`*"]
77    pub fn current_direction(this: &RtcRtpTransceiver) -> Option<RtcRtpTransceiverDirection>;
78    #[wasm_bindgen(method, js_class = "RTCRtpTransceiver", js_name = "getRemoteTrackId")]
79    #[doc = "The `getRemoteTrackId()` method."]
80    #[doc = ""]
81    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/getRemoteTrackId)"]
82    #[doc = ""]
83    #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`*"]
84    pub fn get_remote_track_id(this: &RtcRtpTransceiver) -> ::alloc::string::String;
85    #[wasm_bindgen(
86        method,
87        js_class = "RTCRtpTransceiver",
88        js_name = "setCodecPreferences"
89    )]
90    #[doc = "The `setCodecPreferences()` method."]
91    #[doc = ""]
92    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/setCodecPreferences)"]
93    #[doc = ""]
94    #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`*"]
95    pub fn set_codec_preferences(this: &RtcRtpTransceiver, codecs: &::wasm_bindgen::JsValue);
96    #[wasm_bindgen(method, js_class = "RTCRtpTransceiver")]
97    #[doc = "The `stop()` method."]
98    #[doc = ""]
99    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/stop)"]
100    #[doc = ""]
101    #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`*"]
102    pub fn stop(this: &RtcRtpTransceiver);
103}