Release the resource. Resolves once the player confirmed the release (or immediately for purely local resources). Never rejects.
A "Turn feature off" item removes the feature's own menu item at once,
before the plugin stops. dispose takes the command out of the menu and
the binding table and resolves once the player confirmed it; the id can
be added again later.
const extra = plugin.commands.add({ id: "extra", path: ["Tools", "Extra"], run() {} });
plugin.commands.add({
id: "extra-off",
path: ["Tools", "Turn extra off"],
run: () => extra.dispose(), // never rejects
});
Merged into the current settings; last write wins.
A 4:3 video fills a 16:9 window, distorted, as the user asked. Each
set merges the given fields into this plugin's view settings; the
newest write wins, and the settings stay for later files until the
plugin disposes the view or stops.
plugin.video.view().set({ fit: "stretch" });
The status changed.
When another plugin already controls the display layer, the OSD says
so. The first plugin to call view() owns it; this plugin's handle
then reports failed with conflict, and tries again on its next set.
const view = plugin.video.view();
view.onStatus((status) => {
if (status.state === "failed" && status.error.code === "conflict")
void plugin.osd.show("Another plugin controls the picture size");
});
The display layer, from
plugin.video.view().Single owner: the first plugin to call
view()owns it; another plugin's handle reportsfailed(conflict) and retries on eachset. Values persist across sources (reset them yourself on a newsourceIdif needed); disposing or stopping the owner restores the defaults. Out-of-range values or unknown fields fail withinvalidwithout sending anything.Example: Fill the window, then zoom in
The video fills the video area (cropped instead of letterboxed), then zooms to 150 % shifted a little to the right. The first plugin to call
view()owns the display layer; eachsetmerges into its settings, which stay across sources until the plugin disposes the view or stops.Remarks
Not part of snapshots or exports: it changes how the picture sits in the video area, not the picture.
setmerges into the current settings and never throws: an out-of-range value or unknown field shows asfailed(invalid) instatusand is reported toonError, without sending anything.See
Process video with a shader or a filter
Since
1.0.0