web_sys/features/
gen_RtcTrackEvent.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = RTCTrackEvent , typescript_type = "RTCTrackEvent")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `RtcTrackEvent` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCTrackEvent)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `RtcTrackEvent`*"]
14 pub type RtcTrackEvent;
15 #[cfg(feature = "RtcRtpReceiver")]
16 # [wasm_bindgen (structural , method , getter , js_class = "RTCTrackEvent" , js_name = receiver)]
17 #[doc = "Getter for the `receiver` field of this object."]
18 #[doc = ""]
19 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCTrackEvent/receiver)"]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`, `RtcTrackEvent`*"]
22 pub fn receiver(this: &RtcTrackEvent) -> RtcRtpReceiver;
23 #[cfg(feature = "MediaStreamTrack")]
24 # [wasm_bindgen (structural , method , getter , js_class = "RTCTrackEvent" , js_name = track)]
25 #[doc = "Getter for the `track` field of this object."]
26 #[doc = ""]
27 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCTrackEvent/track)"]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `RtcTrackEvent`*"]
30 pub fn track(this: &RtcTrackEvent) -> MediaStreamTrack;
31 # [wasm_bindgen (structural , method , getter , js_class = "RTCTrackEvent" , js_name = streams)]
32 #[doc = "Getter for the `streams` field of this object."]
33 #[doc = ""]
34 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCTrackEvent/streams)"]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `RtcTrackEvent`*"]
37 pub fn streams(this: &RtcTrackEvent) -> ::js_sys::Array;
38 #[cfg(feature = "RtcRtpTransceiver")]
39 # [wasm_bindgen (structural , method , getter , js_class = "RTCTrackEvent" , js_name = transceiver)]
40 #[doc = "Getter for the `transceiver` field of this object."]
41 #[doc = ""]
42 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCTrackEvent/transceiver)"]
43 #[doc = ""]
44 #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`, `RtcTrackEvent`*"]
45 pub fn transceiver(this: &RtcTrackEvent) -> RtcRtpTransceiver;
46 #[cfg(feature = "RtcTrackEventInit")]
47 #[wasm_bindgen(catch, constructor, js_class = "RTCTrackEvent")]
48 #[doc = "The `new RtcTrackEvent(..)` constructor, creating a new instance of `RtcTrackEvent`."]
49 #[doc = ""]
50 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCTrackEvent/RTCTrackEvent)"]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `RtcTrackEvent`, `RtcTrackEventInit`*"]
53 pub fn new(type_: &str, event_init_dict: &RtcTrackEventInit) -> Result<RtcTrackEvent, JsValue>;
54}