web_sys/features/
gen_MediaSessionActionDetails.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = MediaSessionActionDetails)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `MediaSessionActionDetails` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"]
13 #[doc = ""]
14 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type MediaSessionActionDetails;
17 #[cfg(web_sys_unstable_apis)]
18 #[cfg(feature = "MediaSessionAction")]
19 #[doc = "Get the `action` field of this object."]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `MediaSessionAction`, `MediaSessionActionDetails`*"]
22 #[doc = ""]
23 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
24 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
25 #[wasm_bindgen(method, getter = "action")]
26 pub fn get_action(this: &MediaSessionActionDetails) -> MediaSessionAction;
27 #[cfg(web_sys_unstable_apis)]
28 #[cfg(feature = "MediaSessionAction")]
29 #[doc = "Change the `action` field of this object."]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `MediaSessionAction`, `MediaSessionActionDetails`*"]
32 #[doc = ""]
33 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
34 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
35 #[wasm_bindgen(method, setter = "action")]
36 pub fn set_action(this: &MediaSessionActionDetails, val: MediaSessionAction);
37 #[cfg(web_sys_unstable_apis)]
38 #[doc = "Get the `fastSeek` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"]
41 #[doc = ""]
42 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
43 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
44 #[wasm_bindgen(method, getter = "fastSeek")]
45 pub fn get_fast_seek(this: &MediaSessionActionDetails) -> Option<bool>;
46 #[cfg(web_sys_unstable_apis)]
47 #[doc = "Change the `fastSeek` field of this object."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"]
50 #[doc = ""]
51 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
52 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
53 #[wasm_bindgen(method, setter = "fastSeek")]
54 pub fn set_fast_seek(this: &MediaSessionActionDetails, val: Option<bool>);
55 #[cfg(web_sys_unstable_apis)]
56 #[doc = "Get the `seekOffset` field of this object."]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"]
59 #[doc = ""]
60 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
61 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
62 #[wasm_bindgen(method, getter = "seekOffset")]
63 pub fn get_seek_offset(this: &MediaSessionActionDetails) -> Option<f64>;
64 #[cfg(web_sys_unstable_apis)]
65 #[doc = "Change the `seekOffset` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"]
68 #[doc = ""]
69 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
70 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
71 #[wasm_bindgen(method, setter = "seekOffset")]
72 pub fn set_seek_offset(this: &MediaSessionActionDetails, val: Option<f64>);
73 #[cfg(web_sys_unstable_apis)]
74 #[doc = "Get the `seekTime` field of this object."]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"]
77 #[doc = ""]
78 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
79 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
80 #[wasm_bindgen(method, getter = "seekTime")]
81 pub fn get_seek_time(this: &MediaSessionActionDetails) -> Option<f64>;
82 #[cfg(web_sys_unstable_apis)]
83 #[doc = "Change the `seekTime` field of this object."]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"]
86 #[doc = ""]
87 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
88 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
89 #[wasm_bindgen(method, setter = "seekTime")]
90 pub fn set_seek_time(this: &MediaSessionActionDetails, val: Option<f64>);
91}
92#[cfg(web_sys_unstable_apis)]
93impl MediaSessionActionDetails {
94 #[cfg(feature = "MediaSessionAction")]
95 #[doc = "Construct a new `MediaSessionActionDetails`."]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `MediaSessionAction`, `MediaSessionActionDetails`*"]
98 #[doc = ""]
99 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
100 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
101 pub fn new(action: MediaSessionAction) -> Self {
102 #[allow(unused_mut)]
103 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
104 ret.set_action(action);
105 ret
106 }
107 #[cfg(web_sys_unstable_apis)]
108 #[cfg(feature = "MediaSessionAction")]
109 #[deprecated = "Use `set_action()` instead."]
110 pub fn action(&mut self, val: MediaSessionAction) -> &mut Self {
111 self.set_action(val);
112 self
113 }
114 #[cfg(web_sys_unstable_apis)]
115 #[deprecated = "Use `set_fast_seek()` instead."]
116 pub fn fast_seek(&mut self, val: Option<bool>) -> &mut Self {
117 self.set_fast_seek(val);
118 self
119 }
120 #[cfg(web_sys_unstable_apis)]
121 #[deprecated = "Use `set_seek_offset()` instead."]
122 pub fn seek_offset(&mut self, val: Option<f64>) -> &mut Self {
123 self.set_seek_offset(val);
124 self
125 }
126 #[cfg(web_sys_unstable_apis)]
127 #[deprecated = "Use `set_seek_time()` instead."]
128 pub fn seek_time(&mut self, val: Option<f64>) -> &mut Self {
129 self.set_seek_time(val);
130 self
131 }
132}