@open-orpheus/plugin-api 0.0.0-stage → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +191 -2
  3. package/dist/client/index.d.ts +37 -0
  4. package/dist/client/index.js +53 -0
  5. package/dist/client/index.js.map +1 -0
  6. package/dist/configuration/host/src/shared/plugin/configuration/index.d.ts +21 -0
  7. package/dist/configuration/index.d.ts +5 -0
  8. package/dist/host/_native/open-orpheus__database.d.ts +50 -0
  9. package/dist/host/_native/open-orpheus__window.d.ts +284 -0
  10. package/dist/host/src/constants.d.ts +6 -0
  11. package/dist/host/src/main/afp.d.ts +1 -0
  12. package/dist/host/src/main/arguments.d.ts +4 -0
  13. package/dist/host/src/main/assets.d.ts +2 -0
  14. package/dist/host/src/main/audio/ChunkTracker.d.ts +23 -0
  15. package/dist/host/src/main/audio/DownloadScheduler.d.ts +53 -0
  16. package/dist/host/src/main/audio/MediaEngine.d.ts +47 -0
  17. package/dist/host/src/main/audio/OnlineStreamer.d.ts +66 -0
  18. package/dist/host/src/main/audio/StorageManager.d.ts +18 -0
  19. package/dist/host/src/main/audio.d.ts +6 -0
  20. package/dist/host/src/main/av3a/Av3aEngine.d.ts +24 -0
  21. package/dist/host/src/main/av3a/Av3aM4aSession.d.ts +101 -0
  22. package/dist/host/src/main/av3a/Av3aPlaybackProcess.d.ts +52 -0
  23. package/dist/host/src/main/av3a/detect.d.ts +6 -0
  24. package/dist/host/src/main/av3a/sources.d.ts +13 -0
  25. package/dist/host/src/main/av3a/types.d.ts +54 -0
  26. package/dist/host/src/main/bridge/ipc-main-bridge.d.ts +24 -0
  27. package/dist/host/src/main/bridge/modules/inputRegion.d.ts +1 -0
  28. package/dist/host/src/main/bridge/modules/lyrics.d.ts +1 -0
  29. package/dist/host/src/main/bridge/modules/settings.d.ts +1 -0
  30. package/dist/host/src/main/bridge/register.d.ts +9 -0
  31. package/dist/host/src/main/bridge/window.d.ts +7 -0
  32. package/dist/host/src/main/cache/HttpCacheStorage.d.ts +10 -0
  33. package/dist/host/src/main/cache/LyricCahceManager.d.ts +21 -0
  34. package/dist/host/src/main/cache/PlayCacheManager.d.ts +72 -0
  35. package/dist/host/src/main/cache.d.ts +7 -0
  36. package/dist/host/src/main/calls/app.d.ts +1 -0
  37. package/dist/host/src/main/calls/audioeffect.d.ts +1 -0
  38. package/dist/host/src/main/calls/browser.d.ts +1 -0
  39. package/dist/host/src/main/calls/desktop.d.ts +2 -0
  40. package/dist/host/src/main/calls/desktoppet.d.ts +1 -0
  41. package/dist/host/src/main/calls/download.d.ts +1 -0
  42. package/dist/host/src/main/calls/index.d.ts +16 -0
  43. package/dist/host/src/main/calls/musiclibrary.d.ts +1 -0
  44. package/dist/host/src/main/calls/network.d.ts +1 -0
  45. package/dist/host/src/main/calls/os.d.ts +1 -0
  46. package/dist/host/src/main/calls/player.d.ts +22 -0
  47. package/dist/host/src/main/calls/process.d.ts +1 -0
  48. package/dist/host/src/main/calls/rtc.d.ts +1 -0
  49. package/dist/host/src/main/calls/storage.d.ts +1 -0
  50. package/dist/host/src/main/calls/trayicon.d.ts +1 -0
  51. package/dist/host/src/main/calls/update.d.ts +1 -0
  52. package/dist/host/src/main/calls/winhelper.d.ts +1 -0
  53. package/dist/host/src/main/calls.d.ts +5 -0
  54. package/dist/host/src/main/channel.d.ts +1 -0
  55. package/dist/host/src/main/cookie.d.ts +13 -0
  56. package/dist/host/src/main/crypto.d.ts +46 -0
  57. package/dist/host/src/main/database/KeyvSqliteDriver.d.ts +6 -0
  58. package/dist/host/src/main/database.d.ts +5 -0
  59. package/dist/host/src/main/dawn.d.ts +31 -0
  60. package/dist/host/src/main/device.d.ts +3 -0
  61. package/dist/host/src/main/download.d.ts +40 -0
  62. package/dist/host/src/main/error.d.ts +1 -0
  63. package/dist/host/src/main/folders.d.ts +18 -0
  64. package/dist/host/src/main/fonts.d.ts +1 -0
  65. package/dist/host/src/main/gui.d.ts +4 -0
  66. package/dist/host/src/main/id3.d.ts +42 -0
  67. package/dist/host/src/main/lifecycle.d.ts +127 -0
  68. package/dist/host/src/main/logger.d.ts +12 -0
  69. package/dist/host/src/main/lyrics/DbusLyricsService.d.ts +115 -0
  70. package/dist/host/src/main/lyrics/LyricsDispatcher.d.ts +26 -0
  71. package/dist/host/src/main/lyrics/dbus.d.ts +16 -0
  72. package/dist/host/src/main/lyrics/parse.d.ts +21 -0
  73. package/dist/host/src/main/lyrics.d.ts +2 -0
  74. package/dist/host/src/main/mediaSession.d.ts +42 -0
  75. package/dist/host/src/main/menu/AppMenu.d.ts +35 -0
  76. package/dist/host/src/main/menu/anchor.d.ts +13 -0
  77. package/dist/host/src/main/menu/backend/DesktopWindowBackend.d.ts +30 -0
  78. package/dist/host/src/main/menu/backend/MenuBackend.d.ts +28 -0
  79. package/dist/host/src/main/menu/backend/WaylandLayerShellBackend.d.ts +35 -0
  80. package/dist/host/src/main/menu/backend/WaylandOverlayBackend.d.ts +15 -0
  81. package/dist/host/src/main/menu/backend/WaylandPopupBackend.d.ts +31 -0
  82. package/dist/host/src/main/menu/constants.d.ts +14 -0
  83. package/dist/host/src/main/menu/index.d.ts +2 -0
  84. package/dist/host/src/main/menu/native-popup.d.ts +16 -0
  85. package/dist/host/src/main/menu/patch.d.ts +3 -0
  86. package/dist/host/src/main/menu/skin.d.ts +3 -0
  87. package/dist/host/src/main/menu/surface/BaseWindowMenuSurface.d.ts +81 -0
  88. package/dist/host/src/main/menu/surface/CaptureLayerSurface.d.ts +22 -0
  89. package/dist/host/src/main/menu/surface/MenuSurface.d.ts +29 -0
  90. package/dist/host/src/main/menu/surface/MenuSurfacePath.d.ts +29 -0
  91. package/dist/host/src/main/menu/surface/SurfacePool.d.ts +15 -0
  92. package/dist/host/src/main/menu/workaround.d.ts +12 -0
  93. package/dist/host/src/main/ncae.d.ts +8 -0
  94. package/dist/host/src/main/network/handler.d.ts +3 -0
  95. package/dist/host/src/main/network/interceptor.d.ts +2 -0
  96. package/dist/host/src/main/network/interceptors/anonymous.d.ts +2 -0
  97. package/dist/host/src/main/network/pipeline.d.ts +8 -0
  98. package/dist/host/src/main/network/types.d.ts +70 -0
  99. package/dist/host/src/main/orpheus.d.ts +10 -0
  100. package/dist/host/src/main/pack.d.ts +27 -0
  101. package/dist/host/src/main/packs/Pack.d.ts +12 -0
  102. package/dist/host/src/main/packs/SkinPack.d.ts +6 -0
  103. package/dist/host/src/main/packs/WebPack.d.ts +6 -0
  104. package/dist/host/src/main/playback/PlaybackController.d.ts +57 -0
  105. package/dist/host/src/main/playback/PlayerCommandRouter.d.ts +85 -0
  106. package/dist/host/src/main/playback/adapters/MediaSessionAdapter.d.ts +61 -0
  107. package/dist/host/src/main/playback/adapters/MprisAdapter.d.ts +48 -0
  108. package/dist/host/src/main/playback/adapters/NowPlayingAdapter.d.ts +23 -0
  109. package/dist/host/src/main/playback/adapters/SmtcAdapter.d.ts +23 -0
  110. package/dist/host/src/main/playback/artwork.d.ts +47 -0
  111. package/dist/host/src/main/playback/modes.d.ts +8 -0
  112. package/dist/host/src/main/playback/types.d.ts +59 -0
  113. package/dist/host/src/main/plugin/assets.d.ts +8 -0
  114. package/dist/host/src/main/plugin/catalog.d.ts +42 -0
  115. package/dist/host/src/main/plugin/discover.d.ts +33 -0
  116. package/dist/host/src/main/plugin/index.d.ts +15 -0
  117. package/dist/host/src/main/plugin/loader.d.ts +90 -0
  118. package/dist/host/src/main/plugin/manager.d.ts +61 -0
  119. package/dist/host/src/main/plugin/metadata.d.ts +34 -0
  120. package/dist/host/src/main/plugin/state.d.ts +27 -0
  121. package/dist/host/src/main/plugin/tree.d.ts +13 -0
  122. package/dist/host/src/main/protocol.d.ts +4 -0
  123. package/dist/host/src/main/request.d.ts +16 -0
  124. package/dist/host/src/main/settings.d.ts +21 -0
  125. package/dist/host/src/main/shortcuts.d.ts +10 -0
  126. package/dist/host/src/main/shutdown.d.ts +50 -0
  127. package/dist/host/src/main/skin/color.d.ts +2 -0
  128. package/dist/host/src/main/skin/dui.d.ts +15 -0
  129. package/dist/host/src/main/tray.d.ts +8 -0
  130. package/dist/host/src/main/update.d.ts +2 -0
  131. package/dist/host/src/main/util/color.d.ts +7 -0
  132. package/dist/host/src/main/util/display.d.ts +3 -0
  133. package/dist/host/src/main/util/env.d.ts +1 -0
  134. package/dist/host/src/main/util/fs.d.ts +21 -0
  135. package/dist/host/src/main/util/image.d.ts +1 -0
  136. package/dist/host/src/main/util/musicFile.d.ts +1 -0
  137. package/dist/host/src/main/util/musicPicture.d.ts +2 -0
  138. package/dist/host/src/main/util/path.d.ts +2 -0
  139. package/dist/host/src/main/util/send.d.ts +13 -0
  140. package/dist/host/src/main/util/url.d.ts +19 -0
  141. package/dist/host/src/main/util/window.d.ts +2 -0
  142. package/dist/host/src/main/window.d.ts +316 -0
  143. package/dist/host/src/main/windows/color-picker.d.ts +3 -0
  144. package/dist/host/src/main/windows/desktop-lyrics.d.ts +12 -0
  145. package/dist/host/src/main/windows/desktop-pet.d.ts +8 -0
  146. package/dist/host/src/main/windows/main.d.ts +6 -0
  147. package/dist/host/src/main/windows/manage.d.ts +2 -0
  148. package/dist/host/src/main/windows/mini-player.d.ts +16 -0
  149. package/dist/host/src/main/windows/music-desktop.d.ts +13 -0
  150. package/dist/host/src/main/windows/package-download.d.ts +2 -0
  151. package/dist/host/src/main/windows/plugin-manager-events.d.ts +7 -0
  152. package/dist/host/src/main/windows/plugin-manager.d.ts +5 -0
  153. package/dist/host/src/main/xeapi.d.ts +48 -0
  154. package/dist/host/src/preload/AudioEffectManager.d.ts +124 -0
  155. package/dist/host/src/preload/PlaybackBackend.d.ts +34 -0
  156. package/dist/host/src/preload/Player.d.ts +229 -0
  157. package/dist/host/src/preload/av3a/Av3aPcmPlayer.d.ts +84 -0
  158. package/dist/host/src/preload/av3a/bridge.d.ts +21 -0
  159. package/dist/host/src/preload/av3a/channel.d.ts +40 -0
  160. package/dist/host/src/preload/av3a/detect.d.ts +6 -0
  161. package/dist/host/src/preload/backends/Av3aPlaybackBackend.d.ts +32 -0
  162. package/dist/host/src/preload/backends/MediaPlaybackBackend.d.ts +25 -0
  163. package/dist/host/src/shared/CallDispatcher.d.ts +12 -0
  164. package/dist/host/src/shared/bridge/constants.d.ts +2 -0
  165. package/dist/host/src/shared/bridge/endpoint.d.ts +29 -0
  166. package/dist/host/src/shared/bridge/hub.d.ts +136 -0
  167. package/dist/host/src/shared/bridge/protocol.d.ts +91 -0
  168. package/dist/host/src/shared/bridge/realm.d.ts +14 -0
  169. package/dist/host/src/shared/bridge/routes.d.ts +37 -0
  170. package/dist/host/src/shared/contracts/av3a-api.d.ts +50 -0
  171. package/dist/host/src/shared/contracts/av3a-process.d.ts +56 -0
  172. package/dist/host/src/shared/contracts/color-picker-api.d.ts +17 -0
  173. package/dist/host/src/shared/contracts/desktop-lyrics-api.d.ts +22 -0
  174. package/dist/host/src/shared/contracts/input-region-api.d.ts +5 -0
  175. package/dist/host/src/shared/contracts/lyrics-api.d.ts +11 -0
  176. package/dist/host/src/shared/contracts/manage-api.d.ts +31 -0
  177. package/dist/host/src/shared/contracts/menu-surface-api.d.ts +35 -0
  178. package/dist/host/src/shared/contracts/mini-player-api.d.ts +19 -0
  179. package/dist/host/src/shared/contracts/plugin-manager-api.d.ts +223 -0
  180. package/dist/host/src/shared/contracts/settings-api.d.ts +15 -0
  181. package/dist/host/src/shared/playbackMode.d.ts +2 -0
  182. package/dist/host/src/shared/plugin/cache-bust.d.ts +8 -0
  183. package/dist/host/src/shared/plugin/lifecycle.d.ts +217 -0
  184. package/dist/host/src/shared/plugin/realms/main/index.d.ts +18 -0
  185. package/dist/host/src/shared/plugin/registry.d.ts +69 -0
  186. package/dist/host/src/shared/plugin/runtime-state.d.ts +4 -0
  187. package/dist/host/src/shared/settings/defaults.d.ts +35 -0
  188. package/dist/host/src/shared/settings/index.d.ts +3 -0
  189. package/dist/host/src/shared/settings/keys.d.ts +21 -0
  190. package/dist/host/src/shared/settings/values.d.ts +13 -0
  191. package/dist/host/src/shared/types/desktop-lyrics.d.ts +61 -0
  192. package/dist/host/src/shared/types/dui.d.ts +37 -0
  193. package/dist/host/src/shared/types/input-region.d.ts +6 -0
  194. package/dist/host/src/shared/types/lyrics.d.ts +15 -0
  195. package/dist/host/src/shared/types/manage.d.ts +14 -0
  196. package/dist/host/src/shared/types/menu-surface.d.ts +43 -0
  197. package/dist/host/src/shared/types/menu.d.ts +29 -0
  198. package/dist/host/src/shared/types/mini-player.d.ts +97 -0
  199. package/dist/host/src/shared/types/ncae.d.ts +29 -0
  200. package/dist/host/src/shared/types/package-download.d.ts +14 -0
  201. package/dist/host/src/shared/types/playback-mode.d.ts +3 -0
  202. package/dist/host/src/shared/types/settings.d.ts +9 -0
  203. package/dist/host/src/shared/types/update.d.ts +6 -0
  204. package/dist/host/src/shared/util.d.ts +22 -0
  205. package/dist/index.d.ts +7 -0
  206. package/dist/plugin-manager/host/src/preload/logger.d.ts +10 -0
  207. package/dist/plugin-manager/host/src/preload/util.d.ts +1 -0
  208. package/dist/plugin-manager/host/src/shared/bridge/constants.d.ts +2 -0
  209. package/dist/plugin-manager/host/src/shared/bridge/endpoint.d.ts +29 -0
  210. package/dist/plugin-manager/host/src/shared/bridge/hub.d.ts +136 -0
  211. package/dist/plugin-manager/host/src/shared/bridge/protocol.d.ts +91 -0
  212. package/dist/plugin-manager/host/src/shared/bridge/routes.d.ts +37 -0
  213. package/dist/plugin-manager/host/src/shared/contracts/plugin-manager-api.d.ts +223 -0
  214. package/dist/plugin-manager/host/src/shared/plugin/lifecycle.d.ts +217 -0
  215. package/dist/plugin-manager/host/src/shared/plugin/realms/common/index.d.ts +34 -0
  216. package/dist/plugin-manager/host/src/shared/plugin/realms/plugin-manager/index.d.ts +11 -0
  217. package/dist/plugin-manager/host/src/shared/plugin/registry.d.ts +69 -0
  218. package/dist/plugin-manager/host/src/shared/util.d.ts +22 -0
  219. package/dist/plugin-manager/index.d.ts +7 -0
  220. package/dist/plugin-manager/registry-map.d.ts +16 -0
  221. package/dist/preload/host/src/constants.d.ts +6 -0
  222. package/dist/preload/host/src/main/network/types.d.ts +70 -0
  223. package/dist/preload/host/src/preload/AudioEffectManager.d.ts +124 -0
  224. package/dist/preload/host/src/preload/MusicRecognizer.d.ts +25 -0
  225. package/dist/preload/host/src/preload/PlaybackBackend.d.ts +34 -0
  226. package/dist/preload/host/src/preload/Player.d.ts +229 -0
  227. package/dist/preload/host/src/preload/YunxinIM.d.ts +15 -0
  228. package/dist/preload/host/src/preload/audioplayer.d.ts +4 -0
  229. package/dist/preload/host/src/preload/av3a/Av3aPcmPlayer.d.ts +84 -0
  230. package/dist/preload/host/src/preload/av3a/bridge.d.ts +21 -0
  231. package/dist/preload/host/src/preload/av3a/channel.d.ts +40 -0
  232. package/dist/preload/host/src/preload/av3a/detect.d.ts +6 -0
  233. package/dist/preload/host/src/preload/backends/Av3aPlaybackBackend.d.ts +32 -0
  234. package/dist/preload/host/src/preload/backends/MediaPlaybackBackend.d.ts +25 -0
  235. package/dist/preload/host/src/preload/calls/app.d.ts +1 -0
  236. package/dist/preload/host/src/preload/calls/audioeffect.d.ts +1 -0
  237. package/dist/preload/host/src/preload/calls/audioplayer.d.ts +1 -0
  238. package/dist/preload/host/src/preload/calls/im.d.ts +1 -0
  239. package/dist/preload/host/src/preload/calls/index.d.ts +6 -0
  240. package/dist/preload/host/src/preload/calls/network.d.ts +1 -0
  241. package/dist/preload/host/src/preload/calls/nimsys.d.ts +1 -0
  242. package/dist/preload/host/src/preload/calls/os.d.ts +1 -0
  243. package/dist/preload/host/src/preload/calls/player.d.ts +1 -0
  244. package/dist/preload/host/src/preload/calls/update.d.ts +1 -0
  245. package/dist/preload/host/src/preload/calls.d.ts +4 -0
  246. package/dist/preload/host/src/preload/channel.d.ts +1 -0
  247. package/dist/preload/host/src/preload/logger.d.ts +10 -0
  248. package/dist/preload/host/src/preload/playbackMode.d.ts +13 -0
  249. package/dist/preload/host/src/preload/util.d.ts +1 -0
  250. package/dist/preload/host/src/shared/CallDispatcher.d.ts +12 -0
  251. package/dist/preload/host/src/shared/bridge/endpoint.d.ts +29 -0
  252. package/dist/preload/host/src/shared/bridge/hub.d.ts +136 -0
  253. package/dist/preload/host/src/shared/bridge/protocol.d.ts +91 -0
  254. package/dist/preload/host/src/shared/bridge/routes.d.ts +37 -0
  255. package/dist/preload/host/src/shared/contracts/av3a-api.d.ts +50 -0
  256. package/dist/preload/host/src/shared/contracts/av3a-process.d.ts +56 -0
  257. package/dist/preload/host/src/shared/contracts/plugin-manager-api.d.ts +223 -0
  258. package/dist/preload/host/src/shared/playbackMode.d.ts +2 -0
  259. package/dist/preload/host/src/shared/plugin/lifecycle.d.ts +217 -0
  260. package/dist/preload/host/src/shared/plugin/realms/common/index.d.ts +34 -0
  261. package/dist/preload/host/src/shared/plugin/realms/preload/index.d.ts +11 -0
  262. package/dist/preload/host/src/shared/plugin/registry.d.ts +69 -0
  263. package/dist/preload/host/src/shared/types/ncae.d.ts +29 -0
  264. package/dist/preload/host/src/shared/types/playback-mode.d.ts +3 -0
  265. package/dist/preload/host/src/shared/util.d.ts +22 -0
  266. package/dist/preload/index.d.ts +7 -0
  267. package/dist/preload/registry-map.d.ts +43 -0
  268. package/dist/registry-map.d.ts +164 -0
  269. package/package.json +73 -3
@@ -0,0 +1,316 @@
1
+ import { BaseWindow, BrowserWindow } from "electron";
2
+ import type { BrowserWindowConstructorOptions } from "electron";
3
+ import Emittery from "emittery";
4
+ import type { LayerShellOptions } from "../../_native/open-orpheus__window.js";
5
+ export type { LayerShellOptions };
6
+ import type AppMenu from "./menu/index.js";
7
+ type AnyManagedWindow = ManagedWindow<any, any>;
8
+ type BrowserManagedWindow = ManagedWindow<any, BrowserWindow>;
9
+ type BaseWindowManaged = ManagedWindow<any, BaseWindow>;
10
+ export declare let mainWindow: BrowserWindow | null;
11
+ export declare function setMainWindow(wnd: BrowserWindow): void;
12
+ export interface InputRegion {
13
+ x: number;
14
+ y: number;
15
+ width: number;
16
+ height: number;
17
+ }
18
+ export interface WindowEvents<TWindow extends BrowserWindow | BaseWindow = BrowserWindow> {
19
+ /** Window is created or is being bound with current ManagedWindow */
20
+ bind: TWindow;
21
+ /** Window is closed or is being unbound with current ManagedWindow */
22
+ unbind: TWindow;
23
+ show: TWindow;
24
+ hide: TWindow;
25
+ /**
26
+ * The compositor refused the layer-shell role for this window.
27
+ *
28
+ * A surface's role is never released, so this happens when the window's
29
+ * surface took an ordinary toplevel role before its policy was seen. It
30
+ * cannot be fixed on that surface: whatever handles this has to re-create the
31
+ * window, which is the only way to get a surface that can still take the
32
+ * role.
33
+ */
34
+ layerShellRefused: TWindow;
35
+ }
36
+ export type WindowData = {
37
+ name: string;
38
+ maximumSize: {
39
+ x: number;
40
+ y: number;
41
+ };
42
+ minimumSize: {
43
+ x: number;
44
+ y: number;
45
+ };
46
+ alwaysOnTop: boolean;
47
+ menu: AppMenu | undefined;
48
+ };
49
+ /**
50
+ * URL for a frontend route, honouring the Vite dev server when one is running.
51
+ *
52
+ * `route` is a path within the renderer, e.g. `/mini-player`.
53
+ */
54
+ export declare function guiUrl(route?: string): string;
55
+ export declare abstract class ManagedWindow<Data extends WindowData = WindowData, TWindow extends BrowserWindow | BaseWindow = BrowserWindow> extends Emittery<WindowEvents<TWindow>> {
56
+ /** The name the native layer knows this window by. */
57
+ readonly id: string;
58
+ private _window;
59
+ private _data;
60
+ private _title;
61
+ private _lastOnClosedListener;
62
+ private _closeNotifier;
63
+ private _menuCloseUnsubscribe;
64
+ /**
65
+ * The window this wrapper owns.
66
+ *
67
+ * Assigning binds the window (wiring it up and emitting `bind`); assigning
68
+ * `null` releases it. Every managed window is created by
69
+ * [`createBrowserWindow`], so a wrapper holds at most one live window.
70
+ */
71
+ protected set window(value: TWindow | null);
72
+ get window(): TWindow | null;
73
+ protected bindWindow(value: TWindow): void;
74
+ /** The window's title. The window itself is never asked for it. */
75
+ get title(): string;
76
+ /**
77
+ * Set the window's title.
78
+ *
79
+ * This is the only way the title is ever written: the native layer keys the
80
+ * window on the id that rides in front of it, so a title written straight to
81
+ * the `BrowserWindow` would drop that id and with it the window's name.
82
+ */
83
+ setTitle(title: string): void;
84
+ /** What the native layer expects to see on the wire for this window. */
85
+ private decoratedTitle;
86
+ private applyTitle;
87
+ /**
88
+ * The page must not write the window title on Wayland.
89
+ *
90
+ * The managed id rides in the title, so a page title would either carry no id
91
+ * or carry someone else's; it is taken, prevented, and written back by this
92
+ * module instead. Attached only where the title is decorated.
93
+ */
94
+ private readonly _pageTitleListener;
95
+ private readonly _maximizeListener;
96
+ private readonly _unmaximizeListener;
97
+ private readonly _enterFullScreenListener;
98
+ private readonly _leaveFullScreenListener;
99
+ private readonly _resizeListener;
100
+ private readonly _showListener;
101
+ private readonly _hideListener;
102
+ private readonly _closeListener;
103
+ constructor();
104
+ /**
105
+ * Attach the listeners this wrapper owns. Called synchronously from the
106
+ * window setter: `Emittery` delivers its events in a later microtask, which
107
+ * is too late for wiring that must exist before the window is used.
108
+ */
109
+ private attachWindowListeners;
110
+ /**
111
+ * Apply the state this wrapper recorded to `wnd`.
112
+ *
113
+ * Called when a window is bound, and again when state moves to a window that
114
+ * is already bound: a policy switch creates its replacement eagerly, so the
115
+ * state arrives after that window exists.
116
+ */
117
+ private applyRecordedState;
118
+ private detachWindowListeners;
119
+ /**
120
+ * The only place a `BrowserWindow` is constructed.
121
+ *
122
+ * Subclasses call this instead of `new BrowserWindow` so that ownership,
123
+ * lifetime and native state all stay in one place. A window class that is a
124
+ * layer surface registers its policy with [`setLayerShell`] before calling
125
+ * this, so the policy is in place before the window — and therefore its first
126
+ * role object — exists.
127
+ */
128
+ protected createBrowserWindow(options: BrowserWindowConstructorOptions): BrowserWindow;
129
+ /**
130
+ * The layer-shell version advertised by a live compositor, or `null` when
131
+ * layer shell is unavailable.
132
+ */
133
+ static layerShellVersion(): number | null;
134
+ /**
135
+ * Register the layer-shell policy this window should take, or clear it with
136
+ * `null`.
137
+ *
138
+ * Call this before the window is created: the native layer keys the policy on
139
+ * this window's id and consults it once, when the surface's role is decided,
140
+ * and a role can be taken inside `new BrowserWindow` when the window is
141
+ * created shown. A compositor assigns a surface's role once and never changes
142
+ * it, so a window that is already a layer surface stays one for as long as its
143
+ * surface lives, and `null` only takes effect once the window is recreated.
144
+ *
145
+ * The wrapper keeps no copy: the native layer owns the state, and
146
+ * [`transferStateTo`] re-keys it when a policy switch replaces the window.
147
+ *
148
+ * Returns whether the policy could be sent at all; `false` means the
149
+ * compositor cannot take layer surfaces or the options are unsendable, and
150
+ * this window will be an ordinary toplevel.
151
+ */
152
+ setLayerShell(options: LayerShellOptions | null): boolean;
153
+ /**
154
+ * Resize a layer surface that already exists.
155
+ *
156
+ * Only the size changes; anchors and margins stay as they were at role
157
+ * creation. The request is applied at the surface's next commit (layer state
158
+ * is double-buffered), so the caller must also make the window commit, which
159
+ * `BaseWindowMenuSurface.applyMeasurement` does.
160
+ */
161
+ setLayerShellSize(width: number, height: number): boolean;
162
+ /**
163
+ * Release the native state this wrapper recorded (its layer-shell policy and
164
+ * input region).
165
+ *
166
+ * Call it when the wrapper will not be used again. A window that merely hides
167
+ * and is shown later keeps its id and must not call this: the native layer
168
+ * needs the record for the surface it creates next. A discarded wrapper is
169
+ * released automatically when it is collected; this is for callers that want
170
+ * it to happen now.
171
+ */
172
+ releaseNativeState(): void;
173
+ /** The bound window, or `null` once it is gone. Never a destroyed window. */
174
+ protected liveWindow(): TWindow | null;
175
+ /**
176
+ * Whether the window is on screen or has been asked to appear.
177
+ *
178
+ * A policy switch asks this rather than `isVisible()`: an on-demand window
179
+ * that was shown but has not reached `ready-to-show` yet is not visible, and
180
+ * treating that as "hidden" would drop the request along with the old window.
181
+ */
182
+ wantsToBeVisible(): boolean;
183
+ /** Load a renderer route, using the dev server when one is configured. */
184
+ protected loadGuiRoute(route?: string): void;
185
+ protected hideMenuBar(): void;
186
+ /**
187
+ * Ask the application before closing instead of closing directly.
188
+ *
189
+ * Quitting the app and dismissing the window still bypass the request, so
190
+ * `OnDemandWindow.hide()` and `app.quit()` keep working.
191
+ */
192
+ protected requestCloseApproval(notify: () => void): void;
193
+ /** Whether a close request should be held back for [`onCloseRequested`]. */
194
+ protected preventsCloseRequest(): boolean;
195
+ /** Called when the user asks to close a window that prevents it. */
196
+ protected onCloseRequested(): void;
197
+ /** Whether the application itself is taking the window down. */
198
+ protected isBeingDismissed(): boolean;
199
+ /** Called (synchronously) when the bound window reports that it was hidden. */
200
+ protected onWindowHidden(): void;
201
+ private releaseWindow;
202
+ /**
203
+ * Whether the session is Wayland.
204
+ */
205
+ private isWayland;
206
+ setData<K extends keyof Data>(key: K, data: Data[K]): void;
207
+ setData<T = unknown>(key: string, data: T): void;
208
+ getData<K extends keyof Data>(key: K): Data[K] | undefined;
209
+ getData<T = unknown>(key: string): T | undefined;
210
+ /** Replace the menu owned by this window and dispose the previous one. */
211
+ setMenu(menu: AppMenu | undefined): void;
212
+ private enableSizeConstraints;
213
+ private disableSizeConstraints;
214
+ setMaximumSize(x: number, y: number): void;
215
+ setMinimumSize(x: number, y: number): void;
216
+ setAlwaysOnTop(flag: boolean): void;
217
+ /**
218
+ * Set the regions this window receives input in.
219
+ *
220
+ * Only available on Linux; on Windows and macOS use Electron's
221
+ * `BrowserWindow.setIgnoreMouseEvents`.
222
+ *
223
+ * On Wayland the native layer owns the region: it records it against the
224
+ * window id and emits it immediately before the surface's next commit, since
225
+ * a `set_input_region` is only adopted at a commit. The return value
226
+ * therefore means "recorded", not "already in effect".
227
+ */
228
+ setWindowInputRegion(regions: InputRegion[]): boolean;
229
+ send(channel: string, ...args: unknown[]): boolean;
230
+ show(): void | Promise<void>;
231
+ hide(): void | Promise<void>;
232
+ /** Dismiss the bound window, bypassing the close policy. */
233
+ destroy(): void;
234
+ /**
235
+ * Hand everything this wrapper recorded to `target`.
236
+ *
237
+ * Move semantics: the source keeps nothing, so a discarded wrapper can no
238
+ * longer be found by [`ManagedWindow.fromName`] or re-apply stale state.
239
+ * Event subscribers are not carried over; consumers follow the module's live
240
+ * `window` binding instead.
241
+ */
242
+ transferStateTo(target: ManagedWindow<any, BrowserWindow> | ManagedWindow<any, BaseWindow> | ManagedWindow): void;
243
+ static fromBrowserWindow(browserWindow: BrowserWindow): BrowserManagedWindow | undefined;
244
+ static fromBaseWindow(baseWindow: BaseWindow): BaseWindowManaged | undefined;
245
+ static fromWindow(window: BrowserWindow | BaseWindow): AnyManagedWindow | undefined;
246
+ static fromId(id: string): AnyManagedWindow | undefined;
247
+ static fromName(name: string): any;
248
+ }
249
+ export interface OnDemandWindowState {
250
+ alive: boolean;
251
+ }
252
+ /**
253
+ * A managed window this module did not create.
254
+ *
255
+ * Managed windows are constructed by [`ManagedWindow.createBrowserWindow`] and
256
+ * are bound synchronously; this wrapper only exists for windows Electron itself
257
+ * produced.
258
+ */
259
+ export declare class SimpleManagedWindow extends ManagedWindow {
260
+ constructor(window: BrowserWindow);
261
+ }
262
+ /**
263
+ * A managed window with no lifecycle policy of its own.
264
+ *
265
+ * For short-lived windows (a `chrome://` info window, a renderer-requested
266
+ * URL) that only need to be created through the wrapper.
267
+ */
268
+ export declare class BasicManagedWindow extends ManagedWindow {
269
+ constructor(options: BrowserWindowConstructorOptions);
270
+ }
271
+ /** Managed `BaseWindow` host; the creator owns the `WebContentsView`. */
272
+ export declare class BaseWindowManagedWindow extends ManagedWindow<WindowData, BaseWindow> {
273
+ attach(window: BaseWindow): void;
274
+ }
275
+ /**
276
+ * A short-lived `BrowserWindow` created as a layer surface.
277
+ *
278
+ * Cursor capture needs a mapped surface with a renderer; it is not a menu
279
+ * surface, so it gets its own managed window. Keeping construction here is
280
+ * what keeps every `BrowserWindow` creation inside the managed wrapper.
281
+ */
282
+ export declare class LayerCaptureWindow extends ManagedWindow<WindowData, BrowserWindow> {
283
+ constructor(options: BrowserWindowConstructorOptions, layerShell: LayerShellOptions, title: string);
284
+ }
285
+ export declare abstract class OnDemandWindow<T extends WindowData = WindowData> extends ManagedWindow<T> {
286
+ /** State bound to the single BrowserWindow */
287
+ protected windowState: OnDemandWindowState | null;
288
+ protected isBeingDismissed(): boolean;
289
+ /**
290
+ * A pending first show counts: the window exists, it is just not on screen
291
+ * yet, and the show request is what a policy switch has to carry over.
292
+ */
293
+ wantsToBeVisible(): boolean;
294
+ protected onWindowHidden(): void;
295
+ show(): Promise<void> | undefined;
296
+ hide(): void;
297
+ abstract createWindow(state: OnDemandWindowState): BrowserWindow;
298
+ }
299
+ /**
300
+ * Move a window to the other lifecycle policy.
301
+ *
302
+ * The bound window is dismissed and recreated by `create`; everything the
303
+ * wrapper recorded (`name`, size limits, always-on-top, native input regions)
304
+ * moves to the replacement, and so do the position and size it currently has —
305
+ * a window the user moved or resized comes back where it was. A window that was
306
+ * on screen, or was waiting to appear, is shown again, so the switch is only
307
+ * visible as a re-created window, not as a disappearing one.
308
+ *
309
+ * The layer-shell policy moves with the rest. A window class that registers its
310
+ * own policy does it for the surface it creates, so the replacement is a layer
311
+ * surface right away; policy registered on the discarded wrapper is carried
312
+ * over to the replacement's id, and can only take effect on the surface the
313
+ * replacement creates afterwards, because `create` has already built one by the
314
+ * time the hand-off happens.
315
+ */
316
+ export declare function switchWindowPolicy(current: ManagedWindow | null, create: () => ManagedWindow): ManagedWindow;
@@ -0,0 +1,3 @@
1
+ import { BrowserWindow } from "electron";
2
+ import { Color } from "../../shared/contracts/color-picker-api.js";
3
+ export default function pickColor(initial?: `#${string}`, parent?: BrowserWindow): Promise<Color | null>;
@@ -0,0 +1,12 @@
1
+ import { DesktopLyricsPlayInfo, LyricsStyle } from "../../shared/types/desktop-lyrics.js";
2
+ import { ManagedWindow } from "../window.js";
3
+ export declare const lyricsStyle: LyricsStyle;
4
+ export declare function refreshLyricsStyle(): boolean;
5
+ export declare let lyricsOffset: number;
6
+ export declare function setLyricsOffset(offset: number): boolean;
7
+ export declare let lyricsLocked: boolean;
8
+ export declare function setLyricsLocked(locked: boolean): boolean;
9
+ export declare function updateLyricsPlayInfo(info: DesktopLyricsPlayInfo | null): boolean;
10
+ export declare let window: ManagedWindow;
11
+ export default function createDesktopLyricsWindow(): Promise<void>;
12
+ export declare function createDesktopLyricsPreview(style: LyricsStyle, text: string): Promise<[Buffer, [number, number]]>;
@@ -0,0 +1,8 @@
1
+ import { ManagedWindow } from "../window.js";
2
+ export default class DesktopPetWindow extends ManagedWindow {
3
+ constructor(url: string, size?: {
4
+ width: number;
5
+ height: number;
6
+ }, topmost?: boolean);
7
+ private sendMouseEvent;
8
+ }
@@ -0,0 +1,6 @@
1
+ import { ManagedWindow } from "../window.js";
2
+ declare class MainWindow extends ManagedWindow {
3
+ constructor();
4
+ }
5
+ export default function createMainWindow(): Promise<MainWindow>;
6
+ export {};
@@ -0,0 +1,2 @@
1
+ export default function showManageWindow(): void;
2
+ export declare function setManageWindowFont(font: string | null): void;
@@ -0,0 +1,16 @@
1
+ import { ManagedWindow } from "../window.js";
2
+ import type { MiniPlayerLikeMark, MiniPlayerPlayInfo, MiniPlayerListElement, MiniPlayerFullState, MiniPlayerStyle, MiniPlayerTogetherStatus } from "../../shared/types/mini-player.js";
3
+ export declare function updatePlayInfo(info: MiniPlayerPlayInfo | null): void;
4
+ export declare function updateCoverUrl(url: string | null): void;
5
+ export declare function updateLikeMark(liked: MiniPlayerLikeMark): void;
6
+ export declare function updateFavour(favourited: boolean): void;
7
+ export declare function updateMute(muted: boolean): void;
8
+ export declare function updatePlayState(playing: boolean): void;
9
+ export declare function updateListData(items: MiniPlayerListElement[], cp: string | null): void;
10
+ export declare function updateTogetherStatus(status: MiniPlayerTogetherStatus): void;
11
+ export declare function showVolume(volume: number, muted: boolean): void;
12
+ export declare function updateStyle(newStyle: MiniPlayerStyle | null): void;
13
+ export declare function setMiniPlayerFont(font: string | null): void;
14
+ export declare function getFullState(): MiniPlayerFullState;
15
+ export declare let window: ManagedWindow;
16
+ export default function createMiniPlayerWindow(): Promise<void>;
@@ -0,0 +1,13 @@
1
+ import { Display } from "electron";
2
+ import { ManagedWindow } from "../window.js";
3
+ export default class MusicDesktopWindow extends ManagedWindow {
4
+ private display;
5
+ /** The display geometry last applied through `setBounds`. */
6
+ private placed;
7
+ private layerShellOptions;
8
+ constructor(url: string);
9
+ private updateBounds;
10
+ /** Whether the window still needs to be moved to `display`'s geometry. */
11
+ private needsPlacement;
12
+ setDisplay(display: Display): void;
13
+ }
@@ -0,0 +1,2 @@
1
+ import { PackageDownloadReason } from "../../shared/types/package-download.js";
2
+ export default function showPackgeDownloadWindow(downloadReason?: PackageDownloadReason): Promise<void>;
@@ -0,0 +1,7 @@
1
+ import type { Mount } from "../../shared/bridge/hub.js";
2
+ import type { PluginManagerContract } from "../../shared/contracts/plugin-manager-api.js";
3
+ /** Track a plugin-manager window so catalog changes can be pushed to it. */
4
+ export declare function trackPluginManagerWindow(mount: Mount<PluginManagerContract>): void;
5
+ export declare function untrackPluginManagerWindow(mount: Mount<PluginManagerContract>): void;
6
+ /** Notify every open plugin-manager window that the catalog changed. */
7
+ export declare function notifyPluginManagerChanged(): void;
@@ -0,0 +1,5 @@
1
+ import { ManagedWindow } from "../window.js";
2
+ export declare class PluginManagerWindow extends ManagedWindow {
3
+ constructor();
4
+ }
5
+ export default function showPluginManagerWindow(): void;
@@ -0,0 +1,48 @@
1
+ export type AegisEncryptState = 0 | 1 | 2 | 3;
2
+ export type AegisInitConfig = {
3
+ aegisUpdateIntervalMinute?: number;
4
+ updateIntervalMinute?: number;
5
+ };
6
+ export type AegisPublicKeyRequest = {
7
+ currentKeyVersion: string;
8
+ requestType: "active" | "passive";
9
+ signature: string;
10
+ timestamp: string;
11
+ nonce: string;
12
+ };
13
+ export type AegisCallbacks = {
14
+ onEncryptStateChange: (state: AegisEncryptState, reason: string) => void;
15
+ onRequestPublicKey: (request: AegisPublicKeyRequest) => void;
16
+ };
17
+ export declare class XeapiAegis {
18
+ private readonly staticKey;
19
+ private readonly publicKeyCachePath;
20
+ private publicKey;
21
+ private dynamicKey;
22
+ private dynamicKeyCreatedAt;
23
+ private dynamicKeyIntervalMinute;
24
+ private sessionId;
25
+ private sessionKey;
26
+ private state;
27
+ private callbacks;
28
+ private pendingPublicKeyNonces;
29
+ private localEncryptFailCount;
30
+ private publicKeyUpdateFailCount;
31
+ constructor(publicKeyCachePath?: string);
32
+ init(config: AegisInitConfig, callbacks: AegisCallbacks): {
33
+ errorCode: number;
34
+ };
35
+ setSession(sessionId?: string, sessionKey?: string): void;
36
+ encrypt(body: string): string;
37
+ updatePublicKeyResponse(responseText: string): boolean;
38
+ private requestPublicKey;
39
+ private updateState;
40
+ private findMatchingPublicKeyNonce;
41
+ private recordLocalEncryptFailure;
42
+ private recordPublicKeyUpdateFailure;
43
+ private getBusinessKey;
44
+ private encryptBusinessData;
45
+ private encryptDynamicKey;
46
+ private loadCachedPublicKey;
47
+ private saveCachedPublicKey;
48
+ }
@@ -0,0 +1,124 @@
1
+ /** A PEQ band (0–8). Presence in the `setPeqBands` array = active. */
2
+ export interface PeqBand {
3
+ band: number;
4
+ freq?: number;
5
+ gain?: number;
6
+ q?: number;
7
+ type?: number;
8
+ }
9
+ export default class AudioEffectManager {
10
+ private enabled;
11
+ private ctx;
12
+ /** Entry point — external source connects here */
13
+ input: GainNode;
14
+ /** Exit point — connects to destination */
15
+ output: GainNode;
16
+ private readonly bassFilter;
17
+ private readonly trebleFilter;
18
+ private readonly eqBands;
19
+ private readonly eqTail;
20
+ private _workletNode;
21
+ private readonly compressorNode;
22
+ private readonly limiterNode;
23
+ private readonly peqBands;
24
+ private readonly peqTail;
25
+ private readonly peqGainNode;
26
+ private readonly convolverNode;
27
+ private convolverLoadSerial;
28
+ private readonly slots;
29
+ private readonly pendingSlotStates;
30
+ private readonly _workletPromise;
31
+ constructor(ctx: AudioContext);
32
+ /**
33
+ * Resolves when the audio-effect worklet module has been loaded and the
34
+ * AudioWorkletNode is ready. Safe to await before activating the worklet
35
+ * slot.
36
+ */
37
+ get workletReady(): Promise<void>;
38
+ private _initWorklet;
39
+ /**
40
+ * Set if the audio effects should be enabled.
41
+ *
42
+ * @param enabled Should audio effects be enabled.
43
+ */
44
+ setEnabled(enabled: boolean): void;
45
+ /**
46
+ * Set the 10-band graphic equalizer.
47
+ *
48
+ * @param eq Array of 10 gain values (dB), index-mapped to
49
+ * `[31, 63, 125, 250, 500, 1k, 2k, 4k, 8k, 16k]` Hz.
50
+ * Pass `null` to bypass the EQ stage entirely.
51
+ */
52
+ setEqualizers(eq: number[] | null): void;
53
+ /**
54
+ * Set bass gain (low-shelf).
55
+ *
56
+ * @param bass Gain in dB, range -10 … +10.
57
+ * Pass `0` to bypass the bass stage.
58
+ */
59
+ setBass(bass: number): void;
60
+ /**
61
+ * Set treble gain (high-shelf).
62
+ *
63
+ * @param treble Gain in dB, range -10 … +10.
64
+ * Pass `0` to bypass the treble stage.
65
+ */
66
+ setTreble(treble: number): void;
67
+ /**
68
+ * The underlying AudioWorkletNode, or `null` if the module hasn't loaded
69
+ * yet or failed to load.
70
+ */
71
+ get workletNode(): AudioWorkletNode | null;
72
+ /**
73
+ * Send a parameter update to the audio-effect worklet.
74
+ *
75
+ * Safe to call before the worklet is ready — the message is queued and
76
+ * delivered once the node is available.
77
+ *
78
+ * @param data Arbitrary structured-cloneable payload forwarded to the
79
+ * worklet's `port.onmessage` handler.
80
+ */
81
+ postWorkletMessage(data: unknown): void;
82
+ /**
83
+ * Activate or bypass the WASM worklet slot.
84
+ *
85
+ * Call this whenever worklet-backed effects (SE, rotate, ER, FDN)
86
+ * are enabled or disabled.
87
+ */
88
+ setWorkletActive(on: boolean): void;
89
+ /**
90
+ * Set PEQ bands. Pass `[]` or an empty array to bypass PEQ entirely.
91
+ * Each band's optional fields (`freq`, `gain`, `q`, `type`) preserve
92
+ * the current value when omitted.
93
+ */
94
+ setPeqBands(bands: PeqBand[]): void;
95
+ /** Set overall PEQ output gain in dB. */
96
+ setPeqGain(gainDb: number): void;
97
+ /** Toggle the dynamics compressor. */
98
+ setCompressorEnabled(on: boolean): void;
99
+ /** Toggle the peak limiter. */
100
+ setLimiterEnabled(on: boolean): void;
101
+ /**
102
+ * Load a WAV impulse response into the convolution reverb.
103
+ *
104
+ * The WAV buffer is decoded asynchronously via `decodeAudioData`.
105
+ * On success, the convolver is activated as an optional FIR effect slot.
106
+ *
107
+ * @param wavBuffer Raw RIFF/WAVE bytes (e.g. from NCAE type 2 payload).
108
+ */
109
+ setConvolutionIR(wavBuffer: Uint8Array): Promise<void>;
110
+ /** Remove the current convolution impulse response. */
111
+ clearConvolutionIR(): void;
112
+ /** Toggle a slot. Rebuilds the chain only when the active state actually changes. */
113
+ private setSlotActive;
114
+ private addSlot;
115
+ /**
116
+ * Rebuild the entire effect chain from scratch.
117
+ *
118
+ * Signal flow:
119
+ * input → [active slots in order] → output
120
+ *
121
+ * When no slots are active the chain is simply input → output.
122
+ */
123
+ private rebuildChain;
124
+ }
@@ -0,0 +1,34 @@
1
+ import type { AudioPlayInfo } from "./Player.js";
2
+ /**
3
+ * The uniform media events a playback backend raises. `Player` re-emits these
4
+ * as its typed `PlayerEvents`, so consumers never touch the underlying engine.
5
+ * `load` is the backend's readiness signal ("can play now").
6
+ */
7
+ export type PlaybackEventName = "load" | "play" | "playing" | "pause" | "ended" | "error" | "stalled" | "seeking" | "seeked" | "timeupdate" | "durationchange" | "ratechange";
8
+ /** Callback through which a backend reports media events to `Player`. */
9
+ export type PlaybackEventSink = (name: PlaybackEventName, data?: unknown) => void;
10
+ /**
11
+ * A playback engine behind `Player`'s media surface: either the hidden
12
+ * `<audio>` element or the AV3A decode backend. `Player` holds whichever is
13
+ * active and delegates every transport/state call to it; it never branches on
14
+ * which one it is.
15
+ */
16
+ export interface PlaybackBackend {
17
+ /** Node feeding the effect chain and audio-data capture (null until ready). */
18
+ readonly sourceNode: AudioNode | null;
19
+ /** Start playing `playInfo`. Raises `load` when playback can start. */
20
+ load(playInfo: AudioPlayInfo): Promise<void>;
21
+ play(): Promise<void>;
22
+ pause(): void;
23
+ stop(): void;
24
+ /** Seek to a content time in seconds. */
25
+ seek(seconds: number): void;
26
+ readonly currentTime: number;
27
+ readonly duration: number;
28
+ readonly paused: boolean;
29
+ readonly ended: boolean;
30
+ readonly playbackRate: number;
31
+ setPlaybackRate(rate: number): void;
32
+ /** Release resources (media source / decode session). */
33
+ dispose(): Promise<void>;
34
+ }