@vestra-player/sdk 1.8.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.md +64 -2
  2. package/README.md +2 -2
  3. package/bin/vestra-plugin.mjs +98 -106
  4. package/capability-scan.json +21 -1
  5. package/dist/api-requests.d.ts +15 -39
  6. package/dist/api-requests.js +28 -50
  7. package/dist/capability-scan.d.ts +1 -1
  8. package/dist/capability-scan.js +8 -9
  9. package/dist/condition-table.d.ts +1889 -0
  10. package/dist/condition-table.js +562 -0
  11. package/dist/docs-tree.json.gz +0 -0
  12. package/dist/docs.d.ts +1 -1
  13. package/dist/docs.js +1 -1
  14. package/dist/i18n-tools.d.ts +7 -0
  15. package/dist/i18n-tools.js +66 -3
  16. package/dist/index.d.ts +4 -5
  17. package/dist/manifest.d.ts +5 -0
  18. package/dist/manifest.js +9 -24
  19. package/dist/member-uses.d.ts +61 -0
  20. package/dist/member-uses.js +160 -0
  21. package/dist/player-runtime.d.ts +4 -2
  22. package/dist/player-runtime.js +4 -2
  23. package/dist/plugin/appearance.d.ts +1 -1
  24. package/dist/plugin/appearance.js +2 -2
  25. package/dist/plugin/bindings.d.ts +1 -1
  26. package/dist/plugin/bindings.js +2 -2
  27. package/dist/plugin/commands.js +1 -12
  28. package/dist/plugin/connection.d.ts +38 -8
  29. package/dist/plugin/connection.js +126 -37
  30. package/dist/plugin/drops.js +1 -1
  31. package/dist/plugin/index.d.ts +7 -0
  32. package/dist/plugin/index.js +22 -15
  33. package/dist/plugin/media.js +0 -12
  34. package/dist/plugin/mpv.js +39 -12
  35. package/dist/plugin/packages.js +1 -2
  36. package/dist/plugin/player/events.d.ts +17 -7
  37. package/dist/plugin/player/events.js +26 -9
  38. package/dist/plugin/player.d.ts +37 -13
  39. package/dist/plugin/player.js +133 -22
  40. package/dist/plugin/scope.d.ts +4 -1
  41. package/dist/plugin/scope.js +8 -0
  42. package/dist/plugin/services.d.ts +4 -4
  43. package/dist/plugin/services.js +7 -29
  44. package/dist/plugin/settings.js +1 -1
  45. package/dist/plugin/shaders.js +0 -2
  46. package/dist/plugin/stream.d.ts +2 -1
  47. package/dist/plugin/stream.js +2 -2
  48. package/dist/plugin/testing/commands.d.ts +3 -10
  49. package/dist/plugin/testing/commands.js +24 -37
  50. package/dist/plugin/testing/index.d.ts +133 -116
  51. package/dist/plugin/testing/index.js +198 -125
  52. package/dist/plugin/testing/media.d.ts +6 -0
  53. package/dist/plugin/testing/media.js +15 -2
  54. package/dist/plugin/testing/processing.js +1 -1
  55. package/dist/plugin/testing/services.js +0 -1
  56. package/dist/plugin/testing/source-events.d.ts +28 -0
  57. package/dist/plugin/testing/source-events.js +66 -0
  58. package/dist/plugin/testing/transport.js +5 -0
  59. package/dist/plugin/testing/triggers.d.ts +82 -0
  60. package/dist/plugin/testing/triggers.js +448 -0
  61. package/dist/plugin/timeline.d.ts +5 -6
  62. package/dist/plugin/timeline.js +7 -11
  63. package/dist/plugin/triggers.d.ts +55 -0
  64. package/dist/plugin/triggers.js +233 -0
  65. package/dist/plugin/types/base.d.ts +77 -87
  66. package/dist/plugin/types/commands.d.ts +384 -68
  67. package/dist/plugin/types/packages.d.ts +17 -55
  68. package/dist/plugin/types/playback.d.ts +382 -152
  69. package/dist/plugin/types/plugin-wire.d.ts +6 -36
  70. package/dist/plugin/types/processing.d.ts +10 -49
  71. package/dist/plugin/types/services.d.ts +11 -70
  72. package/dist/plugin/types/snapshots.d.ts +7 -60
  73. package/dist/plugin/types/sources.d.ts +2 -11
  74. package/dist/plugin/types/subtitles.d.ts +5 -26
  75. package/dist/plugin/types/ui-content.d.ts +1 -16
  76. package/dist/plugin/types/ui-layout.d.ts +53 -79
  77. package/dist/plugin/types/ui-locale.d.ts +5 -23
  78. package/dist/plugin/types/ui-shell.d.ts +13 -59
  79. package/dist/plugin/view/layout.js +1 -1
  80. package/dist/plugin/view.js +0 -2
  81. package/dist/plugin/when.d.ts +78 -4
  82. package/dist/plugin/when.js +182 -14
  83. package/dist/plugin/window.d.ts +1 -1
  84. package/dist/plugin/window.js +1 -1
  85. package/dist/plugin/wire-facade.js +1 -2
  86. package/dist/processing.d.ts +2 -3
  87. package/dist/protocol.d.ts +14 -0
  88. package/dist/protocol.js +14 -0
  89. package/dist/request-queue.js +1 -1
  90. package/dist/slint-version.d.ts +7 -0
  91. package/dist/slint-version.js +7 -0
  92. package/dist/subtitles.d.ts +1 -1
  93. package/dist/ts-plugin.d.ts +8 -15
  94. package/dist/ts-plugin.js +3 -141
  95. package/dist/wire.d.ts +22 -12
  96. package/dist/wire.js +17 -8
  97. package/llms.txt +6 -6
  98. package/package.json +1 -2
  99. package/dist/capabilities.d.ts +0 -107
  100. package/dist/capabilities.js +0 -69
  101. package/dist/capability-check.d.ts +0 -176
  102. package/dist/capability-check.js +0 -461
  103. package/dist/capability-rules.d.ts +0 -125
  104. package/dist/capability-rules.js +0 -192
  105. package/dist/host-capabilities.d.ts +0 -10
  106. package/dist/host-capabilities.js +0 -492
@@ -1,192 +0,0 @@
1
- /**
2
- * The capability rule, as data: which manifest capability a request needs
3
- * (the player's table, `HOST_CAPABILITIES`, synced from its
4
- * `src/host/capabilities.json`) and which requests each public member of the
5
- * plugin API sends (`API_REQUESTS`). `CAPABILITY_INFO`, `vestra-plugin check`
6
- * and the TypeScript language-service plugin are all built from these two
7
- * tables, so they and the player cannot disagree.
8
- *
9
- * @internal
10
- */
11
- import { API_REQUESTS, SUBSCRIBED_EVENTS } from "./api-requests.js";
12
- import { HOST_CAPABILITIES } from "./host-capabilities.js";
13
- /** @internal The SDK's rules: the synced player table and `API_REQUESTS`. */
14
- export const RULES = {
15
- host: HOST_CAPABILITIES,
16
- apis: API_REQUESTS,
17
- };
18
- /**
19
- * The player's entry for a method, as the player routes it: the exact name
20
- * first, then the first `prefix.*` entry whose prefix it starts with.
21
- * `undefined`: the player does not know the method.
22
- *
23
- * @internal
24
- */
25
- export function hostMethod(method, host = RULES.host) {
26
- const all = [
27
- ...host.capabilities.flatMap((capability) => capability.methods),
28
- ...host.uncapable,
29
- ];
30
- return (all.find((entry) => entry.name === method) ??
31
- all.find((entry) => entry.name.endsWith(".*") && method.startsWith(entry.name.slice(0, -1))));
32
- }
33
- /**
34
- * The capability one request needs, as the player decides it
35
- * (`capabilities::Route::needs`): `null` for none, `undefined` for a method
36
- * the player does not know.
37
- *
38
- * @param method - The wire method.
39
- * @param params - Its string parameters that a `Needs::Param` rule reads.
40
- * @param declared - Whether the plugin declared a capability.
41
- *
42
- * @internal
43
- */
44
- export function requestNeeds(method, params, declared, host = RULES.host) {
45
- const entry = hostMethod(method, host);
46
- if (!entry)
47
- return undefined;
48
- const needs = entry.needs;
49
- if (needs === null || typeof needs === "string")
50
- return needs;
51
- if ("param" in needs) {
52
- const value = params?.[needs.param];
53
- return value !== undefined && Object.hasOwn(needs.cases, value)
54
- ? needs.cases[value]
55
- : needs.otherwise;
56
- }
57
- return declared(needs.ifDeclared) ? needs.then : needs.otherwise;
58
- }
59
- /**
60
- * Every capability a member of the plugin API needs with the given manifest:
61
- * those its requests need and, through `requires`, those they need in turn.
62
- * `undefined`: the member is not in the table (it needs none).
63
- *
64
- * @param api - The member as `Interface.member` (`Player.seek`).
65
- * @param capabilities - The manifest's capabilities.
66
- *
67
- * @internal
68
- */
69
- export function memberNeeds(api, capabilities, rules = RULES) {
70
- const requests = rules.apis[api];
71
- if (!requests)
72
- return undefined;
73
- return requestsNeed(requests, capabilities, rules);
74
- }
75
- /**
76
- * The requests of a call to a member of `ARGUMENT_APIS`, given the value of its
77
- * first argument and the string fields of its second: a subscribed event's
78
- * `events.subscribe`, nothing for an event that arrives unasked, or the named
79
- * method. `undefined`: a method the player's table does not know (not checked).
80
- *
81
- * @param kind - What the argument names (`ARGUMENT_APIS`).
82
- * @param name - The event or method name.
83
- * @param params - String fields of the second argument (`method` only).
84
- *
85
- * @internal
86
- */
87
- export function argumentRequests(kind, name, params, rules = RULES) {
88
- if (kind === "event")
89
- return SUBSCRIBED_EVENTS.includes(name)
90
- ? [{ method: "events.subscribe", params: { event: name } }]
91
- : [];
92
- if (!hostMethod(name, rules.host))
93
- return undefined;
94
- return [params ? { method: name, params } : { method: name }];
95
- }
96
- /**
97
- * Every capability a list of requests needs with the given manifest (see
98
- * {@link memberNeeds}).
99
- *
100
- * @internal
101
- */
102
- export function requestsNeed(requests, capabilities, rules = RULES) {
103
- // An `ifDeclared` rule is decided last, as if the plugin had declared what
104
- // the member's other requests need: `Player.seek` needs `playback.control`
105
- // for `source.submit`, and with it `source.operation` needs nothing more.
106
- // What a rule answers can change what another rule reads, so the needs are
107
- // worked out again, as if the plugin had declared everything an earlier
108
- // round needed, until no round adds a capability: `media.sources.open`
109
- // asks for `playback.control` until it is declared, then for
110
- // `media.sources` (and `source.operation` follows the first). The set
111
- // only grows, so the rounds end.
112
- const conditional = (request) => {
113
- const rule = hostMethod(request.method, rules.host)?.needs;
114
- return typeof rule === "object" && rule !== null && "ifDeclared" in rule;
115
- };
116
- const ordered = [
117
- ...requests.filter((request) => !conditional(request)),
118
- ...requests.filter(conditional),
119
- ];
120
- const round = (previous) => {
121
- const needs = [];
122
- const declared = (name) => capabilities.includes(name) ||
123
- previous.has(name) ||
124
- needs.some((need) => need.capability === name);
125
- const add = (need) => {
126
- if (needs.some((each) => each.capability === need.capability))
127
- return;
128
- needs.push(need);
129
- const entry = rules.host.capabilities.find((capability) => capability.name === need.capability);
130
- for (const required of entry?.requires ?? [])
131
- add({
132
- capability: required,
133
- method: need.method,
134
- requiredBy: need.capability,
135
- });
136
- };
137
- for (const request of ordered) {
138
- const capability = requestNeeds(request.method, request.params, declared, rules.host);
139
- if (capability)
140
- add({ capability, method: request.method });
141
- }
142
- return needs;
143
- };
144
- // Every capability any round needed; the answer is the last round's needs
145
- // (read with all of them declared) and then any earlier one it left out.
146
- // Each keeps the request of the round that first needed it, the one read
147
- // closest to the manifest: `MediaSources.open` needs `playback.control` for
148
- // `media.sources.open`, not for `source.operation`, which asks for it only
149
- // once it counts as declared.
150
- const all = new Map();
151
- for (;;) {
152
- const needs = round(new Set(all.keys()));
153
- const before = all.size;
154
- for (const need of needs)
155
- if (!all.has(need.capability))
156
- all.set(need.capability, need);
157
- if (all.size === before)
158
- return [
159
- ...needs.map((need) => all.get(need.capability)),
160
- ...[...all.values()].filter((need) => !needs.some((each) => each.capability === need.capability)),
161
- ];
162
- }
163
- }
164
- /**
165
- * `CAPABILITY_INFO` from the tables: the label, highlight and requirements
166
- * from the player's table; the members from `API_REQUESTS` (every member a
167
- * request of which needs the capability, in the table's order; requests
168
- * marked `also` are left out, as they are documented at the member).
169
- *
170
- * @internal
171
- */
172
- export function capabilityInfo(rules = RULES) {
173
- const info = {};
174
- for (const capability of rules.host.capabilities)
175
- info[capability.name] = {
176
- apis: [],
177
- requires: [...capability.requires],
178
- label: capability.label,
179
- risky: capability.risky,
180
- builtinOnly: capability.builtinOnly === true,
181
- };
182
- for (const [api, requests] of Object.entries(rules.apis))
183
- for (const request of requests) {
184
- if (request.also)
185
- continue;
186
- const capability = requestNeeds(request.method, request.params, () => true, rules.host);
187
- const entry = capability ? info[capability] : undefined;
188
- if (entry && !entry.apis.includes(api))
189
- entry.apis.push(api);
190
- }
191
- return info;
192
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * The player's capability table, copied from its `src/host/capabilities.json`
3
- * by `npm run capabilities:sync -- <player repository>`. Do not edit: change
4
- * the player's capability modules, regenerate its JSON and sync again.
5
- *
6
- * @internal
7
- */
8
- import type { HostCapabilities } from "./capability-rules.ts";
9
- /** @internal */
10
- export declare const HOST_CAPABILITIES: HostCapabilities;
@@ -1,492 +0,0 @@
1
- // "then" is a field of the player's IfDeclared rule, not a thenable.
2
- /* oxlint-disable unicorn/no-thenable */
3
- /** @internal */
4
- export const HOST_CAPABILITIES = {
5
- about: "Generated from src/host/src/capabilities/ (VESTRA_UPDATE_CAPABILITIES=1 cargo test capabilities); do not edit. A method's needs: null (none), a capability name, {param, cases, otherwise} (by a string parameter) or {ifDeclared, then, otherwise}. A method name ending in .* covers the prefix's other methods.",
6
- apiVersion: "vestra/1",
7
- capabilities: [
8
- {
9
- builtinOnly: false,
10
- label: "Provide audio and video it generates itself",
11
- methods: [
12
- { name: "producer.prepare", needs: "producer.av" },
13
- { name: "producer.state", needs: "producer.av" },
14
- { name: "producer.release", needs: "producer.av" },
15
- { name: "producer.ack", needs: "producer.av" },
16
- { name: "producer.declareInput", needs: "producer.av" },
17
- { name: "producer.ackInput", needs: "producer.av" },
18
- ],
19
- name: "producer.av",
20
- requires: ["playback.control"],
21
- residency: "live",
22
- risky: false,
23
- },
24
- {
25
- builtinOnly: false,
26
- label: "Read what is playing and the position",
27
- methods: [
28
- { name: "source.state", needs: "playback.read" },
29
- { name: "processing.state", needs: "playback.read" },
30
- { name: "playback.stats", needs: "playback.read" },
31
- { name: "player.chapters", needs: "playback.read" },
32
- { name: "player.audioDevices", needs: "playback.read" },
33
- { name: "timeline.marks", needs: "playback.read" },
34
- ],
35
- name: "playback.read",
36
- requires: [],
37
- residency: "none",
38
- risky: false,
39
- },
40
- {
41
- builtinOnly: false,
42
- label: "Open media, control playback, keep the computer awake",
43
- methods: [
44
- { name: "playback.set", needs: "playback.control" },
45
- { name: "source.submit", needs: "playback.control" },
46
- {
47
- name: "source.operation",
48
- needs: {
49
- ifDeclared: "playback.control",
50
- otherwise: "playback.read",
51
- then: "playback.control",
52
- },
53
- },
54
- { name: "audio.addTrack", needs: "playback.control" },
55
- { name: "audio.selectTrack", needs: "playback.control" },
56
- { name: "player.setLoop", needs: "playback.control" },
57
- { name: "player.setAudioDevice", needs: "playback.control" },
58
- { name: "player.step", needs: "playback.control" },
59
- { name: "player.setStepSeek", needs: "playback.control" },
60
- { name: "power.preventSleep", needs: "playback.control" },
61
- { name: "sequence.set", needs: "playback.control" },
62
- { name: "sequence.step", needs: "playback.control" },
63
- ],
64
- name: "playback.control",
65
- requires: [],
66
- residency: "live",
67
- risky: false,
68
- },
69
- {
70
- builtinOnly: false,
71
- label: "Resolve online video addresses",
72
- methods: [
73
- { name: "sourceResolvers.register", needs: "source.resolve" },
74
- { name: "sourceResolvers.unregister", needs: "source.resolve" },
75
- { name: "sourceResolvers.respond", needs: "source.resolve" },
76
- { name: "sourceResolvers.*", needs: "source.resolve" },
77
- ],
78
- name: "source.resolve",
79
- requires: [],
80
- residency: "recordable",
81
- risky: false,
82
- },
83
- {
84
- builtinOnly: false,
85
- label: "Receive playback changes as they happen",
86
- methods: [
87
- {
88
- name: "events.subscribe",
89
- needs: {
90
- cases: {
91
- "bindings.changed": "bindings.manage",
92
- "commands.keys": "commands",
93
- "packages.changed": null,
94
- "video.upscaling.changed": "video.upscaling",
95
- "video.motion.changed": "video.motion",
96
- },
97
- otherwise: "events",
98
- param: "event",
99
- },
100
- },
101
- {
102
- name: "events.unsubscribe",
103
- needs: {
104
- cases: {
105
- "bindings.changed": "bindings.manage",
106
- "commands.keys": "commands",
107
- "packages.changed": null,
108
- "video.upscaling.changed": "video.upscaling",
109
- "video.motion.changed": "video.motion",
110
- },
111
- otherwise: "events",
112
- param: "event",
113
- },
114
- },
115
- ],
116
- name: "events",
117
- requires: [],
118
- residency: "live",
119
- risky: false,
120
- },
121
- {
122
- builtinOnly: false,
123
- label: "Add menu commands and shortcuts",
124
- methods: [
125
- { name: "commands.register", needs: "commands" },
126
- { name: "commands.update", needs: "commands" },
127
- { name: "commands.unregister", needs: "commands" },
128
- { name: "host.run", needs: "commands" },
129
- { name: "commands.keys", needs: "commands" },
130
- ],
131
- name: "commands",
132
- requires: [],
133
- residency: "recordable",
134
- risky: false,
135
- },
136
- {
137
- builtinOnly: false,
138
- label: "Open tool windows",
139
- methods: [
140
- { name: "ui.open", needs: "ui.window" },
141
- { name: "ui.set", needs: "ui.window" },
142
- { name: "ui.show", needs: "ui.window" },
143
- { name: "ui.close", needs: "ui.window" },
144
- ],
145
- name: "ui.window",
146
- requires: [],
147
- residency: "live",
148
- risky: false,
149
- },
150
- {
151
- builtinOnly: false,
152
- label: "Show panels in the bottom bar, the sidebar or behind the video",
153
- methods: [
154
- { name: "ui.mount", needs: "ui.mount" },
155
- { name: "ui.setMount", needs: "ui.mount" },
156
- { name: "ui.unmount", needs: "ui.mount" },
157
- { name: "ui.interaction", needs: "ui.mount" },
158
- { name: "ui.menu", needs: "ui.mount" },
159
- { name: "layout.state", needs: "ui.mount" },
160
- { name: "layout.set", needs: "ui.mount" },
161
- ],
162
- name: "ui.mount",
163
- requires: [],
164
- residency: "live",
165
- risky: false,
166
- },
167
- {
168
- builtinOnly: false,
169
- label: "Show file pickers and confirmations",
170
- methods: [
171
- { name: "dialogs.open", needs: "ui.dialog" },
172
- { name: "dialogs.confirm", needs: "ui.dialog" },
173
- ],
174
- name: "ui.dialog",
175
- requires: [],
176
- residency: "none",
177
- risky: false,
178
- },
179
- {
180
- builtinOnly: false,
181
- label: "Install, uninstall and disable other plugins",
182
- methods: [{ name: "packages.*", needs: "plugins.manage" }],
183
- name: "plugins.manage",
184
- requires: [],
185
- residency: "none",
186
- risky: true,
187
- },
188
- {
189
- builtinOnly: false,
190
- label: "Process the picture (filters, shaders)",
191
- methods: [
192
- {
193
- name: "processing.replace",
194
- needs: {
195
- cases: { video: "processing.video" },
196
- otherwise: "processing.audio",
197
- param: "stage",
198
- },
199
- },
200
- {
201
- name: "processing.operation",
202
- needs: {
203
- cases: { video: "processing.video" },
204
- otherwise: "processing.audio",
205
- param: "stage",
206
- },
207
- },
208
- { name: "video.view.set", needs: "processing.video" },
209
- { name: "video.view.release", needs: "processing.video" },
210
- { name: "video.render.set", needs: "processing.video" },
211
- { name: "video.render.release", needs: "processing.video" },
212
- { name: "video.shaders.set", needs: "processing.video" },
213
- ],
214
- name: "processing.video",
215
- requires: ["playback.read"],
216
- residency: "live",
217
- risky: false,
218
- },
219
- {
220
- builtinOnly: false,
221
- label: "Process the sound",
222
- methods: [],
223
- name: "processing.audio",
224
- requires: ["playback.read", "events"],
225
- residency: "live",
226
- risky: false,
227
- },
228
- {
229
- builtinOnly: false,
230
- label: "Read subtitles",
231
- methods: [{ name: "subtitles.state", needs: "subtitles.read" }],
232
- name: "subtitles.read",
233
- requires: [],
234
- residency: "none",
235
- risky: false,
236
- },
237
- {
238
- builtinOnly: false,
239
- label: "Load and change subtitles",
240
- methods: [{ name: "subtitles.*", needs: "subtitles.control" }],
241
- name: "subtitles.control",
242
- requires: [],
243
- residency: "live",
244
- risky: false,
245
- },
246
- {
247
- builtinOnly: false,
248
- label: "Take snapshots and export clips",
249
- methods: [
250
- { name: "snapshot.state", needs: "media.read" },
251
- { name: "jobs.state", needs: "media.read" },
252
- { name: "jobs.operation", needs: "media.read" },
253
- ],
254
- name: "media.read",
255
- requires: ["media.control"],
256
- residency: "none",
257
- risky: false,
258
- },
259
- {
260
- builtinOnly: false,
261
- label: "Take snapshots and export clips",
262
- methods: [
263
- { name: "snapshot.*", needs: "media.control" },
264
- { name: "jobs.*", needs: "media.control" },
265
- ],
266
- name: "media.control",
267
- requires: ["media.read"],
268
- residency: "live",
269
- risky: false,
270
- },
271
- {
272
- builtinOnly: false,
273
- label: "Remember videos you add and export from them later",
274
- methods: [
275
- {
276
- name: "media.sources.open",
277
- needs: {
278
- ifDeclared: "playback.control",
279
- otherwise: "playback.control",
280
- then: "media.sources",
281
- },
282
- },
283
- { name: "media.sources.*", needs: "media.sources" },
284
- ],
285
- name: "media.sources",
286
- requires: [],
287
- residency: "none",
288
- risky: false,
289
- },
290
- {
291
- builtinOnly: false,
292
- label: "Show messages on the video",
293
- methods: [
294
- { name: "osd.show", needs: "ui.osd" },
295
- { name: "osd.panel", needs: "ui.osd" },
296
- ],
297
- name: "ui.osd",
298
- requires: [],
299
- residency: "live",
300
- risky: false,
301
- },
302
- {
303
- builtinOnly: false,
304
- label: "Read and write the clipboard",
305
- methods: [
306
- { name: "clipboard.readText", needs: "clipboard" },
307
- { name: "clipboard.writeText", needs: "clipboard" },
308
- { name: "clipboard.writeImage", needs: "clipboard" },
309
- ],
310
- name: "clipboard",
311
- requires: [],
312
- residency: "none",
313
- risky: true,
314
- },
315
- {
316
- builtinOnly: false,
317
- label: "Adjust the main window (size, on top, picture-in-picture)",
318
- methods: [
319
- { name: "window.setVideoArea", needs: "window.control" },
320
- { name: "window.setAlwaysOnTop", needs: "window.control" },
321
- { name: "window.setCursorAutoHide", needs: "window.control" },
322
- { name: "window.setPictureInPicture", needs: "window.control" },
323
- ],
324
- name: "window.control",
325
- requires: [],
326
- residency: "live",
327
- risky: false,
328
- },
329
- {
330
- builtinOnly: false,
331
- label: "Change all shortcuts",
332
- methods: [
333
- { name: "bindings.list", needs: "bindings.manage" },
334
- { name: "bindings.set", needs: "bindings.manage" },
335
- { name: "bindings.reset", needs: "bindings.manage" },
336
- ],
337
- name: "bindings.manage",
338
- requires: [],
339
- residency: "none",
340
- risky: true,
341
- },
342
- {
343
- builtinOnly: false,
344
- label: "Show marks on the progress bar",
345
- methods: [
346
- { name: "timeline.set", needs: "timeline.marks" },
347
- { name: "timeline.setRanges", needs: "timeline.marks" },
348
- ],
349
- name: "timeline.marks",
350
- requires: [],
351
- residency: "live",
352
- risky: false,
353
- },
354
- {
355
- builtinOnly: false,
356
- label: "Receive files dropped on the player",
357
- methods: [
358
- { name: "drops.provide", needs: "ui.drop" },
359
- { name: "drops.withdraw", needs: "ui.drop" },
360
- { name: "drops.listen", needs: "ui.drop" },
361
- ],
362
- name: "ui.drop",
363
- requires: [],
364
- residency: "recordable",
365
- risky: false,
366
- },
367
- {
368
- builtinOnly: false,
369
- label: "Add pages to the Options window",
370
- methods: [{ name: "settings.*", needs: "ui.settings" }],
371
- name: "ui.settings",
372
- requires: [],
373
- residency: "recordable",
374
- risky: false,
375
- },
376
- {
377
- builtinOnly: false,
378
- label: "Change the player's palette",
379
- methods: [
380
- { name: "appearance.set", needs: "ui.theme" },
381
- { name: "appearance.setLanguage", needs: "ui.theme" },
382
- ],
383
- name: "ui.theme",
384
- requires: [],
385
- residency: "none",
386
- risky: false,
387
- },
388
- {
389
- builtinOnly: false,
390
- label: "Store sign-in details in the system keychain",
391
- methods: [
392
- { name: "secrets.get", needs: "secrets" },
393
- { name: "secrets.set", needs: "secrets" },
394
- { name: "secrets.delete", needs: "secrets" },
395
- ],
396
- name: "secrets",
397
- requires: [],
398
- residency: "none",
399
- risky: true,
400
- },
401
- {
402
- builtinOnly: false,
403
- label: "Choose GPU or software rendering and restart the player",
404
- methods: [
405
- { name: "rendering.setPreference", needs: "rendering.manage" },
406
- { name: "rendering.restart", needs: "rendering.manage" },
407
- ],
408
- name: "rendering.manage",
409
- requires: [],
410
- residency: "none",
411
- risky: true,
412
- },
413
- {
414
- builtinOnly: false,
415
- label: "Upscale the video with the GPU's video upscaler",
416
- methods: [
417
- { name: "video.upscaling.state", needs: "video.upscaling" },
418
- { name: "video.upscaling.set", needs: "video.upscaling" },
419
- ],
420
- name: "video.upscaling",
421
- requires: [],
422
- residency: "live",
423
- risky: false,
424
- },
425
- {
426
- builtinOnly: false,
427
- label: "Smooth motion with the GPU's frame-rate converter",
428
- methods: [
429
- { name: "video.motion.state", needs: "video.motion" },
430
- { name: "video.motion.set", needs: "video.motion" },
431
- ],
432
- name: "video.motion",
433
- requires: [],
434
- residency: "live",
435
- risky: false,
436
- },
437
- {
438
- builtinOnly: true,
439
- label: "Run any player or plugin command",
440
- methods: [
441
- { name: "commands.list", needs: "commands.run" },
442
- { name: "commands.run", needs: "commands.run" },
443
- ],
444
- name: "commands.run",
445
- requires: [],
446
- residency: "none",
447
- risky: true,
448
- },
449
- {
450
- builtinOnly: true,
451
- label: "Add the first row of the command palette",
452
- methods: [
453
- { name: "palette.lead.set", needs: "palette.lead" },
454
- { name: "palette.lead.clear", needs: "palette.lead" },
455
- { name: "palette.lead.done", needs: "palette.lead" },
456
- ],
457
- name: "palette.lead",
458
- requires: [],
459
- residency: "recordable",
460
- risky: false,
461
- },
462
- {
463
- builtinOnly: false,
464
- label: "Control the playback engine (mpv) directly: send its commands and change its options",
465
- methods: [
466
- { name: "mpv.command", needs: "mpv" },
467
- { name: "mpv.get", needs: "mpv" },
468
- { name: "mpv.set", needs: "mpv" },
469
- { name: "mpv.observe", needs: "mpv" },
470
- { name: "mpv.unobserve", needs: "mpv" },
471
- ],
472
- name: "mpv",
473
- requires: [],
474
- residency: "live",
475
- risky: true,
476
- },
477
- ],
478
- uncapable: [
479
- { name: "packages.list", needs: null },
480
- { name: "window.state", needs: null },
481
- { name: "system.reveal", needs: null },
482
- { name: "system.openPath", needs: null },
483
- { name: "system.openUrl", needs: null },
484
- { name: "app.system", needs: null },
485
- { name: "ui.markdownScan", needs: null },
486
- { name: "storage.session.get", needs: null },
487
- { name: "storage.session.set", needs: null },
488
- { name: "storage.session.delete", needs: null },
489
- { name: "storage.session.keys", needs: null },
490
- { name: "rendering.state", needs: null },
491
- ],
492
- };