web_sys/features/
gen_RtcRtpTransceiverInit.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCRtpTransceiverInit)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `RtcRtpTransceiverInit` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"]
12 pub type RtcRtpTransceiverInit;
13 #[cfg(feature = "RtcRtpTransceiverDirection")]
14 #[doc = "Get the `direction` field of this object."]
15 #[doc = ""]
16 #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverDirection`, `RtcRtpTransceiverInit`*"]
17 #[wasm_bindgen(method, getter = "direction")]
18 pub fn get_direction(this: &RtcRtpTransceiverInit) -> Option<RtcRtpTransceiverDirection>;
19 #[cfg(feature = "RtcRtpTransceiverDirection")]
20 #[doc = "Change the `direction` field of this object."]
21 #[doc = ""]
22 #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverDirection`, `RtcRtpTransceiverInit`*"]
23 #[wasm_bindgen(method, setter = "direction")]
24 pub fn set_direction(this: &RtcRtpTransceiverInit, val: RtcRtpTransceiverDirection);
25 #[doc = "Get the `sendEncodings` field of this object."]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"]
28 #[wasm_bindgen(method, getter = "sendEncodings")]
29 pub fn get_send_encodings(this: &RtcRtpTransceiverInit) -> Option<::js_sys::Array>;
30 #[doc = "Change the `sendEncodings` field of this object."]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"]
33 #[wasm_bindgen(method, setter = "sendEncodings")]
34 pub fn set_send_encodings(this: &RtcRtpTransceiverInit, val: &::wasm_bindgen::JsValue);
35 #[doc = "Get the `streams` field of this object."]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"]
38 #[wasm_bindgen(method, getter = "streams")]
39 pub fn get_streams(this: &RtcRtpTransceiverInit) -> Option<::js_sys::Array>;
40 #[doc = "Change the `streams` field of this object."]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"]
43 #[wasm_bindgen(method, setter = "streams")]
44 pub fn set_streams(this: &RtcRtpTransceiverInit, val: &::wasm_bindgen::JsValue);
45}
46impl RtcRtpTransceiverInit {
47 #[doc = "Construct a new `RtcRtpTransceiverInit`."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"]
50 pub fn new() -> Self {
51 #[allow(unused_mut)]
52 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
53 ret
54 }
55 #[cfg(feature = "RtcRtpTransceiverDirection")]
56 #[deprecated = "Use `set_direction()` instead."]
57 pub fn direction(&mut self, val: RtcRtpTransceiverDirection) -> &mut Self {
58 self.set_direction(val);
59 self
60 }
61 #[deprecated = "Use `set_send_encodings()` instead."]
62 pub fn send_encodings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
63 self.set_send_encodings(val);
64 self
65 }
66 #[deprecated = "Use `set_streams()` instead."]
67 pub fn streams(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
68 self.set_streams(val);
69 self
70 }
71}
72impl Default for RtcRtpTransceiverInit {
73 fn default() -> Self {
74 Self::new()
75 }
76}