@vestra-player/sdk 1.7.0 → 1.7.2

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 (88) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +6 -9
  3. package/bin/vestra-plugin.mjs +4 -4
  4. package/dist/api-requests.d.ts +8 -8
  5. package/dist/api-requests.js +8 -8
  6. package/dist/capability-check.d.ts +15 -15
  7. package/dist/capability-check.js +4 -4
  8. package/dist/capability-rules.d.ts +4 -5
  9. package/dist/capability-rules.js +4 -5
  10. package/dist/commands.d.ts +34 -44
  11. package/dist/commands.js +32 -38
  12. package/dist/docs-tree.json.gz +0 -0
  13. package/dist/docs.d.ts +1 -1
  14. package/dist/docs.js +13 -3
  15. package/dist/i18n-tools.js +1 -1
  16. package/dist/i18n.js +1 -1
  17. package/dist/media.d.ts +7 -7
  18. package/dist/palettes.d.ts +5 -5
  19. package/dist/palettes.js +5 -5
  20. package/dist/plugin/appearance.js +1 -1
  21. package/dist/plugin/bindings.d.ts +2 -3
  22. package/dist/plugin/bindings.js +2 -3
  23. package/dist/plugin/commands.js +10 -11
  24. package/dist/plugin/connection.d.ts +18 -19
  25. package/dist/plugin/connection.js +23 -24
  26. package/dist/plugin/index.d.ts +5 -5
  27. package/dist/plugin/index.js +1 -1
  28. package/dist/plugin/osd.d.ts +1 -1
  29. package/dist/plugin/osd.js +1 -1
  30. package/dist/plugin/passes.d.ts +4 -4
  31. package/dist/plugin/passes.js +4 -4
  32. package/dist/plugin/patch.d.ts +8 -8
  33. package/dist/plugin/patch.js +12 -12
  34. package/dist/plugin/player/events.js +5 -5
  35. package/dist/plugin/resolvers.js +3 -3
  36. package/dist/plugin/scope.d.ts +4 -4
  37. package/dist/plugin/scope.js +4 -4
  38. package/dist/plugin/services.d.ts +2 -3
  39. package/dist/plugin/services.js +2 -3
  40. package/dist/plugin/shaders.js +5 -6
  41. package/dist/plugin/state.js +10 -10
  42. package/dist/plugin/testing/commands.d.ts +4 -5
  43. package/dist/plugin/testing/commands.js +4 -5
  44. package/dist/plugin/testing/i18n.d.ts +1 -1
  45. package/dist/plugin/testing/i18n.js +1 -1
  46. package/dist/plugin/testing/index.d.ts +147 -165
  47. package/dist/plugin/testing/index.js +137 -155
  48. package/dist/plugin/testing/internals.d.ts +2 -2
  49. package/dist/plugin/testing/internals.js +2 -2
  50. package/dist/plugin/timeline.d.ts +1 -1
  51. package/dist/plugin/timeline.js +2 -2
  52. package/dist/plugin/types/base.d.ts +90 -111
  53. package/dist/plugin/types/commands.d.ts +142 -174
  54. package/dist/plugin/types/packages.d.ts +48 -63
  55. package/dist/plugin/types/playback.d.ts +45 -59
  56. package/dist/plugin/types/plugin-wire.d.ts +38 -45
  57. package/dist/plugin/types/processing.d.ts +52 -65
  58. package/dist/plugin/types/services.d.ts +18 -25
  59. package/dist/plugin/types/snapshots.d.ts +34 -46
  60. package/dist/plugin/types/sources.d.ts +14 -16
  61. package/dist/plugin/types/subtitles.d.ts +7 -8
  62. package/dist/plugin/types/ui-content.d.ts +111 -116
  63. package/dist/plugin/types/ui-layout.d.ts +52 -63
  64. package/dist/plugin/types/ui-locale.d.ts +41 -45
  65. package/dist/plugin/types/ui-shell.d.ts +69 -87
  66. package/dist/plugin/values.d.ts +15 -18
  67. package/dist/plugin/values.js +16 -19
  68. package/dist/plugin/view/base.d.ts +2 -2
  69. package/dist/plugin/view/base.js +7 -8
  70. package/dist/plugin/view/layout.d.ts +2 -2
  71. package/dist/plugin/view/panel.js +2 -4
  72. package/dist/plugin/view/writer.d.ts +8 -8
  73. package/dist/plugin/view/writer.js +37 -39
  74. package/dist/plugin/when.d.ts +3 -3
  75. package/dist/plugin/wire-facade.js +6 -7
  76. package/dist/processing.d.ts +26 -30
  77. package/dist/processing.js +4 -4
  78. package/dist/source-resolvers.d.ts +2 -2
  79. package/dist/source.d.ts +1 -2
  80. package/dist/subtitles.d.ts +1 -1
  81. package/dist/ts-plugin.d.ts +5 -5
  82. package/dist/wire.d.ts +63 -70
  83. package/dist/wire.js +21 -25
  84. package/llms.txt +7 -10
  85. package/package.json +1 -1
  86. package/slint/vestra/bar-buttons.slint +6 -8
  87. package/slint/vestra/focus.slint +1 -1
  88. package/slint/vestra/widgets.slint +2 -4
@@ -94,7 +94,7 @@ interface Filter<T> extends Disposable {
94
94
  * never throws: a refused chain shows as `failed` in `status`.
95
95
  *
96
96
  * @capability processing.video, playback.read and events
97
- * @see [Video and audio processing](../../../docs/explanation/processing.md)
97
+ * @see [Process video with a shader or a filter](../../../docs/guides/filters.md)
98
98
  * @since 1.0.0
99
99
  * @category Processing
100
100
  */
@@ -123,7 +123,7 @@ export type VideoFilter = Filter<VideoNode[]>;
123
123
  * result, `retry` applies it again, `dispose` withdraws it.
124
124
  *
125
125
  * @capability processing.audio, playback.read and events
126
- * @see [Video and audio processing](../../../docs/explanation/processing.md)
126
+ * @see [Process video with a shader or a filter](../../../docs/guides/filters.md)
127
127
  * @since 1.0.0
128
128
  * @category Processing
129
129
  */
@@ -182,7 +182,7 @@ export interface ViewSettings {
182
182
  *
183
183
  * @capability processing.video, playback.read and events (like
184
184
  * {@link VideoFilter})
185
- * @see [Video and audio processing](../../../docs/explanation/processing.md)
185
+ * @see [Process video with a shader or a filter](../../../docs/guides/filters.md)
186
186
  * @since 1.0.0
187
187
  * @category Processing
188
188
  */
@@ -282,24 +282,22 @@ export interface RenderSettings {
282
282
  * ```
283
283
  *
284
284
  * @remarks
285
- * GPU renderer options (tone mapping, peak detection, shaders,
286
- * interpolation). Only the GPU renderer has them (macOS; Windows with GPU
287
- * rendering turned on, version 0.5.14 and later);
288
- * under software rendering the handle is `failed` with `unsupported` after
289
- * the player's first answer to `render()` (reported to `onError` too), and so is
285
+ * GPU renderer options (tone mapping, peak detection, shaders, interpolation).
286
+ * Only the GPU renderer has them (macOS; Windows with GPU rendering turned on);
287
+ * under software rendering the handle is `failed` with `unsupported` after the
288
+ * player's first answer to `render()` (reported to `onError` too), and so is
290
289
  * every `set`. Single owner, like {@link VideoView}. `set` never throws; the
291
- * result shows in `status`. For shaders that several plugins add at the
292
- * same time, use {@link VideoShaders} (SDK 1.5.39). After a run of the
293
- * player that ended abnormally while plugin shaders were drawing, a `set`
294
- * whose merged values hold a non-empty `shaders` list is refused with
295
- * `previous-crash` (player 0.6.3; the rules are on {@link VideoShaders}).
296
- * Every `set` sends all the values set so far, the refused `shaders`
297
- * included, so include `shaders: []` in the next `set` to go on without
298
- * them.
290
+ * result shows in `status`. For shaders that several plugins add at the same
291
+ * time, use {@link VideoShaders}. After a run of the player that ended
292
+ * abnormally while plugin shaders were drawing, a `set` whose merged values
293
+ * hold a non-empty `shaders` list is refused with `previous-crash` (the rules
294
+ * are on {@link VideoShaders}). Every `set` sends all the values set so far,
295
+ * the refused `shaders` included, so include `shaders: []` in the next `set` to
296
+ * go on without them.
299
297
  *
300
298
  * @capability processing.video, playback.read and events (like
301
299
  * {@link VideoFilter})
302
- * @see [Video and audio processing](../../../docs/explanation/processing.md)
300
+ * @see [Process video with a shader or a filter](../../../docs/guides/filters.md)
303
301
  * @since 1.0.0
304
302
  * @category Processing
305
303
  */
@@ -321,18 +319,16 @@ export interface RenderOptions extends Disposable {
321
319
  */
322
320
  set(value: Partial<RenderSettings>): void;
323
321
  /**
324
- * `failed` with `unsupported` while the player renders in software;
325
- * `failed` with `failed` when mpv cannot compile a shader (pushed later;
326
- * while other plugins' {@link VideoShaders} are on too, the player
327
- * cannot tell whose shader failed and says so in the message);
328
- * `failed` with `previous-crash` (player 0.6.3) when a `set` with a
329
- * non-empty `shaders` list comes after a run of the player that ended
330
- * abnormally while plugin shaders were drawing (the rules are the same
331
- * as for {@link VideoShaders}). The handle keeps the refused list among
332
- * its values and every `set` sends them all, so a later `set` without
333
- * `shaders` is refused again: include `shaders: []` in it
334
- * (`set({ shaders: [], toneMapping: "bt.2390" })`); `dispose` always
335
- * works.
322
+ * `failed` with `unsupported` while the player renders in software; `failed`
323
+ * with `failed` when mpv cannot compile a shader (pushed later; while other
324
+ * plugins' {@link VideoShaders} are on too, the player cannot tell whose
325
+ * shader failed and says so in the message); `failed` with `previous-crash`
326
+ * when a `set` with a non-empty `shaders` list comes after a run of the
327
+ * player that ended abnormally while plugin shaders were drawing (the rules
328
+ * are the same as for {@link VideoShaders}). The handle keeps the refused
329
+ * list among its values and every `set` sends them all, so a later `set`
330
+ * without `shaders` is refused again: include `shaders: []` in it
331
+ * (`set({ shaders: [], toneMapping: "bt.2390" })`); `dispose` always works.
336
332
  */
337
333
  readonly status: FilterStatus;
338
334
  /**
@@ -357,8 +353,8 @@ export interface RenderOptions extends Disposable {
357
353
  }
358
354
  /**
359
355
  * This plugin's own GPU shaders, from `plugin.video.shaders(id)`
360
- * (`processing.video`, SDK 1.5.39, player 0.5.20): mpv user shaders
361
- * (`.glsl`, `//!HOOK` …) that the GPU renderer runs on every frame.
356
+ * (`processing.video`): mpv user shaders (`.glsl`, `//!HOOK` …) that the GPU
357
+ * renderer runs on every frame.
362
358
  *
363
359
  * @remarks
364
360
  * Any number of plugins hold shader handles at the same time (unlike
@@ -387,24 +383,20 @@ export interface RenderOptions extends Disposable {
387
383
  * which file failed, so while several plugins' shaders are on, each of
388
384
  * them hears it and the message says the player cannot tell whose.
389
385
  *
390
- * `set` sends the whole list (last write wins); `clear` and `dispose`
391
- * withdraw it; the player removes a stopped plugin's shaders itself.
392
- * Players before 0.5.20 refuse the request (the handle is `failed`): declare
393
- * `"minPlayerVersion": "0.5.20"`.
394
- *
395
- * **After an abnormal end** (player 0.6.3): when the previous run of the
396
- * player ended while plugin shaders were drawing (a crash, the process
397
- * being ended, a lost GPU device), the player refuses every non-empty
398
- * list of every plugin with `previous-crash`, its message naming the
399
- * plugins whose shaders were on: one such end keeps them off for the next
400
- * start only; two within a day keep them off until the GPU, its driver or
401
- * the player changes, or for 7 days. Clearing (`[]`, `clear`,
402
- * `dispose`) still works. The player shows one OSD line about it itself;
403
- * the handle is `failed` with `previous-crash` and the SDK does not
404
- * retry it. Do not set the list again in a loop while it is refused, and
405
- * do not show an OSD line of your own for it; a later start of the player
406
- * applies lists again once the guard lets it. Players before 0.6.3 never
407
- * refuse with it.
386
+ * `set` sends the whole list (last write wins); `clear` and `dispose` withdraw
387
+ * it; the player removes a stopped plugin's shaders itself.
388
+ *
389
+ * **After an abnormal end**: when the previous run of the player ended while
390
+ * plugin shaders were drawing (a crash, the process being ended, a lost GPU
391
+ * device), the player refuses every non-empty list of every plugin with
392
+ * `previous-crash`, its message naming the plugins whose shaders were on: one
393
+ * such end keeps them off for the next start only; two within a day keep them
394
+ * off until the GPU, its driver or the player changes, or for 7 days. Clearing
395
+ * (`[]`, `clear`, `dispose`) still works. The player shows one OSD line about
396
+ * it itself; the handle is `failed` with `previous-crash` and the SDK does not
397
+ * retry it. Do not set the list again in a loop while it is refused, and do not
398
+ * show an OSD line of your own for it; a later start of the player applies
399
+ * lists again once the guard lets it.
408
400
  *
409
401
  * @example Add a sharpening shader the plugin ships
410
402
  * The video looks sharper on the GPU renderer; under software rendering
@@ -424,8 +416,8 @@ export interface RenderOptions extends Disposable {
424
416
  * ```
425
417
  *
426
418
  * @capability processing.video
427
- * @player 0.5.20; older players refuse the request.
428
- * @see [Video and audio processing](../../../docs/explanation/processing.md)
419
+ * @player 0.5.20
420
+ * @see [Process video with a shader or a filter](../../../docs/guides/filters.md)
429
421
  * @since 1.5.39
430
422
  * @category Processing
431
423
  */
@@ -436,7 +428,7 @@ export interface VideoShaders extends Disposable {
436
428
  *
437
429
  * @remarks
438
430
  * Never throws: a refused list shows in `status` (`invalid`, `missing`,
439
- * `limit`, `unsupported`, and `previous-crash` from player 0.6.3: see
431
+ * `limit`, `unsupported`, and `previous-crash`: see
440
432
  * the interface's remarks) and goes to {@link Scope.onError}, and what the
441
433
  * player held stays.
442
434
  *
@@ -517,10 +509,10 @@ export interface VideoShaders extends Disposable {
517
509
  onStatus(listener: (status: FilterStatus) => void): Disposable;
518
510
  }
519
511
  /**
520
- * Why the GPU's video upscaler does not work, as a stable kebab-case code.
521
- * A newer player may add codes: compare with the ones you handle and show
522
- * {@link UpscalingReason.message} for the rest. The codes of player 0.5.16,
523
- * in the order the player checks them (the first that holds is reported):
512
+ * Why the GPU's video upscaler does not work, as a stable kebab-case code. A
513
+ * newer player may add codes: compare with the ones you handle and show
514
+ * {@link UpscalingReason.message} for the rest. The codes, in the order the
515
+ * player checks them (the first that holds is reported):
524
516
  *
525
517
  * | Code | Meaning |
526
518
  * | --- | --- |
@@ -590,7 +582,7 @@ export interface UpscalingReason {
590
582
  * that renders it ({@link UpscalingDecodingCause}). Absent with every
591
583
  * other code, and from players before 0.5.25.
592
584
  *
593
- * @player 0.5.25; older players send `decoding` without a cause.
585
+ * @player 0.5.25
594
586
  * @since 1.5.43
595
587
  */
596
588
  readonly cause?: UpscalingDecodingCause;
@@ -610,9 +602,8 @@ export interface UpscalingReason {
610
602
  }
611
603
  /**
612
604
  * Why the video is not decoded on the GPU that renders it: the
613
- * {@link UpscalingReason.cause} of a `decoding` reason (player 0.5.25). A
614
- * newer player may add causes: show {@link UpscalingReason.message} for the
615
- * ones you do not handle.
605
+ * {@link UpscalingReason.cause} of a `decoding` reason. A newer player may add
606
+ * causes: show {@link UpscalingReason.message} for the ones you do not handle.
616
607
  *
617
608
  * | Cause | Meaning |
618
609
  * | --- | --- |
@@ -811,9 +802,6 @@ export interface UpscalingState {
811
802
  * two GPUs the whole player must run on the NVIDIA one.
812
803
  * **macOS, Linux:** `available` is `false` with `platform`.
813
804
  *
814
- * Players before 0.5.16 do not know `video.upscaling` and do not load a
815
- * plugin that declares it: declare `"minPlayerVersion": "0.5.16"`.
816
- *
817
805
  * @example Offer AI upscaling as a menu item
818
806
  * A Video menu item turns upscaling on and off; once the player said it
819
807
  * cannot work here, the item is greyed out with the player's reason. The
@@ -844,8 +832,7 @@ export interface UpscalingState {
844
832
  * ```
845
833
  *
846
834
  * @capability video.upscaling
847
- * @player 0.5.16; older players do not load a plugin that declares
848
- * `video.upscaling`.
835
+ * @player 0.5.16
849
836
  * @since 1.5.37
850
837
  * @category Processing
851
838
  */
@@ -375,7 +375,7 @@ export interface JsonStore<T> extends Disposable {
375
375
  * void queue;
376
376
  * ```
377
377
  *
378
- * @see [Store a plugin's data](../../../docs/how-to/store-data.md), [Remember a window's state between runs](../../../docs/how-to/window-state.md)
378
+ * @see [Store a plugin's data](../../../docs/guides/store-data.md), [Open a tool window and remember its state](../../../docs/guides/windows.md)
379
379
  * @since 1.0.0
380
380
  * @category Services
381
381
  */
@@ -430,24 +430,24 @@ export interface Storage {
430
430
  /**
431
431
  * `plugin.storage.session`: JSON values that live as long as the **player**,
432
432
  * not as long as the plugin's process (like `chrome.storage.session`). No
433
- * capability; needs player 0.5.5 (older players reject the calls with
434
- * `unsupported`).
433
+ * capability.
435
434
  *
436
435
  * `activate` can run more than once in one player session: the player stops
437
436
  * and starts a plugin's process again when the plugin is reloaded (also a
438
437
  * development load with `--plugin`) or upgraded, and after a crash or a
439
- * failed start. A later player may also restart plugins that share a
440
- * process, or stop an idle plugin and start it on its next use. Variables do
441
- * not survive that; keep state that must survive a restart here (or in
442
- * {@link Storage.json | storage.json} when it must also survive the player
443
- * quitting).
438
+ * failed start; the player also restarts plugins that share a process, and
439
+ * stops an idle plugin after 30 s and starts it on its next use. Variables,
440
+ * timers, `fetch` calls, sockets and pending promises do not survive that
441
+ * (nor do they keep the plugin running): keep state that must survive a
442
+ * restart here (or in {@link Storage.json | storage.json} when it must also
443
+ * survive the player quitting) and pick it up again in `activate`.
444
444
  *
445
445
  * | | Values |
446
446
  * | --- | --- |
447
447
  * | The plugin's process restarts: reload, upgrade, crash | kept |
448
448
  * | The plugin failed to start or failed, and starts again | kept |
449
449
  * | The user, or a plugin with `plugins.manage` (`packages.setEnabled(id, false)`), disables the plugin | cleared |
450
- * | An update or reinstall with `enabled: false` switches an enabled plugin off (player 0.6.4) | cleared |
450
+ * | An update or reinstall with `enabled: false` switches an enabled plugin off | cleared |
451
451
  * | The plugin is uninstalled | cleared |
452
452
  * | An earlier installation kept for a later reinstall (after a `replace`) is dropped because the player keeps only so many | cleared |
453
453
  * | The player quits | cleared |
@@ -850,9 +850,9 @@ export type RenderingMode = "gpu" | "software";
850
850
  */
851
851
  export type RenderingPreference = "auto" | "gpu" | "software";
852
852
  /**
853
- * Why the player renders the way it does, as a stable kebab-case code. A
854
- * newer player may add codes: compare with the ones you handle and show
855
- * {@link RenderingReason.message} for the rest. The codes of player 0.5.13:
853
+ * Why the player renders the way it does, as a stable kebab-case code. A newer
854
+ * player may add codes: compare with the ones you handle and show
855
+ * {@link RenderingReason.message} for the rest. The codes:
856
856
  *
857
857
  * | Code | Meaning |
858
858
  * | --- | --- |
@@ -985,11 +985,6 @@ export interface RenderingState {
985
985
  * plugin, so change it only when the user asks. A plugin that only needs
986
986
  * to know whether render options work reads {@link SystemInfo.rendering}.
987
987
  *
988
- * Players before 0.5.13 do not know these requests: `state()` rejects with
989
- * `unsupported`, and they do not load a plugin that declares
990
- * `rendering.manage` (an unknown capability). Declare
991
- * `"minPlayerVersion": "0.5.13"` when the plugin needs this.
992
- *
993
988
  * @example Offer GPU rendering as a menu item
994
989
  * Settings ▸ GPU Rendering (Experimental) carries a check mark while the
995
990
  * next start will draw on the GPU, is greyed out with the player's reason
@@ -1014,9 +1009,8 @@ export interface RenderingState {
1014
1009
  *
1015
1010
  * @capability None to read the state; `rendering.manage` to change the
1016
1011
  * choice or restart the player.
1017
- * @see [Offer a GPU rendering switch](../../../docs/how-to/gpu-rendering.md)
1018
- * @player 0.5.13; older players reject the requests as unknown
1019
- * (`unsupported`).
1012
+ * @see [Offer a GPU rendering switch](../../../docs/guides/gpu-rendering.md)
1013
+ * @player 0.5.13
1020
1014
  * @since 1.5.35
1021
1015
  * @category Services
1022
1016
  */
@@ -1030,11 +1024,10 @@ export interface Rendering {
1030
1024
  * know the request.
1031
1025
  *
1032
1026
  * @example Find out whether the GPU can be chosen
1033
- * The plugin reads the state once while it starts and keeps it for its
1034
- * menu. Each call asks the player; `gpu.available` is false, with a
1035
- * reason, where this player has no GPU renderer, without a user
1036
- * interface, or when the driver is ruled out. An older player rejects
1037
- * with `unsupported`, and the plugin then offers nothing.
1027
+ * The plugin reads the state once while it starts and keeps it for its menu.
1028
+ * Each call asks the player; `gpu.available` is false, with a reason, where
1029
+ * this player has no GPU renderer, without a user interface, or when the
1030
+ * driver is ruled out.
1038
1031
  * ```ts
1039
1032
  * const state = await plugin.rendering.state().catch((error: PluginError) => {
1040
1033
  * if (error.code === "unsupported") return null; // a player before 0.5.13
@@ -73,23 +73,22 @@ export interface Snapshot extends Disposable {
73
73
  * Start exporting; the job runs in the host's offline worker.
74
74
  * One snapshot can be exported several times.
75
75
  *
76
- * A **stream copy** (`format: "copy"`, player 0.7.6) writes the video
77
- * stream and the snapshot's audio track as they are in the file, without
78
- * decoding: lossless and about as fast as the disk, but a copy can only
79
- * begin on a keyframe. It starts at the video's last keyframe at or before
80
- * the snapshot time (its first keyframe when the video itself starts
81
- * later; keyframes an MP4 edit list discards do not count) and is cut at
82
- * `end`, where it may run a few frames past `end`. An open GOP can write
83
- * a frame or two that present before the keyframe; `start` includes them.
84
- * The finished job's `outcome` gives the `start` and `end` actually
85
- * written; a plugin that previews the cut (with `plugin.tools.run`
86
- * and ffprobe's packet flags, say) shows those once the job is done.
87
- * Copies need a raw snapshot (effects and burned-in subtitles need a
88
- * re-encode) and leave subtitle tracks and chapters out. `auto` writes
76
+ * A **stream copy** (`format: "copy"`) writes the video stream and the
77
+ * snapshot's audio track as they are in the file, without decoding: lossless
78
+ * and about as fast as the disk, but a copy can only begin on a keyframe. It
79
+ * starts at the video's last keyframe at or before the snapshot time (its
80
+ * first keyframe when the video itself starts later; keyframes an MP4 edit
81
+ * list discards do not count) and is cut at `end`, where it may run a few
82
+ * frames past `end`. An open GOP can write a frame or two that present before
83
+ * the keyframe; `start` includes them. The finished job's `outcome` gives the
84
+ * `start` and `end` actually written; a plugin that previews the cut (with
85
+ * `plugin.tools.run` and ffprobe's packet flags, say) shows those once the
86
+ * job is done. Copies need a raw snapshot (effects and burned-in subtitles
87
+ * need a re-encode) and leave subtitle tracks and chapters out. `auto` writes
89
88
  * MP4 for H.264, HEVC, AV1 or MPEG-4 video with AAC, MP3, AC-3, E-AC-3 or
90
- * ALAC audio (or none), and MKV for anything else. A copy the player
91
- * cannot make (no video stream, a cover image, an external audio track,
92
- * codecs `mp4` cannot hold) ends `failed` with the code `unsupported`.
89
+ * ALAC audio (or none), and MKV for anything else. A copy the player cannot
90
+ * make (no video stream, a cover image, an external audio track, codecs `mp4`
91
+ * cannot hold) ends `failed` with the code `unsupported`.
93
92
  *
94
93
  * @capability media.read and media.control
95
94
  * @throws `released` (rejects) The snapshot was already released.
@@ -139,10 +138,10 @@ export interface Snapshot extends Disposable {
139
138
  export(options: ExportOptions): Promise<ExportJob>;
140
139
  }
141
140
  /**
142
- * One frame as PNG, JPEG (`quality` 1–100, default 90) or BMP (24-bit), or
143
- * a clip: re-encoded as MP4 (`mp4`, frame-accurate, optional
144
- * {@link ExportEncoding}) or copied without re-encoding (`copy`, player
145
- * 0.7.6, starting on a keyframe).
141
+ * One frame as PNG, JPEG (`quality` 1–100, default 90) or BMP (24-bit), or a
142
+ * clip: re-encoded as MP4 (`mp4`, frame-accurate, optional
143
+ * {@link ExportEncoding}) or copied without re-encoding (`copy`, starting on a
144
+ * keyframe).
146
145
  *
147
146
  * `destination` is never overwritten if it exists. The extension does not
148
147
  * choose the format (a copy's extension is set to its container).
@@ -150,15 +149,6 @@ export interface Snapshot extends Disposable {
150
149
  * clip's end in source seconds. On Windows the export worker needs FFmpeg
151
150
  * 6.1 or newer.
152
151
  *
153
- * **Which players have `copy`, `encoding` and the progress and range of
154
- * a job**: player 0.7.6 and later. Declare `"minPlayerVersion": "0.7.6"`,
155
- * or, to keep older players and offer these only where they exist, compare
156
- * {@link AppInfo.version | plugin.app.version} with `0.7.6`, as for any
157
- * newer API. Do not probe by trying: on an older player the `plugin`
158
- * object comes from that player's own, older SDK, which rejects `copy` with
159
- * `invalid` but builds a re-encode request without the `encoding` it does
160
- * not know, so the clip is encoded with the fixed settings and no error.
161
- *
162
152
  * @since 1.0.0
163
153
  * @category Media
164
154
  */
@@ -186,17 +176,16 @@ export type ExportOptions = {
186
176
  /** Clip end, source seconds. */
187
177
  end: number;
188
178
  /**
189
- * Encoder settings (player 0.7.6); without it, the settings before
190
- * they existed.
179
+ * Encoder settings; without it, the settings before they existed.
191
180
  *
192
181
  * @since 1.6.10
193
182
  */
194
183
  encoding?: ExportEncoding;
195
184
  } | {
196
185
  /**
197
- * A clip copied stream by stream, without re-encoding (player 0.7.6):
198
- * lossless and about as fast as the disk. It starts on the video
199
- * keyframe at or before the snapshot time; see {@link Snapshot.export}.
186
+ * A clip copied stream by stream, without re-encoding: lossless and about
187
+ * as fast as the disk. It starts on the video keyframe at or before the
188
+ * snapshot time; see {@link Snapshot.export}.
200
189
  *
201
190
  * @since 1.6.10
202
191
  */
@@ -216,13 +205,12 @@ export type ExportOptions = {
216
205
  container?: "auto" | "mp4" | "mkv";
217
206
  };
218
207
  /**
219
- * The encoder settings of a re-encoded clip (`format: "mp4"`, player
220
- * 0.7.6): a closed set of values, never encoder arguments. Every field is
221
- * optional; the defaults are the settings clips had before: CRF 18, the
222
- * fastest speed, the source's size and frame rate, AAC 192 kb/s, one thread.
223
- * A value outside its set rejects the export with `invalid`. `videoBitrate:
224
- * "source"` replaces the CRF with the source's bitrate, for a "Same as
225
- * source" preset.
208
+ * The encoder settings of a re-encoded clip (`format: "mp4"`): a closed set of
209
+ * values, never encoder arguments. Every field is optional; the defaults are
210
+ * the settings clips had before: CRF 18, the fastest speed, the source's size
211
+ * and frame rate, AAC 192 kb/s, one thread. A value outside its set rejects the
212
+ * export with `invalid`. `videoBitrate: "source"` replaces the CRF with the
213
+ * source's bitrate, for a "Same as source" preset.
226
214
  *
227
215
  * @example A small file
228
216
  * A 720p, 30 fps clip at a lower quality, encoded with the cores the player
@@ -269,10 +257,10 @@ export interface ExportEncoding {
269
257
  audioBitrate?: 128 | 192 | 256;
270
258
  /**
271
259
  * `single` (default) encodes on one thread, leaving the other cores to
272
- * playback. `auto` lets the player use more: half the logical
273
- * processors, at most 8, so playback and the interface keep their rate.
274
- * From player 0.7.6 every export runs at below-normal priority (as
275
- * HandBrake and OBS run their encoders), with either setting.
260
+ * playback. `auto` lets the player use more: half the logical processors, at
261
+ * most 8, so playback and the interface keep their rate. Every export runs at
262
+ * below-normal priority (as HandBrake and OBS run their encoders), with
263
+ * either setting.
276
264
  */
277
265
  threads?: "single" | "auto";
278
266
  /**
@@ -290,7 +278,7 @@ export interface ExportEncoding {
290
278
  * `{ destination }`, `{ error: { code, message } }` or `{ cancelled: true }`.
291
279
  * `facts` describes what the worker produced (versions, range, streams).
292
280
  *
293
- * From player 0.7.6:
281
+ * In addition:
294
282
  * - a finished clip's `outcome` also has `start` and `end`, the source
295
283
  * times of its first frame and of the end of its last frame as written: a
296
284
  * copy's earliest written frame (its keyframe, or the leading frames of
@@ -27,11 +27,11 @@ export interface WebResolverOptions {
27
27
  resolve(url: string, signal: AbortSignal): Promise<ResolvedMedia>;
28
28
  }
29
29
  /**
30
- * A resolver for local files by extension (SDK 1.5.3, player 0.4.1): when
31
- * anyone opens such a file with {@link Player.open} (the Open dialog, the
32
- * playlist, next / previous, the recent list, a drop that calls `open`),
33
- * the player asks this plugin for a stream it generates instead of
34
- * playing the file. Needs `source.resolve` and `producer.av`.
30
+ * A resolver for local files by extension: when anyone opens such a file with
31
+ * {@link Player.open} (the Open dialog, the playlist, next / previous, the
32
+ * recent list, a drop that calls `open`), the player asks this plugin for a
33
+ * stream it generates instead of playing the file. Needs `source.resolve` and
34
+ * `producer.av`.
35
35
  *
36
36
  * @remarks
37
37
  * The open keeps everything of the original call: its `ifCurrent`, its
@@ -211,7 +211,7 @@ export interface Resolver extends Disposable {
211
211
  * another plugin), so the plugin does not intercept opens itself.
212
212
  *
213
213
  * @capability source.resolve (file resolvers also `producer.av`)
214
- * @see [Playback state, controls and sources](../../../docs/explanation/playback.md)
214
+ * @see [Control playback](../../../docs/guides/control-playback.md)
215
215
  * @since 1.0.0
216
216
  * @category Sources
217
217
  */
@@ -248,11 +248,10 @@ export interface Resolvers {
248
248
  */
249
249
  add(options: ResolverOptions): Resolver;
250
250
  /**
251
- * The extensions some plugin's file resolver handles (SDK 1.5.8, player
252
- * 0.4.2): lower case, without the dot, sorted, each once; not who
253
- * registered them. Reading needs no capability; `[]` from older players.
254
- * Without `events` it is the list from when the plugin first read it.
255
- * Use it to accept such files beside the player's own media types, for
251
+ * The extensions some plugin's file resolver handles: lower case, without the
252
+ * dot, sorted, each once; not who registered them. Reading needs no
253
+ * capability. Without `events` it is the list from when the plugin first read
254
+ * it. Use it to accept such files beside the player's own media types, for
256
255
  * example in a playlist's drop or folder scan.
257
256
  *
258
257
  * @example Accept files that a resolver plugin can play
@@ -275,11 +274,10 @@ export interface Resolvers {
275
274
  readonly fileTypes: readonly string[];
276
275
  /**
277
276
  * {@link Resolvers.fileTypes} changed: a file resolver was added, or its
278
- * plugin stopped. Needs `events`; without it the listener never fires.
279
- * When the player starts a stopped plugin for this change (player
280
- * 0.5.21), {@link Resolvers.fileTypes} already has the new list at start
281
- * and the listener still hears the change (SDK 1.5.56; before, it did not
282
- * run).
277
+ * plugin stopped. Needs `events`; without it the listener never fires. When
278
+ * the player starts a stopped plugin for this change,
279
+ * {@link Resolvers.fileTypes} already has the new list at start and the
280
+ * listener still hears the change.
283
281
  *
284
282
  * @param listener - Receives the new list.
285
283
  * @returns A handle that removes the listener.
@@ -128,7 +128,7 @@ export interface SubtitleConditional {
128
128
  * @capability `subtitles.read` to read; `subtitles.control` and
129
129
  * `subtitles.read` to change; `events` to re-read on source changes.
130
130
  *
131
- * @see [Load subtitles from a plugin](../../../docs/how-to/subtitles.md)
131
+ * @see [Load subtitles from a plugin](../../../docs/guides/subtitles.md)
132
132
  * @since 1.0.0
133
133
  * @category Subtitles
134
134
  */
@@ -214,13 +214,12 @@ export interface Subtitles {
214
214
  role?: "primary" | "secondary";
215
215
  }): Promise<SubtitlesState>;
216
216
  /**
217
- * Upload a subtitle file's bytes (UTF-8 SRT, or ASS/SSA with
218
- * `format: "ass"`) for the current source; select it unless
219
- * `select: "none"`. `title` (1–200 characters) names the track: data, or
220
- * a {@link Text} the player translates (`text("{} · {}", [text("Simplified
221
- * Chinese"), file])`, SDK 1.5.11). Aborting
222
- * `signal` before the commit discards the upload (rejects with AbortError);
223
- * once the commit was sent it completes.
217
+ * Upload a subtitle file's bytes (UTF-8 SRT, or ASS/SSA with `format: "ass"`)
218
+ * for the current source; select it unless `select: "none"`. `title` (1–200
219
+ * characters) names the track: data, or a {@link Text} the player translates
220
+ * (`text("{} · {}", [text("Simplified Chinese"), file])`). Aborting `signal`
221
+ * before the commit discards the upload (rejects with AbortError); once the
222
+ * commit was sent it completes.
224
223
  *
225
224
  * Limits: SRT ≤ 2 MiB and ≤ 10,000 cues; ASS ≤ 2 MiB with `[Script Info]`
226
225
  * and `[Events]` and 1–20,000 `Dialogue:` lines. Convert other formats