What the plugin declared: id, menu path, title, order, group, default bindings, focus and repeat. Wire-level shape; it may gain fields in minor versions.
ReadonlydisplayWhat the menu shows, as the player shows it in the test host's
TestHost.locale: the title and each path segment translated with
the plugin's catalog (the player's own menus in the player's words), the
keys normalized (@video is "Video").
The menu text of the item.
Each segment of the path as shown; empty without a path.
Optionalreason?: string | nullThe disabled or busy reason as shown, null without one (a plugin
command's; not enumerable, so comparing display with
{ title, path } still works).
Optionalcategory?: string | nullThe category as shown (CommandOptions.category, translated with
the plugin's catalog), null without one. Not enumerable, like
reason.
OptionalwhenThe conditions the plugin sent for enabled and checked
(plugin.when, wire form), undefined without. Like the player, the
host evaluates them in FakeCommand.state against source,
mainWindow.fullscreen, appearance and language.
The command state as the player shows it: what the plugin last sent
(after the update pass), with the fields given as conditions
(plugin.when) evaluated now. With an enabled condition, reason
is null while the command is enabled and not busy.
false when the plugin disabled the command.
The check mark: true, false, or null for none.
true while the plugin reports the command as busy.
The reason the plugin sent (source text or a text value; see display.reason).
The state revision the player holds; increases with every state update the SDK sends.
A command the plugin registered with
plugin.commands.add, as the test host keeps it. Get one with TestHost.command (the plugin's own) or TestHost.coreAction (the player's core actions).Example: Run a checkable menu item from a test
The test checks the Loop item's menu place, picks it and sees its check mark turn on.
host.command(id)is the host's record of what the plugin declared and the state it last sent;run()calls the plugin'srunlike the menu, after which the SDK re-evaluates the command's state and sends it, andrun()resolves once the host is idle again.Remarks
The host's record of one command: what the plugin declared, the state it last sent, and how the menu shows it in TestHost.locale. Read it again after
settle()to see changes;runexecutes it as the menu would.Since
1.0.0