Skip to main content

web_sys/features/
gen_VideoTrackList.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 = "EventTarget",
9        extends = "::js_sys::Object",
10        js_name = "VideoTrackList",
11        typescript_type = "VideoTrackList"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `VideoTrackList` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoTrackList)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `VideoTrackList`*"]
19    pub type VideoTrackList;
20    #[wasm_bindgen(method, getter, js_class = "VideoTrackList", js_name = "length")]
21    #[doc = "Getter for the `length` field of this object."]
22    #[doc = ""]
23    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoTrackList/length)"]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `VideoTrackList`*"]
26    pub fn length(this: &VideoTrackList) -> u32;
27    #[wasm_bindgen(method, getter, js_class = "VideoTrackList", js_name = "selectedIndex")]
28    #[doc = "Getter for the `selectedIndex` field of this object."]
29    #[doc = ""]
30    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoTrackList/selectedIndex)"]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `VideoTrackList`*"]
33    pub fn selected_index(this: &VideoTrackList) -> i32;
34    #[wasm_bindgen(method, getter, js_class = "VideoTrackList", js_name = "onchange")]
35    #[doc = "Getter for the `onchange` field of this object."]
36    #[doc = ""]
37    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoTrackList/onchange)"]
38    #[doc = ""]
39    #[doc = "*This API requires the following crate features to be activated: `VideoTrackList`*"]
40    pub fn onchange(this: &VideoTrackList) -> Option<::js_sys::Function>;
41    #[wasm_bindgen(method, setter, js_class = "VideoTrackList", js_name = "onchange")]
42    #[doc = "Setter for the `onchange` field of this object."]
43    #[doc = ""]
44    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoTrackList/onchange)"]
45    #[doc = ""]
46    #[doc = "*This API requires the following crate features to be activated: `VideoTrackList`*"]
47    pub fn set_onchange(this: &VideoTrackList, value: Option<&::js_sys::Function>);
48    #[wasm_bindgen(method, getter, js_class = "VideoTrackList", js_name = "onaddtrack")]
49    #[doc = "Getter for the `onaddtrack` field of this object."]
50    #[doc = ""]
51    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoTrackList/onaddtrack)"]
52    #[doc = ""]
53    #[doc = "*This API requires the following crate features to be activated: `VideoTrackList`*"]
54    pub fn onaddtrack(this: &VideoTrackList) -> Option<::js_sys::Function>;
55    #[wasm_bindgen(method, setter, js_class = "VideoTrackList", js_name = "onaddtrack")]
56    #[doc = "Setter for the `onaddtrack` field of this object."]
57    #[doc = ""]
58    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoTrackList/onaddtrack)"]
59    #[doc = ""]
60    #[doc = "*This API requires the following crate features to be activated: `VideoTrackList`*"]
61    pub fn set_onaddtrack(this: &VideoTrackList, value: Option<&::js_sys::Function>);
62    #[wasm_bindgen(method, getter, js_class = "VideoTrackList", js_name = "onremovetrack")]
63    #[doc = "Getter for the `onremovetrack` field of this object."]
64    #[doc = ""]
65    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoTrackList/onremovetrack)"]
66    #[doc = ""]
67    #[doc = "*This API requires the following crate features to be activated: `VideoTrackList`*"]
68    pub fn onremovetrack(this: &VideoTrackList) -> Option<::js_sys::Function>;
69    #[wasm_bindgen(method, setter, js_class = "VideoTrackList", js_name = "onremovetrack")]
70    #[doc = "Setter for the `onremovetrack` field of this object."]
71    #[doc = ""]
72    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoTrackList/onremovetrack)"]
73    #[doc = ""]
74    #[doc = "*This API requires the following crate features to be activated: `VideoTrackList`*"]
75    pub fn set_onremovetrack(this: &VideoTrackList, value: Option<&::js_sys::Function>);
76    #[cfg(feature = "VideoTrack")]
77    #[wasm_bindgen(method, js_class = "VideoTrackList", js_name = "getTrackById")]
78    #[doc = "The `getTrackById()` method."]
79    #[doc = ""]
80    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/VideoTrackList/getTrackById)"]
81    #[doc = ""]
82    #[doc = "*This API requires the following crate features to be activated: `VideoTrack`, `VideoTrackList`*"]
83    pub fn get_track_by_id(this: &VideoTrackList, id: &str) -> Option<VideoTrack>;
84    #[cfg(feature = "VideoTrack")]
85    #[wasm_bindgen(method, js_class = "VideoTrackList", indexing_getter)]
86    #[doc = "Indexing getter. As in the literal Javascript `this[key]`."]
87    #[doc = ""]
88    #[doc = ""]
89    #[doc = "*This API requires the following crate features to be activated: `VideoTrack`, `VideoTrackList`*"]
90    pub fn get(this: &VideoTrackList, index: u32) -> Option<VideoTrack>;
91}