1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
    # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = MediaSource , typescript_type = "MediaSource")]
    #[derive(Debug, Clone, PartialEq, Eq)]
    #[doc = "The `MediaSource` class."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`*"]
    pub type MediaSource;
    #[cfg(feature = "SourceBufferList")]
    # [wasm_bindgen (structural , method , getter , js_class = "MediaSource" , js_name = sourceBuffers)]
    #[doc = "Getter for the `sourceBuffers` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/sourceBuffers)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`, `SourceBufferList`*"]
    pub fn source_buffers(this: &MediaSource) -> SourceBufferList;
    #[cfg(feature = "SourceBufferList")]
    # [wasm_bindgen (structural , method , getter , js_class = "MediaSource" , js_name = activeSourceBuffers)]
    #[doc = "Getter for the `activeSourceBuffers` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/activeSourceBuffers)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`, `SourceBufferList`*"]
    pub fn active_source_buffers(this: &MediaSource) -> SourceBufferList;
    #[cfg(feature = "MediaSourceReadyState")]
    # [wasm_bindgen (structural , method , getter , js_class = "MediaSource" , js_name = readyState)]
    #[doc = "Getter for the `readyState` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/readyState)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`, `MediaSourceReadyState`*"]
    pub fn ready_state(this: &MediaSource) -> MediaSourceReadyState;
    # [wasm_bindgen (structural , method , getter , js_class = "MediaSource" , js_name = duration)]
    #[doc = "Getter for the `duration` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/duration)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`*"]
    pub fn duration(this: &MediaSource) -> f64;
    # [wasm_bindgen (structural , method , setter , js_class = "MediaSource" , js_name = duration)]
    #[doc = "Setter for the `duration` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/duration)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`*"]
    pub fn set_duration(this: &MediaSource, value: f64);
    # [wasm_bindgen (structural , method , getter , js_class = "MediaSource" , js_name = onsourceopen)]
    #[doc = "Getter for the `onsourceopen` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/onsourceopen)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`*"]
    pub fn onsourceopen(this: &MediaSource) -> Option<::js_sys::Function>;
    # [wasm_bindgen (structural , method , setter , js_class = "MediaSource" , js_name = onsourceopen)]
    #[doc = "Setter for the `onsourceopen` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/onsourceopen)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`*"]
    pub fn set_onsourceopen(this: &MediaSource, value: Option<&::js_sys::Function>);
    # [wasm_bindgen (structural , method , getter , js_class = "MediaSource" , js_name = onsourceended)]
    #[doc = "Getter for the `onsourceended` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/onsourceended)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`*"]
    pub fn onsourceended(this: &MediaSource) -> Option<::js_sys::Function>;
    # [wasm_bindgen (structural , method , setter , js_class = "MediaSource" , js_name = onsourceended)]
    #[doc = "Setter for the `onsourceended` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/onsourceended)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`*"]
    pub fn set_onsourceended(this: &MediaSource, value: Option<&::js_sys::Function>);
    # [wasm_bindgen (structural , method , getter , js_class = "MediaSource" , js_name = onsourceclose)]
    #[doc = "Getter for the `onsourceclose` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/onsourceclose)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`*"]
    pub fn onsourceclose(this: &MediaSource) -> Option<::js_sys::Function>;
    # [wasm_bindgen (structural , method , setter , js_class = "MediaSource" , js_name = onsourceclose)]
    #[doc = "Setter for the `onsourceclose` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/onsourceclose)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`*"]
    pub fn set_onsourceclose(this: &MediaSource, value: Option<&::js_sys::Function>);
    #[wasm_bindgen(catch, constructor, js_class = "MediaSource")]
    #[doc = "The `new MediaSource(..)` constructor, creating a new instance of `MediaSource`."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/MediaSource)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`*"]
    pub fn new() -> Result<MediaSource, JsValue>;
    #[cfg(feature = "SourceBuffer")]
    # [wasm_bindgen (catch , method , structural , js_class = "MediaSource" , js_name = addSourceBuffer)]
    #[doc = "The `addSourceBuffer()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/addSourceBuffer)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`, `SourceBuffer`*"]
    pub fn add_source_buffer(this: &MediaSource, type_: &str) -> Result<SourceBuffer, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "MediaSource" , js_name = clearLiveSeekableRange)]
    #[doc = "The `clearLiveSeekableRange()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/clearLiveSeekableRange)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`*"]
    pub fn clear_live_seekable_range(this: &MediaSource) -> Result<(), JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "MediaSource" , js_name = endOfStream)]
    #[doc = "The `endOfStream()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/endOfStream)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`*"]
    pub fn end_of_stream(this: &MediaSource) -> Result<(), JsValue>;
    #[cfg(feature = "MediaSourceEndOfStreamError")]
    # [wasm_bindgen (catch , method , structural , js_class = "MediaSource" , js_name = endOfStream)]
    #[doc = "The `endOfStream()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/endOfStream)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`, `MediaSourceEndOfStreamError`*"]
    pub fn end_of_stream_with_error(
        this: &MediaSource,
        error: MediaSourceEndOfStreamError,
    ) -> Result<(), JsValue>;
    # [wasm_bindgen (static_method_of = MediaSource , js_class = "MediaSource" , js_name = isTypeSupported)]
    #[doc = "The `isTypeSupported()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/isTypeSupported)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`*"]
    pub fn is_type_supported(type_: &str) -> bool;
    #[cfg(feature = "SourceBuffer")]
    # [wasm_bindgen (catch , method , structural , js_class = "MediaSource" , js_name = removeSourceBuffer)]
    #[doc = "The `removeSourceBuffer()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/removeSourceBuffer)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`, `SourceBuffer`*"]
    pub fn remove_source_buffer(
        this: &MediaSource,
        source_buffer: &SourceBuffer,
    ) -> Result<(), JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "MediaSource" , js_name = setLiveSeekableRange)]
    #[doc = "The `setLiveSeekableRange()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `MediaSource`*"]
    pub fn set_live_seekable_range(this: &MediaSource, start: f64, end: f64)
        -> Result<(), JsValue>;
}