1 #![allow(unused_imports)] 2 use super::*; 3 use wasm_bindgen::prelude::*; 4 #[wasm_bindgen] 5 extern "C" { 6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCRtpParameters)] 7 #[derive(Debug, Clone, PartialEq, Eq)] 8 #[doc = "The `RtcRtpParameters` dictionary."] 9 #[doc = ""] 10 #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] 11 pub type RtcRtpParameters; 12 } 13 impl RtcRtpParameters { 14 #[doc = "Construct a new `RtcRtpParameters`."] 15 #[doc = ""] 16 #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] new() -> Self17 pub fn new() -> Self { 18 #[allow(unused_mut)] 19 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); 20 ret 21 } 22 #[doc = "Change the `codecs` field of this object."] 23 #[doc = ""] 24 #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] codecs(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self25 pub fn codecs(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { 26 use wasm_bindgen::JsValue; 27 let r = 28 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("codecs"), &JsValue::from(val)); 29 debug_assert!( 30 r.is_ok(), 31 "setting properties should never fail on our dictionary objects" 32 ); 33 let _ = r; 34 self 35 } 36 #[doc = "Change the `encodings` field of this object."] 37 #[doc = ""] 38 #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] encodings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self39 pub fn encodings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { 40 use wasm_bindgen::JsValue; 41 let r = ::js_sys::Reflect::set( 42 self.as_ref(), 43 &JsValue::from("encodings"), 44 &JsValue::from(val), 45 ); 46 debug_assert!( 47 r.is_ok(), 48 "setting properties should never fail on our dictionary objects" 49 ); 50 let _ = r; 51 self 52 } 53 #[doc = "Change the `headerExtensions` field of this object."] 54 #[doc = ""] 55 #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] header_extensions(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self56 pub fn header_extensions(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { 57 use wasm_bindgen::JsValue; 58 let r = ::js_sys::Reflect::set( 59 self.as_ref(), 60 &JsValue::from("headerExtensions"), 61 &JsValue::from(val), 62 ); 63 debug_assert!( 64 r.is_ok(), 65 "setting properties should never fail on our dictionary objects" 66 ); 67 let _ = r; 68 self 69 } 70 #[cfg(feature = "RtcRtcpParameters")] 71 #[doc = "Change the `rtcp` field of this object."] 72 #[doc = ""] 73 #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`, `RtcRtpParameters`*"] rtcp(&mut self, val: &RtcRtcpParameters) -> &mut Self74 pub fn rtcp(&mut self, val: &RtcRtcpParameters) -> &mut Self { 75 use wasm_bindgen::JsValue; 76 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("rtcp"), &JsValue::from(val)); 77 debug_assert!( 78 r.is_ok(), 79 "setting properties should never fail on our dictionary objects" 80 ); 81 let _ = r; 82 self 83 } 84 } 85