@vestra-player/sdk 1.5.34 → 1.5.36
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 +37 -19
- package/dist/api-requests.js +3 -0
- package/dist/capabilities.d.ts +2 -2
- package/dist/capabilities.js +2 -2
- package/dist/commands.d.ts +4 -1
- package/dist/commands.js +5 -1
- package/dist/host-capabilities.js +12 -0
- package/dist/plugin/scope.d.ts +1 -0
- package/dist/plugin/scope.js +2 -1
- package/dist/plugin/services.d.ts +2 -1
- package/dist/plugin/services.js +22 -2
- package/dist/plugin/testing.d.ts +75 -5
- package/dist/plugin/testing.js +137 -4
- package/dist/plugin/types.d.ts +353 -0
- package/dist/wire.d.ts +29 -0
- package/dist/wire.js +11 -0
- package/llms-full.txt +519 -10
- package/llms.txt +22 -21
- package/package.json +1 -1
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.36: 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; it runs in its own Node.js process. Everything a plugin creates (commands, windows, panels, filters, listeners…) is a handle that is released automatically when the plugin stops. L<n>: a line of llms-full.txt (next to this file), which has every page, declaration and example.
|
|
4
4
|
|
|
5
5
|
**Rules**
|
|
6
6
|
|
|
@@ -33,7 +33,7 @@ my-plugin/
|
|
|
33
33
|
}
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
Fields: `id`, `version`, `apiVersion`, `entry`, `capabilities`, `name`, `author`, `punchline`, `description`, `tags`, `icon`, `readme`, `changelog`, `sourceUrl`, `license`, `minPlayerVersion`; unknown fields and capabilities are rejected. Rules and limits:
|
|
36
|
+
Fields: `id`, `version`, `apiVersion`, `entry`, `capabilities`, `name`, `author`, `punchline`, `description`, `tags`, `icon`, `readme`, `changelog`, `sourceUrl`, `license`, `minPlayerVersion`; unknown fields and capabilities are rejected. Rules and limits: L2628–2697.
|
|
37
37
|
|
|
38
38
|
**main.ts**
|
|
39
39
|
|
|
@@ -76,9 +76,10 @@ export default async function activate(plugin: Plugin) {
|
|
|
76
76
|
- `ui.settings`: Settings.page/show
|
|
77
77
|
- `ui.theme`: Appearance.set/setLanguage
|
|
78
78
|
- `secrets`: Secrets.get/set/delete
|
|
79
|
-
-
|
|
79
|
+
- `rendering.manage`: Rendering.setPreference/restartPlayer
|
|
80
|
+
- No capability: `tools`, `storage`, `system`, `app`, `ui` (images and Markdown), `i18n`, reading window.state, appearance.theme, packages.list and rendering.state. Details: L2698–2757.
|
|
80
81
|
|
|
81
|
-
**Test**: `tests/*.test.ts` with `node:test`, run by `vestra-plugin test`. `startPlugin(activate, { directory: new URL("..", import.meta.url) })` from `@vestra-player/sdk/testing` returns `{ host, stop }`, `host` an in-memory player (TestHost): act (`host.command(id).run()`, `host.press(key)`), `await host.settle()`, assert on `host.osd`, `host.window(id).props`… Guide:
|
|
82
|
+
**Test**: `tests/*.test.ts` with `node:test`, run by `vestra-plugin test`. `startPlugin(activate, { directory: new URL("..", import.meta.url) })` from `@vestra-player/sdk/testing` returns `{ host, stop }`, `host` an in-memory player (TestHost): act (`host.command(id).run()`, `host.press(key)`), `await host.settle()`, assert on `host.osd`, `host.window(id).props`… Guide: L2069–2257; TestHost: L12484.
|
|
82
83
|
|
|
83
84
|
**Command line**
|
|
84
85
|
|
|
@@ -106,39 +107,39 @@ export default async function activate(plugin: Plugin) {
|
|
|
106
107
|
- `limit`: A player-wide limit was reached, a property value is over the limits of PropValue
|
|
107
108
|
- `reserved`: The id is `vestra` or starts with `vestra.`
|
|
108
109
|
- `versionMismatch`: The package needs a newer player
|
|
109
|
-
- Others: PluginError, llms-full.txt
|
|
110
|
+
- Others: PluginError, llms-full.txt L3759.
|
|
110
111
|
|
|
111
112
|
## Reference
|
|
112
113
|
|
|
113
114
|
- [llms-full.txt](https://vestrasys.github.io/vestra-player-sdk/llms-full.txt), also node_modules/@vestra-player/sdk/llms-full.txt; pages: [site](https://vestrasys.github.io/vestra-player-sdk/).
|
|
114
115
|
- Tutorials: Getting started L9–237
|
|
115
116
|
- Concepts: How a plugin runs L238–408; Commands, menus and key bindings L409–520; Playback state, controls and sources L521–666; Video and audio processing L667–745; Windows, panels, settings pages, dialogs and the OSD L746–1034
|
|
116
|
-
- How-to: Control playback L1035–1163; Store a plugin's data L1164–1231; Load subtitles from a plugin L1232–1310; Keep a slider responsive while dragging L1311–1485; Remember a window's state between runs L1486–1615; Translate a plugin
|
|
117
|
-
- Guidelines: Interface guidelines
|
|
118
|
-
- Reference: Manifest
|
|
119
|
-
- [API: @vestra-player/sdk](https://vestrasys.github.io/vestra-player-sdk/modules/_vestra-player_sdk.html):
|
|
120
|
-
- [API: @vestra-player/sdk/testing](https://vestrasys.github.io/vestra-player-sdk/modules/_vestra-player_sdk_testing.html):
|
|
117
|
+
- How-to: Control playback L1035–1163; Store a plugin's data L1164–1231; Load subtitles from a plugin L1232–1310; Keep a slider responsive while dragging L1311–1485; Remember a window's state between runs L1486–1615; Offer a GPU rendering switch L1616–1736; Translate a plugin L1737–1920; Migrate a plugin to English source text L1921–2068; Test a plugin L2069–2257; Publish a plugin L2258–2346; Migrating off package rollback (1.5.16, removed in 1.5.17) L2347–2422
|
|
118
|
+
- Guidelines: Interface guidelines L2423–2530; Menu guidelines L2531–2627
|
|
119
|
+
- Reference: Manifest L2628–2697; Capabilities L2698–2757; Limits L2758–2887; Commands, menus and bindings L2888–3371; Platforms L3372–3401; Theme L3402–3623; Command line L3624–3681
|
|
120
|
+
- [API: @vestra-player/sdk](https://vestrasys.github.io/vestra-player-sdk/modules/_vestra-player_sdk.html): L3682–12168
|
|
121
|
+
- [API: @vestra-player/sdk/testing](https://vestrasys.github.io/vestra-player-sdk/modules/_vestra-player_sdk_testing.html): L12169–14827
|
|
121
122
|
|
|
122
123
|
## API
|
|
123
124
|
|
|
124
125
|
Where each `plugin.<module>` is declared:
|
|
125
126
|
|
|
126
|
-
- Plugin
|
|
127
|
-
- Commands
|
|
127
|
+
- Plugin L4081, Scope L3834, PluginError L3759, Disposable L3697
|
|
128
|
+
- Commands L4478; Windows L5415; Panels L6861; Dialogs L7529; Player L8270; video: VideoFilter L9150, VideoView L9250, RenderOptions L9337; audio: AudioFilter L9195; Subtitles L9484; media: MediaCapture L9888; Resolvers L10118; Packages L10516; Osd L9015; Host L8857; Clipboard L10844; Power L10931; Tools L10990; Storage L11142; System L11341; Secrets L11421; window: MainWindow L7178; App L7358; Rendering L11684; Bindings L10744; Ui L4767; Timeline L7090; Drops L6108; Appearance L6189; I18n L6422; Settings L6705.
|
|
128
129
|
|
|
129
130
|
## Examples
|
|
130
131
|
|
|
131
132
|
Tested plugins in [examples/](https://github.com/vestrasys/vestra-player-sdk/tree/main/examples):
|
|
132
133
|
|
|
133
|
-
- hello: The README Quick start: one menu command and an on-screen message.
|
|
134
|
-
- blur: A tool window with one slider that blurs the playing video.
|
|
135
|
-
- signal-generator: Generates its own video and audio: colour bars and a 1 kHz tone.
|
|
136
|
-
- bookmark: A tool window bound to the playback state: remember the position and jump back to it.
|
|
137
|
-
- panel-menu: A sidebar panel with its own right-click menu.
|
|
138
|
-
- menus: Radio menu items, separator groups and a menu item whose title changes.
|
|
139
|
-
- theme-widgets: A tool window drawn with the player's theme and widgets.
|
|
140
|
-
- markdown: A window that shows a Markdown document.
|
|
141
|
-
- i18n: A plugin in the player's language: English source text, a Chinese translation.
|
|
134
|
+
- hello: The README Quick start: one menu command and an on-screen message. L15262–15351
|
|
135
|
+
- blur: A tool window with one slider that blurs the playing video. L15352–15613
|
|
136
|
+
- signal-generator: Generates its own video and audio: colour bars and a 1 kHz tone. L15614–15946
|
|
137
|
+
- bookmark: A tool window bound to the playback state: remember the position and jump back to it. L15947–16133
|
|
138
|
+
- panel-menu: A sidebar panel with its own right-click menu. L16134–16342
|
|
139
|
+
- menus: Radio menu items, separator groups and a menu item whose title changes. L16343–16502
|
|
140
|
+
- theme-widgets: A tool window drawn with the player's theme and widgets. L16503–16666
|
|
141
|
+
- markdown: A window that shows a Markdown document. L16667–16863
|
|
142
|
+
- i18n: A plugin in the player's language: English source text, a Chinese translation. L16864–17031
|
|
142
143
|
|
|
143
144
|
## Optional
|
|
144
145
|
|