@vestra-player/sdk - v1.11.3
    Preparing search index...

    @vestra-player/sdk - v1.11.3

    Vestra Player logo

    Vestra Player SDK

    Build plugins for Vestra Player in TypeScript: Slint user interfaces, an in-memory test host and a one-command packager.

    npm version CI Documentation Node.js version License

    Documentation · Tutorial · Examples · Changelog · llms.txt

    • One typed API (vestra/1) for commands and menus, windows, panels, settings pages, on-screen messages, playback state and control, video and audio filters, and generated streams.
    • Plugins that cost nothing while idle: a plugin learns what happens in the player from events and triggers the player keeps for it (a file opened, playing in fullscreen, a time, a position range), and its menu items follow playback through plugin.when conditions the player evaluates; the player stops it while nothing uses it and starts it again for the moment it is needed.
    • Native user interfaces written in Slint, with the player's own theme and widgets.
    • Tests without the player: @vestra-player/sdk/testing runs your plugin against an in-memory host with node --test.
    • One command line tool, vestra-plugin, to check, test, build and pack a .vxp package.
    • The same API on macOS and Windows; every plugin runs in its own Node.js 26 process that the player ships.
    • Documentation for coding agents: npx -p @vestra-player/sdk vestra-plugin docs [path] reads this documentation as a tree of short pages, like go doc (… docs Snapshot.export, … docs --search <words>; in a project that depends on the SDK, npx vestra-plugin docs); programs import @vestra-player/sdk/docs. llms.txt (also @vestra-player/sdk/llms.txt) is the short entry that explains it.
    npm i -D @vestra-player/sdk   # Node.js 26 or newer
    

    manifest.json and main.ts:

    {
    "id": "examples.hello",
    "version": "0.1.0",
    "apiVersion": "vestra/1",
    "entry": "main.ts",
    "minPlayerVersion": "0.9.0"
    }
    import type { Plugin } from "@vestra-player/sdk";

    export default async function activate(plugin: Plugin) {
    plugin.commands.add({
    id: "hello",
    path: ["Tools", "Hello"],
    run: () => plugin.osd.show("Hello"),
    });
    }

    Run npx vestra-plugin pack to check and package it, or start the player with --plugin <folder> to try it right away. This is examples/hello; the Tutorial explains what a plugin is, shows the three ways to write one, and runs, tests and publishes it.

    Complete, tested plugins in examples/. The examples page shows each one with a screenshot and a step-by-step walkthrough.

    Example What you learn Walkthrough
    hello The smallest plugin: a manifest, one menu command, an on-screen message. Step by step
    blur A video filter driven by one slider in a tool window. Step by step
    signal-generator Generating video and audio frames yourself: colour bars and a sine tone. Step by step
    bookmark A tool window that follows playback while it is open: Mark and Jump. Step by step
    panel-menu A sidebar panel with its own right-click menu. Step by step
    menus Radio items, separator groups and a menu item whose title changes. Step by step
    theme-widgets A tool window drawn with the player's theme and widgets. Step by step
    markdown A window that shows a Markdown document. Step by step
    i18n A plugin in the player's language: English source text, a translation. Step by step

    The documentation site is the one place for everything a plugin author needs:

    • Tutorial: one page: what a plugin is (a process that talks to the player), the three ways to write one with an example each, where things live, and running, testing and publishing.
    • Guides: one task each (goal, steps, often a complete example): windows, settings and translations, playback, storage, window state, sliders, subtitles, video filters, the GPU switch, events and triggers that wake a stopped plugin, menu state that needs no running plugin (plugin.when), testing, publishing, your own store, documentation for coding agents; the design rules every plugin follows; and troubleshooting.
    • Reference: manifest fields, limits, menus and bindings, platforms, theme, error codes, events, messages, translations, the test host, and the command line (vestra-plugin check, test, build, pack, i18n extract, i18n check).
    • Examples: the walkthroughs above.
    • API: every type and member of @vestra-player/sdk and @vestra-player/sdk/testing.

    Every 1.x release implements the plugin API vestra/1: minor releases only add backwards-compatible API, and a breaking change gets a new apiVersion and a new major version. Plugins run on the Node.js 26 that the player ships. Set the manifest's minPlayerVersion to the player you tested with. @vestra-player/sdk/runtime is for the player only and not covered by semver.

    Bug reports, documentation fixes and examples are welcome: see CONTRIBUTING.md. Licensed under Apache-2.0.