@vestra-player/sdk 1.5.50 → 1.5.52
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.
- package/CHANGELOG.md +17 -0
- package/dist/commands.d.ts +6 -3
- package/dist/commands.js +14 -10
- package/dist/docs-tree.json.gz +0 -0
- package/dist/i18n.js +3 -0
- package/dist/plugin/testing.d.ts +22 -7
- package/dist/plugin/testing.js +23 -7
- package/dist/plugin/types.d.ts +26 -10
- package/dist/plugin/window.js +2 -0
- package/dist/wire.d.ts +2 -0
- package/llms.txt +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.5.52
|
|
4
|
+
|
|
5
|
+
**Who must change: nobody.** Additive: `WindowState` gains `maximized`, `apiVersion` stays `vestra/1`, no new capability. Players before 0.6.3 do not report it and it reads `false` there; a plugin that depends on it sets `"minPlayerVersion": "0.6.3"`. A test that deep-compares the whole `plugin.window.state` now also sees `maximized: false`.
|
|
6
|
+
|
|
7
|
+
- **`plugin.window.state.maximized`** (player 0.6.3): `true` while the main window is maximized, `false` in fullscreen (also when the window was maximized before and is again after leaving it). Changes arrive through `plugin.window.onChange` like the other window facts (with `events` for changes made by the user). A plugin that resizes the window, such as the Window plugin's "Window size when playback starts", leaves a maximized window alone, as MPC-HC and mpv do. The player sends it as `maximized` in the `window.state` reply and event; the SDK reads a missing or non-boolean field as `false`.
|
|
8
|
+
- **`TestHost`**: `host.mainWindow.maximized` (default `false`) and `host.setMainWindow({ maximized: true })`, which broadcasts `window.state` as the player does; like the player, `window.state` reports `false` while fullscreen.
|
|
9
|
+
- _Docs_: `WindowState.maximized`, `MainWindow`, `TestHost.setMainWindow` and [Reference: testing](docs/reference/testing.md#simulating-the-player) describe it.
|
|
10
|
+
|
|
11
|
+
## 1.5.51
|
|
12
|
+
|
|
13
|
+
**Who must change: nobody.** Additive: `MENU_IDS` and `MenuId` gain `reset`, `apiVersion` stays `vestra/1`, no new capability. A plugin that puts a command under `@reset` sets `"minPlayerVersion": "0.6.3"`: older players refuse `@reset` with `invalid` (since SDK 1.5.49 that command is skipped and the rest of the plugin activates).
|
|
14
|
+
|
|
15
|
+
- **A Reset menu for every reset-to-default command** (user ruling, 2026-11-01). `["@reset", "Picture"]` (or the key `["Reset", …]`) puts a command into the player's new built-in top-level menu **Reset**, directly below Settings and in Settings' separator group (order 840, whatever the groups of the items inside). It lists the resets of every plugin in one place, so users do not hunt for them through Video, Audio and Subtitles; like every built-in menu it is shown only once a command is in it, and its title is the player's (复位 in Simplified Chinese).
|
|
16
|
+
- **`BUILTIN_COMMANDS` lists the built-in plugins' resets under Reset**, as player 0.6.3 declares them (command ids and default keys unchanged): `Reset ▸ Subtitle Position` (`move-reset`, Alt+Home), `Reset ▸ Subtitle Sync` (`sync-reset`, /), `Reset ▸ Picture` (`video.reset`, Q), `Reset ▸ Framing` (`video.frame.reset`, Numpad5, Alt+Backspace), `Reset ▸ Crop Position` (`video.reframe.reset`), `Reset ▸ Audio Sync` (`audio.sync.reset`, ?), `Reset ▸ Audio Processing` (`audio.reset`, now the processing only) and `Reset ▸ Idle Logo` (`reset-logo`, was `Settings ▸ Appearance ▸ Restore Default Logo`). `BUILTIN_SUBMENUS` is unchanged: every submenu these left keeps other items. The built-in command table in [Reference: commands](docs/reference/commands.md) follows.
|
|
17
|
+
- **`TestHost`** accepts `@reset`, shows Reset in the player's words (`HOST_ZH_HANS`) and lists it in its refusal of an unknown menu id (`… @settings, @reset`).
|
|
18
|
+
- _Docs_: [Guidelines: menus](docs/guidelines/menus.md#reset) gains **Reset**: put reset-to-default commands under `@reset`, titled by what they reset, without the word Reset ("Picture", "Subtitle Sync"); order and group them by domain; keep the command id when moving one (bindings and the user's keys follow the id); a "Normal"/"Default" radio or clearing user data is not a reset. [Reference: commands](docs/reference/commands.md#built-in-menus) lists `@reset` and the top-level sketch shows it; `CommandOptions.order` gives its fixed order.
|
|
19
|
+
|
|
3
20
|
## 1.5.50
|
|
4
21
|
|
|
5
22
|
**Who must change: tools that read `llms-full.txt`.** It is removed (approved by the maintainer, 2026-11-01): from the package (`@vestra-player/sdk/llms-full.txt`), from the documentation site and from the generators. Read the documentation tree instead: `npx -p @vestra-player/sdk vestra-plugin docs [path]` and `… docs --search <words>`, or `docs(path)` and `searchDocs(query)` from `@vestra-player/sdk/docs` in a program. The player's Workshop vendors the package's `dist/` (the tree is `dist/docs-tree.json.gz`, built with the package; reading it needs nothing else) and must drop its `llms-full.txt` expectation. Plugins need no change: no changes to the plugin API, `apiVersion` stays `vestra/1`, no new capability, no player version needed.
|
package/dist/commands.d.ts
CHANGED
|
@@ -98,8 +98,11 @@ export declare const COMMAND_LIMITS: {
|
|
|
98
98
|
* command into that menu whatever language the player's menus are in. The
|
|
99
99
|
* player stores the menu's title (视频 today); later segments are titles.
|
|
100
100
|
* Needs player 0.3.0 (`"minPlayerVersion": "0.3.0"`); older players show
|
|
101
|
-
* `@video` as a menu of its own.
|
|
102
|
-
*
|
|
101
|
+
* `@video` as a menu of its own. `reset` (SDK 1.5.51) needs player 0.6.3:
|
|
102
|
+
* the Reset menu, directly below Settings, gathers every command that puts
|
|
103
|
+
* something back to its default; older players refuse `@reset` with
|
|
104
|
+
* `invalid`. The player's tests check that this list agrees with the
|
|
105
|
+
* player's.
|
|
103
106
|
*
|
|
104
107
|
* @example Put a command into the built-in Video menu
|
|
105
108
|
* "Blur" appears in the player's Video menu in every interface language.
|
|
@@ -121,7 +124,7 @@ export declare const COMMAND_LIMITS: {
|
|
|
121
124
|
* @since 1.3.0
|
|
122
125
|
* @category Testing
|
|
123
126
|
*/
|
|
124
|
-
export declare const MENU_IDS: readonly ["open", "playback", "subtitles", "video", "audio", "screen", "settings"];
|
|
127
|
+
export declare const MENU_IDS: readonly ["open", "playback", "subtitles", "video", "audio", "screen", "settings", "reset"];
|
|
125
128
|
/**
|
|
126
129
|
* The icons a bottom-bar button may name (`CommandOptions.button.icon`):
|
|
127
130
|
* every icon of the player's V-Line set, `@vestra/icons.slint` (draw one
|
package/dist/commands.js
CHANGED
|
@@ -94,8 +94,11 @@ export const COMMAND_LIMITS = {
|
|
|
94
94
|
* command into that menu whatever language the player's menus are in. The
|
|
95
95
|
* player stores the menu's title (视频 today); later segments are titles.
|
|
96
96
|
* Needs player 0.3.0 (`"minPlayerVersion": "0.3.0"`); older players show
|
|
97
|
-
* `@video` as a menu of its own.
|
|
98
|
-
*
|
|
97
|
+
* `@video` as a menu of its own. `reset` (SDK 1.5.51) needs player 0.6.3:
|
|
98
|
+
* the Reset menu, directly below Settings, gathers every command that puts
|
|
99
|
+
* something back to its default; older players refuse `@reset` with
|
|
100
|
+
* `invalid`. The player's tests check that this list agrees with the
|
|
101
|
+
* player's.
|
|
99
102
|
*
|
|
100
103
|
* @example Put a command into the built-in Video menu
|
|
101
104
|
* "Blur" appears in the player's Video menu in every interface language.
|
|
@@ -125,6 +128,7 @@ export const MENU_IDS = [
|
|
|
125
128
|
"audio",
|
|
126
129
|
"screen",
|
|
127
130
|
"settings",
|
|
131
|
+
"reset",
|
|
128
132
|
];
|
|
129
133
|
/**
|
|
130
134
|
* The icons a bottom-bar button may name (`CommandOptions.button.icon`):
|
|
@@ -402,13 +406,11 @@ vestra.subtitles | size-up | Subtitles ▸ Subtitle Style ▸ Size + | Alt+PageU
|
|
|
402
406
|
vestra.subtitles | size-down | Subtitles ▸ Subtitle Style ▸ Size − | Alt+PageDown
|
|
403
407
|
vestra.subtitles | move-up | Subtitles ▸ Subtitle Style ▸ Move Up
|
|
404
408
|
vestra.subtitles | move-down | Subtitles ▸ Subtitle Style ▸ Move Down
|
|
405
|
-
vestra.subtitles | move-reset | Subtitles ▸ Subtitle Style ▸ Reset Position | Alt+Home
|
|
406
409
|
vestra.subtitles | shadow | Subtitles ▸ Subtitle Style ▸ Shadow
|
|
407
410
|
vestra.subtitles | box | Subtitles ▸ Subtitle Style ▸ Opaque Box
|
|
408
411
|
vestra.subtitles | ass-original | Subtitles ▸ Original ASS/SSA Styles
|
|
409
412
|
vestra.subtitles | sync-earlier | Subtitles ▸ Sync ▸ Earlier 0.5 s | .
|
|
410
413
|
vestra.subtitles | sync-later | Subtitles ▸ Sync ▸ Later 0.5 s | ,
|
|
411
|
-
vestra.subtitles | sync-reset | Subtitles ▸ Sync ▸ Reset | /
|
|
412
414
|
vestra.subtitles | sync-input | Subtitles ▸ Sync ▸ Adjust Sync…
|
|
413
415
|
vestra.subtitle-online | search | Subtitles ▸ Online Subtitles ▸ Search and Download Subtitles…
|
|
414
416
|
vestra.subtitle-online | settings | Subtitles ▸ Online Subtitles ▸ Online Subtitle Settings…
|
|
@@ -458,12 +460,10 @@ vestra.video | video.reframe.crop.1 | Video ▸ Crop/Stretch ▸ Crop to 16:9
|
|
|
458
460
|
vestra.video | video.reframe.crop.2 | Video ▸ Crop/Stretch ▸ Crop to 16:10
|
|
459
461
|
vestra.video | video.reframe.crop.3 | Video ▸ Crop/Stretch ▸ Crop to 1.85:1
|
|
460
462
|
vestra.video | video.reframe.crop.4 | Video ▸ Crop/Stretch ▸ Crop to 2.35:1
|
|
461
|
-
vestra.video | video.reframe.reset | Video ▸ Crop/Stretch ▸ Reset Position
|
|
462
463
|
vestra.video | video.reframe.left | Video ▸ Crop/Stretch ▸ Move Left
|
|
463
464
|
vestra.video | video.reframe.right | Video ▸ Crop/Stretch ▸ Move Right
|
|
464
465
|
vestra.video | video.reframe.up | Video ▸ Crop/Stretch ▸ Move Up
|
|
465
466
|
vestra.video | video.reframe.down | Video ▸ Crop/Stretch ▸ Move Down
|
|
466
|
-
vestra.video | video.frame.reset | Video ▸ Framing ▸ Reset Framing | Numpad5, Alt+Backspace
|
|
467
467
|
vestra.video | video.frame.zoom-in | Video ▸ Framing ▸ Zoom In | Numpad9, Alt+Plus
|
|
468
468
|
vestra.video | video.frame.zoom-out | Video ▸ Framing ▸ Zoom Out | Numpad1, Alt+-
|
|
469
469
|
vestra.video | video.frame.right | Video ▸ Framing ▸ Pan → | Ctrl+Numpad6, Alt+ArrowRight
|
|
@@ -505,7 +505,6 @@ vestra.capture | capture.settings | Video ▸ Snapshot ▸ Snapshot Settings…
|
|
|
505
505
|
vestra.capture | capture.folder | Video ▸ Snapshot ▸ Snapshot Folder…
|
|
506
506
|
vestra.capture | capture.openFolder | Video ▸ Snapshot ▸ Open Snapshot Folder
|
|
507
507
|
vestra.video | video.picture | Video ▸ Picture Adjustments…
|
|
508
|
-
vestra.video | video.reset | Video ▸ Reset | Q
|
|
509
508
|
vestra.video | video.brightness.down | Video ▸ Brightness -1% | W
|
|
510
509
|
vestra.video | video.brightness.up | Video ▸ Brightness +1% | E
|
|
511
510
|
vestra.video | video.contrast.down | Video ▸ Contrast -1% | R
|
|
@@ -534,13 +533,11 @@ vestra.audio | audio.preset.2 | Audio ▸ Preset ▸ Music
|
|
|
534
533
|
vestra.audio | audio.preset.3 | Audio ▸ Preset ▸ Cinema
|
|
535
534
|
vestra.audio | audio.sync.earlier | Audio ▸ Audio Sync ▸ 50 ms Earlier | >
|
|
536
535
|
vestra.audio | audio.sync.later | Audio ▸ Audio Sync ▸ 50 ms Later | <
|
|
537
|
-
vestra.audio | audio.sync.reset | Audio ▸ Audio Sync ▸ Reset | ?
|
|
538
536
|
vestra.audio | audio.sync.keep.none | Audio ▸ Audio Sync ▸ Don't Keep
|
|
539
537
|
vestra.audio | audio.sync.keep.session | Audio ▸ Audio Sync ▸ Keep for This Run
|
|
540
538
|
vestra.audio | audio.sync.keep.always | Audio ▸ Audio Sync ▸ Always Keep
|
|
541
539
|
vestra.audio | audio.normalize | Audio ▸ Processing ▸ Normalize | Shift+N
|
|
542
540
|
vestra.audio | audio.clarity | Audio ▸ Processing ▸ Crystalizer | Shift+C
|
|
543
|
-
vestra.audio | audio.reset | Audio ▸ Reset
|
|
544
541
|
vestra.visualizer | audio-cover | Audio ▸ Show Album Cover for Audio Only
|
|
545
542
|
host | fullscreen | Toggle Fullscreen | Escape
|
|
546
543
|
vestra.window | pip | Screen ▸ Picture-in-Picture
|
|
@@ -575,7 +572,6 @@ vestra.preferences | theme.vestra | Settings ▸ Appearance ▸ Vestra Dark
|
|
|
575
572
|
vestra.preferences | theme.vestra-light | Settings ▸ Appearance ▸ Vestra Light
|
|
576
573
|
vestra.visualizer | idle-logo | Settings ▸ Appearance ▸ Show Logo When Idle
|
|
577
574
|
vestra.visualizer | choose-logo | Settings ▸ Appearance ▸ Choose Logo Image…
|
|
578
|
-
vestra.visualizer | reset-logo | Settings ▸ Appearance ▸ Restore Default Logo
|
|
579
575
|
vestra.preferences | language.system | Settings ▸ Language ▸ Follow System
|
|
580
576
|
vestra.preferences | language.en | Settings ▸ Language ▸ English
|
|
581
577
|
vestra.preferences | language.zh-Hans | Settings ▸ Language ▸ 简体中文
|
|
@@ -584,6 +580,14 @@ vestra.preferences | language.ko | Settings ▸ Language ▸ 한국어
|
|
|
584
580
|
vestra.preferences | language.de | Settings ▸ Language ▸ Deutsch
|
|
585
581
|
vestra.preferences | language.fr | Settings ▸ Language ▸ Français
|
|
586
582
|
vestra.preferences | language.es | Settings ▸ Language ▸ Español
|
|
583
|
+
vestra.subtitles | move-reset | Reset ▸ Subtitle Position | Alt+Home
|
|
584
|
+
vestra.subtitles | sync-reset | Reset ▸ Subtitle Sync | /
|
|
585
|
+
vestra.video | video.reset | Reset ▸ Picture | Q
|
|
586
|
+
vestra.video | video.frame.reset | Reset ▸ Framing | Numpad5, Alt+Backspace
|
|
587
|
+
vestra.video | video.reframe.reset | Reset ▸ Crop Position
|
|
588
|
+
vestra.audio | audio.sync.reset | Reset ▸ Audio Sync | ?
|
|
589
|
+
vestra.audio | audio.reset | Reset ▸ Audio Processing
|
|
590
|
+
vestra.visualizer | reset-logo | Reset ▸ Idle Logo
|
|
587
591
|
vestra.info | info.about | About Vestra Player… | F1
|
|
588
592
|
host | quit | Quit | Cmd+Q
|
|
589
593
|
host | enter-fullscreen | (Enter Fullscreen)
|
package/dist/docs-tree.json.gz
CHANGED
|
Binary file
|
package/dist/i18n.js
CHANGED
|
@@ -846,6 +846,7 @@ export const MENU_KEYS = {
|
|
|
846
846
|
audio: "Audio",
|
|
847
847
|
screen: "Screen",
|
|
848
848
|
settings: "Settings",
|
|
849
|
+
reset: "Reset",
|
|
849
850
|
};
|
|
850
851
|
/** The player's old Chinese titles of its own menus: parent, title, key. */
|
|
851
852
|
const LEGACY_MENUS = [
|
|
@@ -870,6 +871,7 @@ export const HOST_GROUPS = [
|
|
|
870
871
|
"Audio",
|
|
871
872
|
"Screen",
|
|
872
873
|
"Settings",
|
|
874
|
+
"Reset",
|
|
873
875
|
"Playback/Speed",
|
|
874
876
|
"Playback/Seek",
|
|
875
877
|
];
|
|
@@ -906,6 +908,7 @@ export const HOST_ZH_HANS = {
|
|
|
906
908
|
Audio: "声音",
|
|
907
909
|
Screen: "屏幕",
|
|
908
910
|
Settings: "设置",
|
|
911
|
+
Reset: "复位",
|
|
909
912
|
Speed: "速度",
|
|
910
913
|
Seek: "跳转",
|
|
911
914
|
Close: "关闭",
|
package/dist/plugin/testing.d.ts
CHANGED
|
@@ -1664,14 +1664,22 @@ export declare class TestHost implements Transport {
|
|
|
1664
1664
|
readonly confirms: Record<string, Json>[];
|
|
1665
1665
|
/**
|
|
1666
1666
|
* The main window as the player would show it. Change it with
|
|
1667
|
-
* `setMainWindow` (the user resized it, entered fullscreen,
|
|
1668
|
-
* picture-in-picture window); `onTop`, `cursorAutoHide` and
|
|
1667
|
+
* `setMainWindow` (the user resized or maximized it, entered fullscreen,
|
|
1668
|
+
* closed the picture-in-picture window); `onTop`, `cursorAutoHide` and
|
|
1669
1669
|
* `pictureInPicture.active` record the plugin's `window.set…` calls.
|
|
1670
1670
|
* `pictureInPicture.supported: false` stands for Windows and Linux.
|
|
1671
1671
|
*/
|
|
1672
1672
|
readonly mainWindow: {
|
|
1673
1673
|
/** Whether the main window is fullscreen. */
|
|
1674
1674
|
fullscreen: boolean;
|
|
1675
|
+
/**
|
|
1676
|
+
* Whether the main window is maximized (default `false`). Like the
|
|
1677
|
+
* player, `window.state` reports `false` while fullscreen and this
|
|
1678
|
+
* value again after leaving it.
|
|
1679
|
+
*
|
|
1680
|
+
* @since 1.5.52
|
|
1681
|
+
*/
|
|
1682
|
+
maximized: boolean;
|
|
1675
1683
|
/** The video area in logical points (default 780×609). */
|
|
1676
1684
|
videoArea: {
|
|
1677
1685
|
/** Width in logical points. */
|
|
@@ -2168,15 +2176,17 @@ export declare class TestHost implements Transport {
|
|
|
2168
2176
|
*/
|
|
2169
2177
|
setSource(patch: Partial<SourceState>): void;
|
|
2170
2178
|
/**
|
|
2171
|
-
* Simulate the user changing the main window (resizing
|
|
2172
|
-
* leaving fullscreen, closing the
|
|
2173
|
-
*
|
|
2179
|
+
* Simulate the user changing the main window (resizing, maximizing or
|
|
2180
|
+
* restoring it, entering or leaving fullscreen, closing the
|
|
2181
|
+
* picture-in-picture window) and broadcast it. `maximized` (SDK 1.5.52)
|
|
2182
|
+
* reads `false` while fullscreen, as player 0.6.3 reports it. Like the player, entering fullscreen collapses an attached, visible
|
|
2174
2183
|
* sidebar (`effective: false`, `reason: "fullscreen"`) and leaving
|
|
2175
2184
|
* fullscreen docks it again.
|
|
2176
2185
|
*
|
|
2177
|
-
* @example Go fullscreen,
|
|
2186
|
+
* @example Go fullscreen, report picture-in-picture support, maximize
|
|
2178
2187
|
* The plugin sees the main window fullscreen at 1920×1080, then learns
|
|
2179
|
-
* that picture-in-picture is available
|
|
2188
|
+
* that picture-in-picture is available, then sees the window leave
|
|
2189
|
+
* fullscreen maximized. `setMainWindow` changes the
|
|
2180
2190
|
* host's window facts and broadcasts them as the player does when the
|
|
2181
2191
|
* user resizes or toggles fullscreen; entering fullscreen also collapses
|
|
2182
2192
|
* an attached sidebar.
|
|
@@ -2188,6 +2198,10 @@ export declare class TestHost implements Transport {
|
|
|
2188
2198
|
* await host.settle();
|
|
2189
2199
|
* assert.equal(plugin.window.state.fullscreen, true);
|
|
2190
2200
|
* host.setMainWindow({ pictureInPicture: { supported: true, active: false } });
|
|
2201
|
+
* // Leaving fullscreen into a maximized window: `maximized` reads true again.
|
|
2202
|
+
* host.setMainWindow({ fullscreen: false, maximized: true });
|
|
2203
|
+
* await host.settle();
|
|
2204
|
+
* assert.equal(plugin.window.state.maximized, true);
|
|
2191
2205
|
* ```
|
|
2192
2206
|
*
|
|
2193
2207
|
* @capability None.
|
|
@@ -2195,6 +2209,7 @@ export declare class TestHost implements Transport {
|
|
|
2195
2209
|
*/
|
|
2196
2210
|
setMainWindow(patch: Partial<{
|
|
2197
2211
|
fullscreen: boolean;
|
|
2212
|
+
maximized: boolean;
|
|
2198
2213
|
videoArea: {
|
|
2199
2214
|
width: number;
|
|
2200
2215
|
height: number;
|
package/dist/plugin/testing.js
CHANGED
|
@@ -1794,14 +1794,22 @@ export class TestHost {
|
|
|
1794
1794
|
confirms = [];
|
|
1795
1795
|
/**
|
|
1796
1796
|
* The main window as the player would show it. Change it with
|
|
1797
|
-
* `setMainWindow` (the user resized it, entered fullscreen,
|
|
1798
|
-
* picture-in-picture window); `onTop`, `cursorAutoHide` and
|
|
1797
|
+
* `setMainWindow` (the user resized or maximized it, entered fullscreen,
|
|
1798
|
+
* closed the picture-in-picture window); `onTop`, `cursorAutoHide` and
|
|
1799
1799
|
* `pictureInPicture.active` record the plugin's `window.set…` calls.
|
|
1800
1800
|
* `pictureInPicture.supported: false` stands for Windows and Linux.
|
|
1801
1801
|
*/
|
|
1802
1802
|
mainWindow = {
|
|
1803
1803
|
/** Whether the main window is fullscreen. */
|
|
1804
1804
|
fullscreen: false,
|
|
1805
|
+
/**
|
|
1806
|
+
* Whether the main window is maximized (default `false`). Like the
|
|
1807
|
+
* player, `window.state` reports `false` while fullscreen and this
|
|
1808
|
+
* value again after leaving it.
|
|
1809
|
+
*
|
|
1810
|
+
* @since 1.5.52
|
|
1811
|
+
*/
|
|
1812
|
+
maximized: false,
|
|
1805
1813
|
/** The video area in logical points (default 780×609). */
|
|
1806
1814
|
videoArea: {
|
|
1807
1815
|
/** Width in logical points. */
|
|
@@ -2745,15 +2753,17 @@ export class TestHost {
|
|
|
2745
2753
|
this.setBackdropEffective(true);
|
|
2746
2754
|
}
|
|
2747
2755
|
/**
|
|
2748
|
-
* Simulate the user changing the main window (resizing
|
|
2749
|
-
* leaving fullscreen, closing the
|
|
2750
|
-
*
|
|
2756
|
+
* Simulate the user changing the main window (resizing, maximizing or
|
|
2757
|
+
* restoring it, entering or leaving fullscreen, closing the
|
|
2758
|
+
* picture-in-picture window) and broadcast it. `maximized` (SDK 1.5.52)
|
|
2759
|
+
* reads `false` while fullscreen, as player 0.6.3 reports it. Like the player, entering fullscreen collapses an attached, visible
|
|
2751
2760
|
* sidebar (`effective: false`, `reason: "fullscreen"`) and leaving
|
|
2752
2761
|
* fullscreen docks it again.
|
|
2753
2762
|
*
|
|
2754
|
-
* @example Go fullscreen,
|
|
2763
|
+
* @example Go fullscreen, report picture-in-picture support, maximize
|
|
2755
2764
|
* The plugin sees the main window fullscreen at 1920×1080, then learns
|
|
2756
|
-
* that picture-in-picture is available
|
|
2765
|
+
* that picture-in-picture is available, then sees the window leave
|
|
2766
|
+
* fullscreen maximized. `setMainWindow` changes the
|
|
2757
2767
|
* host's window facts and broadcasts them as the player does when the
|
|
2758
2768
|
* user resizes or toggles fullscreen; entering fullscreen also collapses
|
|
2759
2769
|
* an attached sidebar.
|
|
@@ -2765,6 +2775,10 @@ export class TestHost {
|
|
|
2765
2775
|
* await host.settle();
|
|
2766
2776
|
* assert.equal(plugin.window.state.fullscreen, true);
|
|
2767
2777
|
* host.setMainWindow({ pictureInPicture: { supported: true, active: false } });
|
|
2778
|
+
* // Leaving fullscreen into a maximized window: `maximized` reads true again.
|
|
2779
|
+
* host.setMainWindow({ fullscreen: false, maximized: true });
|
|
2780
|
+
* await host.settle();
|
|
2781
|
+
* assert.equal(plugin.window.state.maximized, true);
|
|
2768
2782
|
* ```
|
|
2769
2783
|
*
|
|
2770
2784
|
* @capability None.
|
|
@@ -2815,6 +2829,8 @@ export class TestHost {
|
|
|
2815
2829
|
#windowFacts() {
|
|
2816
2830
|
return {
|
|
2817
2831
|
fullscreen: this.mainWindow.fullscreen,
|
|
2832
|
+
// Like player 0.6.3: never maximized while fullscreen.
|
|
2833
|
+
maximized: this.mainWindow.maximized && !this.mainWindow.fullscreen,
|
|
2818
2834
|
videoArea: { ...this.mainWindow.videoArea },
|
|
2819
2835
|
pictureInPicture: { ...this.mainWindow.pictureInPicture },
|
|
2820
2836
|
appearance: this.appearance,
|
package/dist/plugin/types.d.ts
CHANGED
|
@@ -807,13 +807,15 @@ export interface When {
|
|
|
807
807
|
/**
|
|
808
808
|
* A built-in top-level menu of the player, named in a command path as
|
|
809
809
|
* `@<id>` or by its English key (see {@link CommandOptions.path}): Open,
|
|
810
|
-
* Playback, Subtitles, Video, Audio, Screen, Settings. The list is
|
|
811
|
-
* `MENU_IDS` in `@vestra-player/sdk/testing`.
|
|
810
|
+
* Playback, Subtitles, Video, Audio, Screen, Settings, Reset. The list is
|
|
811
|
+
* `MENU_IDS` in `@vestra-player/sdk/testing`. Reset (`@reset`, SDK 1.5.51,
|
|
812
|
+
* player 0.6.3) gathers every command that puts something back to its
|
|
813
|
+
* default; older players refuse `@reset` with `invalid`.
|
|
812
814
|
*
|
|
813
815
|
* @since 1.3.0
|
|
814
816
|
* @category Commands
|
|
815
817
|
*/
|
|
816
|
-
export type MenuId = "open" | "playback" | "subtitles" | "video" | "audio" | "screen" | "settings";
|
|
818
|
+
export type MenuId = "open" | "playback" | "subtitles" | "video" | "audio" | "screen" | "settings" | "reset";
|
|
817
819
|
/**
|
|
818
820
|
* An icon of the player's V-Line set (`@vestra/icons.slint`), by name: what
|
|
819
821
|
* a bottom-bar button may show. The list is `BAR_BUTTON_ICONS` in
|
|
@@ -904,10 +906,12 @@ export interface CommandButton {
|
|
|
904
906
|
* ranges: `open` 100–199, `domain` 200–699 (playback, subtitles, video,
|
|
905
907
|
* audio…), `screen` 700–799, `windows` 800–899, `exit` 900–999.
|
|
906
908
|
*
|
|
907
|
-
* Built-in menus keep their place. The
|
|
909
|
+
* Built-in menus keep their place. The built-in top-level menus
|
|
908
910
|
* ({@link MenuId}) sit at fixed orders, whatever is inside them: Open 110,
|
|
909
911
|
* Playback 200, Subtitles 300, Video 400, Audio 500, Screen 710, Settings
|
|
910
|
-
* 830 (player 0.3.0)
|
|
912
|
+
* 830 (player 0.3.0), Reset 840 (player 0.6.3; directly below Settings and
|
|
913
|
+
* in its separator group). Like every built-in menu, Reset shows only when
|
|
914
|
+
* a command is in it. This holds whether the path names the menu by id
|
|
911
915
|
* (`["@video", "Blur"]`) or by its key (`["Video", "Blur"]`), so a plugin's
|
|
912
916
|
* item never moves the player's menu. Directly inside a built-in menu,
|
|
913
917
|
* `order` 0 (the default) sorts after every other order: an item without
|
|
@@ -943,11 +947,11 @@ export interface CommandOptions {
|
|
|
943
947
|
* The player shows each segment and the title in the interface language
|
|
944
948
|
* from the declaring plugin's catalog (`locales/<lang>.po`, see the
|
|
945
949
|
* [i18n guide](../../docs/how-to/i18n.md)); the player's own menus
|
|
946
|
-
* (Open, Playback, Subtitles, Video, Audio, Screen, Settings, and
|
|
950
|
+
* (Open, Playback, Subtitles, Video, Audio, Screen, Settings, Reset, and
|
|
947
951
|
* Playback ▸ Speed, Playback ▸ Seek) always show the player's words.
|
|
948
952
|
* A built-in menu can also be named by its id, `@` plus a {@link MenuId}:
|
|
949
|
-
* `@open`, `@playback`, `@subtitles`, `@video`, `@audio`, `@screen
|
|
950
|
-
* `@settings
|
|
953
|
+
* `@open`, `@playback`, `@subtitles`, `@video`, `@audio`, `@screen`,
|
|
954
|
+
* `@settings` or `@reset` (player 0.6.3). Only the first segment is read as an id; an unknown id, or
|
|
951
955
|
* an id with nothing after it, fails with `invalid`. Players up to 0.4.2
|
|
952
956
|
* titled their menus in Chinese (视频…): there `["Video", "Blur"]` is a
|
|
953
957
|
* menu of its own, so plugins for those players write `@video`; player
|
|
@@ -4037,6 +4041,18 @@ export interface Timeline {
|
|
|
4037
4041
|
export interface WindowState {
|
|
4038
4042
|
/** The main window is fullscreen. */
|
|
4039
4043
|
readonly fullscreen: boolean;
|
|
4044
|
+
/**
|
|
4045
|
+
* The main window is maximized (`false` in fullscreen, also when it was
|
|
4046
|
+
* maximized before and will be again after). Changes reach
|
|
4047
|
+
* {@link MainWindow.onChange}. A plugin that sizes the window, such as to
|
|
4048
|
+
* the video when playback starts, leaves a maximized window alone, as
|
|
4049
|
+
* MPC-HC and mpv do. Always `false` with players before 0.6.3, which do
|
|
4050
|
+
* not report it.
|
|
4051
|
+
*
|
|
4052
|
+
* @player 0.6.3; older players: always `false`.
|
|
4053
|
+
* @since 1.5.52
|
|
4054
|
+
*/
|
|
4055
|
+
readonly maximized: boolean;
|
|
4040
4056
|
/** The video column, without the bottom bar, sidebar and splitter. */
|
|
4041
4057
|
readonly videoArea: {
|
|
4042
4058
|
/** Logical points. */
|
|
@@ -4085,8 +4101,8 @@ export interface WindowState {
|
|
|
4085
4101
|
* ```
|
|
4086
4102
|
*
|
|
4087
4103
|
* @remarks
|
|
4088
|
-
* `plugin.window` is the player's main window: its size,
|
|
4089
|
-
* picture-in-picture and the video area. Reading it needs no capability;
|
|
4104
|
+
* `plugin.window` is the player's main window: its size, whether it is
|
|
4105
|
+
* maximized or fullscreen, picture-in-picture and the video area. Reading it needs no capability;
|
|
4090
4106
|
* changing it needs `window.control`. Changes that last only while the
|
|
4091
4107
|
* plugin runs (always on top, pointer auto-hide) revert when it stops.
|
|
4092
4108
|
*
|
package/dist/plugin/window.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import { failure } from "./runtime.js";
|
|
3
3
|
const view = (facts) => Object.freeze({
|
|
4
4
|
fullscreen: facts.fullscreen === true,
|
|
5
|
+
// Players before 0.6.3 do not send it; never maximized in fullscreen.
|
|
6
|
+
maximized: facts.maximized === true && facts.fullscreen !== true,
|
|
5
7
|
videoArea: Object.freeze({
|
|
6
8
|
width: Number(facts.videoArea?.width ?? 0),
|
|
7
9
|
height: Number(facts.videoArea?.height ?? 0),
|
package/dist/wire.d.ts
CHANGED
|
@@ -233,6 +233,8 @@ export interface BindingTable {
|
|
|
233
233
|
/** `window.state`: the main window, in logical points (zero without one). */
|
|
234
234
|
export interface WindowFacts {
|
|
235
235
|
fullscreen: boolean;
|
|
236
|
+
/** The main window is maximized, `false` in fullscreen (player 0.6.3; absent from older players: `false`). */
|
|
237
|
+
maximized?: boolean;
|
|
236
238
|
videoArea: {
|
|
237
239
|
width: number;
|
|
238
240
|
height: number;
|
package/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Vestra Player SDK
|
|
2
2
|
|
|
3
|
-
> @vestra-player/sdk 1.5.
|
|
3
|
+
> @vestra-player/sdk 1.5.52: write plugins for Vestra Player in TypeScript (plugin API `vestra/1`). A plugin is a folder with `manifest.json` and an entry module whose default export `activate(plugin)` the player calls. The documentation is a tree of short pages read by path, like `go doc`: the same pages and API as https://vestrasys.github.io/vestra-player-sdk/.
|
|
4
4
|
|
|
5
5
|
## Read the documentation
|
|
6
6
|
|