Controls
User activity and controls visibility state for the player store
Read-only — tracks user activity for showing and hiding controls.
API Reference
State
| Property | Type | Details |
|---|---|---|
userActive | boolean | |
| ||
controlsVisible | boolean | |
| ||
Selector
Pass selectControls to PlayerController to subscribe to controls state. Returns undefined if the controls feature is not configured.
import { createPlayer, MediaElement, selectControls } from '@videojs/html';
import { videoFeatures } from '@videojs/html/video';
const { PlayerController, context } = createPlayer({ features: videoFeatures });
class ControlsOverlay extends MediaElement {
readonly #controls = new PlayerController(this, context, selectControls);
}