Skip to main content

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