Controls
ID: vControls
| ROLE: CONTROLS
| Type: Plugin
This plugin renders and manages control groups.
info
This plugin has a Registry
containing all registered
control groups.
#
DefaultsBy default there are no groups/controls, but you can install an additional DefaultControls
plugin to
get started with the Vime defaults.
The default controls depend on:
- Whether the player is playing an audio track or video.
- Whether it is a mobile device or not.
- Whether it is a live stream or not.
#
Setup- Basic
- Manager
#
Usage#
Create Groupinfo
See ControlGroup
for the full API.
#
Update Group#
Delete Group#
Access Group via Event#
Access Group via Registry#
MethodsgetEl
#
Return Type: HTMLElement
The root HTML element of this plugin.
getRegistry
#
Return Type: Registry
The plugin registry where ControlGroup
instances are registered.
getGroups
#
Return Type: { [id]: ControlGroup }
The rendered ControlGroup
instances.
getGroup
#
Parameters: (id: string)
| Return Type: ControlGroup|undefined
The rendered ControlGroup
instance for the given id
.
createGroup
#
Parameters: (id: string)
| Return Type: Promise<ControlGroup>
Creates and renders a ControlGroup
component and returns a Promise
that will resolve with the
rendered instance.
createGroups
#
Parameters: (ids: string[])
| Return Type: Promise<ControlGroup[]>
Creates and renders a list of ControlGroup
components and returns all their instances via a Promise
.
removeGroup
#
Parameters: (id: string)
| Return Type: Promise<undefined>
Destroys a ControlGroup
instance matching the given id
and returns a Promise
that will resolve
once it has completed.
removeGroups
#
Parameters: (ids: string[])
| Return Type: Promise<undefined>
Destroys multiple ControlGroup
instances matching the given ids
and returns a Promise
that will
resolve once it has completed.
#
Events#
RegistryEmits Registry
events.