The Vestra Player plugin API (apiVersion: "vestra/1"), types only.
A plugin's entry module default-exports activate. The player creates
the Plugin object and passes it in; a plugin never imports SDK
code at run time (a built plugin contains only its own code, and
vestra-plugin build fails on a runtime import of this package), so
import with import type.
Start with Plugin and Scope: every module
(plugin.commands, plugin.player, plugin.windows…) hangs off them.
Errors are described at
PluginError. Tests use @vestra-player/sdk/testing.
Example: Add a menu item that shows a message
The player gets a Tools ▸ Hello menu item; picking it shows "Hello" on
the video. The player imports the entry module and calls activate with
the plugin's Plugin object; commands.add registers the item, and the
player calls run when the user picks it or presses a key bound to it.
The Vestra Player plugin API (
apiVersion: "vestra/1"), types only.A plugin's entry module default-exports
activate. The player creates the Plugin object and passes it in; a plugin never imports SDK code at run time (a built plugin contains only its own code, andvestra-plugin buildfails on a runtime import of this package), so import withimport type.Start with Plugin and Scope: every module (
plugin.commands,plugin.player,plugin.windows…) hangs off them. Errors are described at PluginError. Tests use@vestra-player/sdk/testing.Example: Add a menu item that shows a message
The player gets a Tools ▸ Hello menu item; picking it shows "Hello" on the video. The player imports the entry module and calls
activatewith the plugin'sPluginobject;commands.addregisters the item, and the player callsrunwhen the user picks it or presses a key bound to it.