@vestra-player/sdk 1.5.41 → 1.5.43

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.
@@ -520,7 +520,7 @@ export interface Scope extends Disposable {
520
520
  * `dataDirectory`.
521
521
  *
522
522
  * @capability That of each module (see the modules).
523
- * @see [How a plugin runs](../../docs/concepts/plugins.md)
523
+ * @see [How a plugin runs](../../docs/explanation/plugins.md)
524
524
  * @since 1.0.0
525
525
  * @category Plugin
526
526
  */
@@ -540,7 +540,7 @@ export interface Plugin extends Scope {
540
540
  * {@link PluginInfo.dataDirectory}). Write files atomically (to a
541
541
  * temporary name, then rename); for JSON settings prefer
542
542
  * {@link Scope.storage}. Throws `unavailable` when the player provided
543
- * none. See [How a plugin runs](../../docs/concepts/plugins.md#the-data-directory).
543
+ * none. See [How a plugin runs](../../docs/explanation/plugins.md#the-data-directory).
544
544
  */
545
545
  readonly dataDirectory: string;
546
546
  }
@@ -918,7 +918,7 @@ export interface CommandButton {
918
918
  * order, group or binding. The same path registered twice, or a path that
919
919
  * is both an item and a submenu, fails with `conflict` (through `ready`).
920
920
  *
921
- * @see {@link Commands.add}, [Commands, menus and key bindings](../../docs/concepts/commands.md)
921
+ * @see {@link Commands.add}, [Commands, menus and key bindings](../../docs/explanation/commands.md)
922
922
  * @since 1.0.0
923
923
  * @category Commands
924
924
  */
@@ -1085,7 +1085,7 @@ export interface CommandOptions {
1085
1085
  * exportCommand.set({ enabled: () => plugin.player.state.phase === "ready" });
1086
1086
  * ```
1087
1087
  *
1088
- * @see {@link Commands.add}, [Commands, menus and key bindings](../../docs/concepts/commands.md)
1088
+ * @see {@link Commands.add}, [Commands, menus and key bindings](../../docs/explanation/commands.md)
1089
1089
  * @since 1.0.0
1090
1090
  * @category Commands
1091
1091
  */
@@ -1171,7 +1171,7 @@ export interface Command extends Disposable {
1171
1171
  * });
1172
1172
  * ```
1173
1173
  *
1174
- * @see {@link Command}, {@link CommandOptions}, [Commands, menus and key bindings](../../docs/concepts/commands.md)
1174
+ * @see {@link Command}, {@link CommandOptions}, [Commands, menus and key bindings](../../docs/explanation/commands.md)
1175
1175
  * @since 1.0.0
1176
1176
  * @category Commands
1177
1177
  */
@@ -1261,7 +1261,7 @@ export interface Commands {
1261
1261
  * }));
1262
1262
  * ```
1263
1263
  *
1264
- * @see {@link Ui.image}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/concepts/ui.md)
1264
+ * @see {@link Ui.image}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/explanation/ui.md)
1265
1265
  * @since 1.0.0
1266
1266
  * @category UI
1267
1267
  */
@@ -1471,7 +1471,7 @@ export type Props = Record<string, PropValue>;
1471
1471
  *
1472
1472
  * {@includeCode ../../examples/markdown/ui/document.slint}
1473
1473
  *
1474
- * @see {@link ImageRef}, {@link MarkdownRef}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/concepts/ui.md)
1474
+ * @see {@link ImageRef}, {@link MarkdownRef}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/explanation/ui.md)
1475
1475
  * @since 1.0.0
1476
1476
  * @category UI
1477
1477
  */
@@ -1736,7 +1736,7 @@ export interface Ui {
1736
1736
  *
1737
1737
  * {@includeCode ../../examples/bookmark/ui/bookmark.slint}
1738
1738
  *
1739
- * @see {@link Window}, {@link Panel}, {@link SettingsPage}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/concepts/ui.md), [Keep a slider responsive while dragging](../../docs/how-to/slider.md)
1739
+ * @see {@link Window}, {@link Panel}, {@link SettingsPage}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/explanation/ui.md), [Keep a slider responsive while dragging](../../docs/how-to/slider.md)
1740
1740
  * @since 1.0.0
1741
1741
  * @category UI
1742
1742
  */
@@ -1947,7 +1947,7 @@ export interface View {
1947
1947
  * });
1948
1948
  * ```
1949
1949
  *
1950
- * @see {@link Windows.create}, {@link View}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/concepts/ui.md), [Remember a window's state between runs](../../docs/how-to/window-state.md)
1950
+ * @see {@link Windows.create}, {@link View}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/explanation/ui.md), [Remember a window's state between runs](../../docs/how-to/window-state.md)
1951
1951
  * @since 1.0.0
1952
1952
  * @category UI
1953
1953
  */
@@ -2129,7 +2129,7 @@ export interface Window extends View, Disposable {
2129
2129
  *
2130
2130
  * {@includeCode ../../examples/bookmark/main.ts#window,command}
2131
2131
  *
2132
- * @see {@link Window}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/concepts/ui.md)
2132
+ * @see {@link Window}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/explanation/ui.md)
2133
2133
  * @since 1.0.0
2134
2134
  * @category UI
2135
2135
  */
@@ -2534,7 +2534,7 @@ export interface SidebarSlot extends PanelSlot {
2534
2534
  *
2535
2535
  * {@includeCode ../../examples/panel-menu/ui/panel.slint}
2536
2536
  *
2537
- * @see {@link Panels.mount}, {@link PanelSlot}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/concepts/ui.md)
2537
+ * @see {@link Panels.mount}, {@link PanelSlot}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/explanation/ui.md)
2538
2538
  * @since 1.0.0
2539
2539
  * @category UI
2540
2540
  */
@@ -2972,7 +2972,7 @@ export type ThemeId = "vestra" | "vestra-light";
2972
2972
  * });
2973
2973
  * ```
2974
2974
  *
2975
- * @see [Windows, panels, settings pages, dialogs and the OSD](../../docs/concepts/ui.md) (theme tokens)
2975
+ * @see [Windows, panels, settings pages, dialogs and the OSD](../../docs/explanation/ui.md) (theme tokens)
2976
2976
  * @since 1.0.0
2977
2977
  * @category UI
2978
2978
  */
@@ -3493,7 +3493,7 @@ export type SettingsCategory = "general" | "playback" | "subtitles" | "video" |
3493
3493
  * }
3494
3494
  * ```
3495
3495
  *
3496
- * @see {@link Settings.page}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/concepts/ui.md)
3496
+ * @see {@link Settings.page}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/explanation/ui.md)
3497
3497
  * @since 1.0.0
3498
3498
  * @category UI
3499
3499
  */
@@ -3554,7 +3554,7 @@ export type SettingsPage = View & Disposable & {
3554
3554
  * page.on("resumeToggled", (on: boolean) => store.save({ ...store.value, resume: on }));
3555
3555
  * ```
3556
3556
  *
3557
- * @see {@link SettingsPage}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/concepts/ui.md)
3557
+ * @see {@link SettingsPage}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/explanation/ui.md)
3558
3558
  * @since 1.0.0
3559
3559
  * @category UI
3560
3560
  */
@@ -3746,7 +3746,7 @@ export interface BackdropSlot {
3746
3746
  *
3747
3747
  * {@includeCode ../../examples/panel-menu/ui/panel.slint}
3748
3748
  *
3749
- * @see {@link Panel}, {@link PanelSlot}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/concepts/ui.md)
3749
+ * @see {@link Panel}, {@link PanelSlot}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/explanation/ui.md)
3750
3750
  * @since 1.0.0
3751
3751
  * @category UI
3752
3752
  */
@@ -4469,7 +4469,7 @@ export interface ConfirmOptions {
4469
4469
  * }
4470
4470
  * ```
4471
4471
  *
4472
- * @see [Windows, panels, settings pages, dialogs and the OSD](../../docs/concepts/ui.md)
4472
+ * @see [Windows, panels, settings pages, dialogs and the OSD](../../docs/explanation/ui.md)
4473
4473
  * @since 1.0.0
4474
4474
  * @category UI
4475
4475
  */
@@ -4683,7 +4683,7 @@ export interface AudioTrack {
4683
4683
  * Without `events`, {@link Player.state} only updates at start and after
4684
4684
  * this plugin's own operations.
4685
4685
  *
4686
- * @see {@link Player.state}, [Playback state, controls and sources](../../docs/concepts/playback.md)
4686
+ * @see {@link Player.state}, [Playback state, controls and sources](../../docs/explanation/playback.md)
4687
4687
  * @since 1.0.0
4688
4688
  * @category Playback
4689
4689
  */
@@ -4816,7 +4816,7 @@ export interface Chapter {
4816
4816
  * });
4817
4817
  * ```
4818
4818
  *
4819
- * @see [Playback state, controls and sources](../../docs/concepts/playback.md)
4819
+ * @see [Playback state, controls and sources](../../docs/explanation/playback.md)
4820
4820
  * @since 1.0.0
4821
4821
  * @category Playback
4822
4822
  */
@@ -5335,7 +5335,7 @@ export interface PlaybackStats {
5335
5335
  * `events` to follow changes made elsewhere; `producer.av` for
5336
5336
  * {@link Player.openStream}.
5337
5337
  *
5338
- * @see [Playback state, controls and sources](../../docs/concepts/playback.md), [Control playback](../../docs/how-to/control-playback.md)
5338
+ * @see [Playback state, controls and sources](../../docs/explanation/playback.md), [Control playback](../../docs/how-to/control-playback.md)
5339
5339
  * @since 1.0.0
5340
5340
  * @category Playback
5341
5341
  */
@@ -6298,7 +6298,7 @@ export interface OsdPanelOptions {
6298
6298
  * say("Blur on");
6299
6299
  * ```
6300
6300
  *
6301
- * @see {@link OsdPanel}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/concepts/ui.md)
6301
+ * @see {@link OsdPanel}, [Windows, panels, settings pages, dialogs and the OSD](../../docs/explanation/ui.md)
6302
6302
  * @since 1.0.0
6303
6303
  * @category UI
6304
6304
  */
@@ -6463,7 +6463,7 @@ interface Filter<T> extends Disposable {
6463
6463
  * never throws: a refused chain shows as `failed` in `status`.
6464
6464
  *
6465
6465
  * @capability processing.video, playback.read and events
6466
- * @see [Video and audio processing](../../docs/concepts/processing.md)
6466
+ * @see [Video and audio processing](../../docs/explanation/processing.md)
6467
6467
  * @since 1.0.0
6468
6468
  * @category Processing
6469
6469
  */
@@ -6492,7 +6492,7 @@ export type VideoFilter = Filter<VideoNode[]>;
6492
6492
  * result, `retry` applies it again, `dispose` withdraws it.
6493
6493
  *
6494
6494
  * @capability processing.audio, playback.read and events
6495
- * @see [Video and audio processing](../../docs/concepts/processing.md)
6495
+ * @see [Video and audio processing](../../docs/explanation/processing.md)
6496
6496
  * @since 1.0.0
6497
6497
  * @category Processing
6498
6498
  */
@@ -6551,7 +6551,7 @@ export interface ViewSettings {
6551
6551
  *
6552
6552
  * @capability processing.video, playback.read and events (like
6553
6553
  * {@link VideoFilter})
6554
- * @see [Video and audio processing](../../docs/concepts/processing.md)
6554
+ * @see [Video and audio processing](../../docs/explanation/processing.md)
6555
6555
  * @since 1.0.0
6556
6556
  * @category Processing
6557
6557
  */
@@ -6662,7 +6662,7 @@ export interface RenderSettings {
6662
6662
  *
6663
6663
  * @capability processing.video, playback.read and events (like
6664
6664
  * {@link VideoFilter})
6665
- * @see [Video and audio processing](../../docs/concepts/processing.md)
6665
+ * @see [Video and audio processing](../../docs/explanation/processing.md)
6666
6666
  * @since 1.0.0
6667
6667
  * @category Processing
6668
6668
  */
@@ -6766,7 +6766,7 @@ export interface RenderOptions extends Disposable {
6766
6766
  *
6767
6767
  * @capability processing.video
6768
6768
  * @player 0.5.20; older players refuse the request.
6769
- * @see [Video and audio processing](../../docs/concepts/processing.md)
6769
+ * @see [Video and audio processing](../../docs/explanation/processing.md)
6770
6770
  * @since 1.5.39
6771
6771
  * @category Processing
6772
6772
  */
@@ -6870,7 +6870,7 @@ export interface VideoShaders extends Disposable {
6870
6870
  * | `gpu-unsupported` | The driver does not offer upscaling on this GPU (Windows: not an RTX GPU), or the check failed. |
6871
6871
  * | `rendering` | The player renders in software, or GPU rendering is still starting; upscaling needs GPU rendering ({@link Rendering}). |
6872
6872
  * | `adapter` | GPU rendering runs on another GPU than the one that can upscale (a laptop with two GPUs; Windows: choose the high-performance GPU for Vestra in Settings ▸ System ▸ Display ▸ Graphics). |
6873
- * | `decoding` | The video is not decoded on the GPU that renders it: copy-back or software decoding, for example while a {@link VideoFilter} needs the frames in memory. |
6873
+ * | `decoding` | The video is not decoded on the GPU that renders it: copy-back or software decoding, for example while a {@link VideoFilter} needs the frames in memory. {@link UpscalingReason.cause} says which, and {@link UpscalingReason.plugins} whose filters (newer players; see there). |
6874
6874
  * | `unchecked` | The player has not checked the GPU yet. Only in the answer to `set(false)`, which never starts the check; `state()` and `set(true)` always check first. |
6875
6875
  *
6876
6876
  * `decoding` and `rendering` while GPU rendering is still starting can pass
@@ -6925,6 +6925,93 @@ export interface UpscalingReason {
6925
6925
  * and what to change; never branch on it.
6926
6926
  */
6927
6927
  readonly message: string;
6928
+ /**
6929
+ * With code `decoding` only: why the video is not decoded on the GPU
6930
+ * that renders it ({@link UpscalingDecodingCause}). Absent with every
6931
+ * other code, and from players before 0.5.25.
6932
+ *
6933
+ * @player 0.5.25; older players send `decoding` without a cause.
6934
+ * @since 1.5.43
6935
+ */
6936
+ readonly cause?: UpscalingDecodingCause;
6937
+ /**
6938
+ * With cause `copy-back` only: the plugins whose video filters need the
6939
+ * frames in memory, which is why the player switched to copy-back
6940
+ * decoding, in the order the plugins started (each plugin once). Name
6941
+ * them to the user, who can turn the filters off there. Empty when
6942
+ * the copy-back decoding is not one the player chose for a filter (the
6943
+ * user's own `hwdec` setting). Absent with any other cause, and from
6944
+ * players before 0.5.25.
6945
+ *
6946
+ * @player 0.5.25
6947
+ * @since 1.5.43
6948
+ */
6949
+ readonly plugins?: readonly UpscalingPlugin[];
6950
+ }
6951
+ /**
6952
+ * Why the video is not decoded on the GPU that renders it: the
6953
+ * {@link UpscalingReason.cause} of a `decoding` reason (player 0.5.25). A
6954
+ * newer player may add causes: show {@link UpscalingReason.message} for the
6955
+ * ones you do not handle.
6956
+ *
6957
+ * | Cause | Meaning |
6958
+ * | --- | --- |
6959
+ * | `copy-back` | Decoded on the GPU and copied back to memory, because a plugin's video filter needs the frames there ({@link UpscalingReason.plugins} names it), or because of the user's `hwdec` setting. |
6960
+ * | `hwdec-off` | Hardware decoding is turned off (mpv's `hwdec` is `no`). |
6961
+ * | `software` | This video is decoded in software: a cover picture, a format the GPU does not decode, or a hardware decoder that failed. It passes with the next video. |
6962
+ * | `other-hwdec` | This video is decoded with another hardware decoder than the one the upscaler needs. |
6963
+ *
6964
+ * @example Name the plugins whose filters block upscaling
6965
+ * A plugin's upscaling window explains a `decoding` reason by its cause,
6966
+ * and for `copy-back` names the plugins whose filters stand in the way, so
6967
+ * the user can turn them off there (a plugin cannot run another plugin's
6968
+ * commands).
6969
+ * ```ts
6970
+ * const { reason } = await plugin.video.upscaling.state();
6971
+ * if (reason?.code === "decoding" && reason.cause === "copy-back") {
6972
+ * const names = (reason.plugins ?? []).map((p) => p.name).join(", ");
6973
+ * // Ask the user to reset those filters; the manifest names are not translated.
6974
+ * console.log(names ? `Turn off the video filters of ${names}` : reason.message);
6975
+ * } else if (reason) console.log(reason.message);
6976
+ * ```
6977
+ *
6978
+ * @player 0.5.25
6979
+ * @since 1.5.43
6980
+ * @category Processing
6981
+ */
6982
+ export type UpscalingDecodingCause = "copy-back" | "hwdec-off" | "software" | "other-hwdec" | (string & {});
6983
+ /**
6984
+ * A plugin named in an {@link UpscalingReason}: its manifest id and its
6985
+ * name for people, as its manifest gives it (not translated).
6986
+ *
6987
+ * @player 0.5.25
6988
+ * @since 1.5.43
6989
+ * @category Processing
6990
+ */
6991
+ export interface UpscalingPlugin {
6992
+ /** The plugin's manifest id, for example `vestra.video`. */
6993
+ readonly id: string;
6994
+ /** The manifest's `name` as is (its id without one), for people. */
6995
+ readonly name: string;
6996
+ }
6997
+ /**
6998
+ * The video's size as the upscaler gets it ({@link UpscalingState.video}):
6999
+ * the decoder's frame size, width and height swapped for the file's
7000
+ * quarter-turn rotation metadata.
7001
+ *
7002
+ * @player 0.5.25
7003
+ * @since 1.5.43
7004
+ * @category Processing
7005
+ */
7006
+ export interface UpscalingVideoSize {
7007
+ /** The frames' stored width in pixels. */
7008
+ readonly width: number;
7009
+ /** The frames' stored height in pixels. */
7010
+ readonly height: number;
7011
+ /** The width the video is meant to be shown at (non-square pixels). */
7012
+ readonly displayWidth: number;
7013
+ /** The height the video is meant to be shown at. */
7014
+ readonly displayHeight: number;
6928
7015
  }
6929
7016
  /**
6930
7017
  * What {@link VideoUpscaling.state} and {@link VideoUpscaling.set} report:
@@ -6980,6 +7067,59 @@ export interface UpscalingState {
6980
7067
  * nothing is requested.
6981
7068
  */
6982
7069
  readonly factor: number | null;
7070
+ /**
7071
+ * The video's size as the upscaler gets it; `null` while no video
7072
+ * decodes. With {@link UpscalingState.area} it explains the factor.
7073
+ * Absent from players before 0.5.25.
7074
+ *
7075
+ * @player 0.5.25
7076
+ * @since 1.5.43
7077
+ */
7078
+ readonly video?: UpscalingVideoSize | null;
7079
+ /**
7080
+ * The area the video is shown in, in pixels (the upscaler scales the
7081
+ * video to fit it); `null` while the player shows no video area. Absent
7082
+ * from players before 0.5.25.
7083
+ *
7084
+ * @player 0.5.25
7085
+ * @since 1.5.43
7086
+ */
7087
+ readonly area?: {
7088
+ /** Width in physical pixels. */
7089
+ readonly width: number;
7090
+ /** Height in physical pixels. */
7091
+ readonly height: number;
7092
+ } | null;
7093
+ /**
7094
+ * The name of the GPU that renders, for example `NVIDIA GeForce RTX 4070
7095
+ * Laptop GPU`; `null` in software rendering and where the player does not
7096
+ * know it (macOS, Linux). Absent from players before 0.5.25.
7097
+ *
7098
+ * @player 0.5.25
7099
+ * @since 1.5.43
7100
+ */
7101
+ readonly gpu?: string | null;
7102
+ /**
7103
+ * The hardware decoder in use for this video, as mpv names it (`d3d11va`,
7104
+ * `d3d11va-copy`; `no` for software decoding); `null` while no video
7105
+ * decodes. For people and logs: branch on {@link UpscalingReason.cause}.
7106
+ * Absent from players before 0.5.25.
7107
+ *
7108
+ * @player 0.5.25
7109
+ * @since 1.5.43
7110
+ */
7111
+ readonly hwdecCurrent?: string | null;
7112
+ /**
7113
+ * The upscaler is in the player's video filter chain now, read from the
7114
+ * chain itself (`requested` is what the player asked for; they differ
7115
+ * only for a moment, while the chain changes). Still not a sign that the
7116
+ * GPU upscales: the driver gives none (see the remarks). Absent from
7117
+ * players before 0.5.25.
7118
+ *
7119
+ * @player 0.5.25
7120
+ * @since 1.5.43
7121
+ */
7122
+ readonly inChain?: boolean;
6983
7123
  }
6984
7124
  /**
6985
7125
  * `plugin.video.upscaling`: the GPU's video upscaler, NVIDIA RTX Video
@@ -7119,6 +7259,57 @@ export interface VideoUpscaling {
7119
7259
  * @since 1.5.37
7120
7260
  */
7121
7261
  set(enabled: boolean): Promise<UpscalingState>;
7262
+ /**
7263
+ * Call `listener` with the new state whenever it changes while some
7264
+ * plugin has upscaling on: the factor, whether the upscaler is in the
7265
+ * chain, the reason, the video's and the area's size, the decoder. A
7266
+ * window that shows how upscaling runs listens instead of polling
7267
+ * {@link VideoUpscaling.state}.
7268
+ *
7269
+ * @remarks
7270
+ * The player looks about five times a second while upscaling is on for
7271
+ * any plugin (a window resize sends at most that many), and sends a
7272
+ * change only when something differs; after the last plugin turns it
7273
+ * off one more change says so, then nothing until it is on again: read
7274
+ * {@link VideoUpscaling.state} when you need the state then. Nothing is
7275
+ * sent before the player's GPU check ran (the first `state()` or
7276
+ * `set(true)` of any plugin). `enabled` is this plugin's own request, as
7277
+ * in `state()`. The message of a `rendering` reason can be shorter than
7278
+ * the one `state()` gives (it may leave out what to do).
7279
+ *
7280
+ * **A listener keeps the plugin running.** `video.upscaling.changed` is
7281
+ * not an event the player wakes a stopped plugin for: while the plugin
7282
+ * listens, the player does not stop it while idle (lazy activation), even
7283
+ * with upscaling off. Listen only while a window that shows the state is
7284
+ * open, and dispose of the listener when it closes. Players before 0.5.25 do not know the event: the listener
7285
+ * never fires and the SDK logs that the player refused the subscription.
7286
+ *
7287
+ * @capability video.upscaling
7288
+ * @param listener - Receives the new state.
7289
+ * @returns Stops listening; also when the scope that added it is
7290
+ * disposed.
7291
+ * @throws `capability` (synchronously) The manifest does not declare
7292
+ * `video.upscaling`.
7293
+ *
7294
+ * @example Show how upscaling runs while a window is open
7295
+ * The plugin's window shows the factor, the sizes and the GPU while it
7296
+ * is open; the listener goes when the window closes, so the plugin can
7297
+ * be stopped while idle again.
7298
+ * ```ts
7299
+ * // When the window opens:
7300
+ * const watch = plugin.video.upscaling.onChange((state) => {
7301
+ * const video = state.video ? `${state.video.width}×${state.video.height}` : "no video";
7302
+ * const area = state.area ? `${state.area.width}×${state.area.height}` : "—";
7303
+ * console.log(`${video} → ${area}, ×${state.factor ?? 1}, ${state.gpu ?? "no GPU"}`);
7304
+ * });
7305
+ * // When it closes: stop listening (it keeps the plugin running).
7306
+ * await watch.dispose();
7307
+ * ```
7308
+ *
7309
+ * @player 0.5.25
7310
+ * @since 1.5.43
7311
+ */
7312
+ onChange(listener: (state: UpscalingState) => void): Disposable;
7122
7313
  }
7123
7314
  /**
7124
7315
  * A subtitle track of the current source.
@@ -7977,7 +8168,7 @@ export interface Resolver extends Disposable {
7977
8168
  * another plugin), so the plugin does not intercept opens itself.
7978
8169
  *
7979
8170
  * @capability source.resolve (file resolvers also `producer.av`)
7980
- * @see [Playback state, controls and sources](../../docs/concepts/playback.md)
8171
+ * @see [Playback state, controls and sources](../../docs/explanation/playback.md)
7981
8172
  * @since 1.0.0
7982
8173
  * @category Sources
7983
8174
  */
@@ -8751,7 +8942,7 @@ export interface BindingInfo extends BindingRef {
8751
8942
  * applies the change at once to every running plugin.
8752
8943
  *
8753
8944
  * @capability bindings.manage
8754
- * @see [Commands, menus and key bindings](../../docs/concepts/commands.md)
8945
+ * @see [Commands, menus and key bindings](../../docs/explanation/commands.md)
8755
8946
  * @since 1.0.0
8756
8947
  * @category Commands
8757
8948
  */
package/dist/wire.d.ts CHANGED
@@ -338,14 +338,41 @@ export interface WireRenderingState {
338
338
  reason: WireRenderingReason | null;
339
339
  };
340
340
  }
341
- /** `video.upscaling.state` and `video.upscaling.set` (player 0.5.16). */
341
+ /**
342
+ * An upscaling reason: `{ code, message }` as a rendering reason; with
343
+ * `decoding` a `cause`, with cause `copy-back` the `plugins` (player 0.5.25).
344
+ */
345
+ export interface WireUpscalingReason extends WireRenderingReason {
346
+ cause?: string;
347
+ plugins?: {
348
+ id: string;
349
+ name: string;
350
+ }[];
351
+ }
352
+ /**
353
+ * `video.upscaling.state` and `video.upscaling.set` (player 0.5.16); the
354
+ * monitoring fields from player 0.5.25, which also sends the state without
355
+ * `enabled` as the event `video.upscaling.changed`.
356
+ */
342
357
  export interface WireUpscalingState {
343
358
  available: boolean;
344
- /** The same `{ code, message }` shape as a rendering reason. */
345
- reason: WireRenderingReason | null;
359
+ reason: WireUpscalingReason | null;
346
360
  enabled: boolean;
347
361
  requested: boolean;
348
362
  factor: number | null;
363
+ video?: {
364
+ width: number;
365
+ height: number;
366
+ displayWidth: number;
367
+ displayHeight: number;
368
+ } | null;
369
+ area?: {
370
+ width: number;
371
+ height: number;
372
+ } | null;
373
+ gpu?: string | null;
374
+ hwdecCurrent?: string | null;
375
+ inChain?: boolean;
349
376
  }
350
377
  /**
351
378
  * Template arguments on the wire (`osd.show`, `osd.panel`, `dialogs.confirm`,
@@ -368,7 +395,7 @@ export interface Transport {
368
395
  locale?: string;
369
396
  }
370
397
  /** The events a plugin subscribes to (`events.subscribe`). */
371
- type HostEvent = "source.state" | "playback.backend" | "window.state" | "packages.changed" | "bindings.changed" | "timeline.changed" | "appearance.changed" | "resolvers.fileTypes";
398
+ type HostEvent = "source.state" | "playback.backend" | "window.state" | "packages.changed" | "bindings.changed" | "timeline.changed" | "appearance.changed" | "resolvers.fileTypes" | "video.upscaling.changed";
372
399
  export declare function createWire(transport: Transport): {
373
400
  processing: {
374
401
  state: () => Promise<import("./processing.ts").ProcessingState>;