Error
Media error state and actions for the player store
Tracks media errors.
API Reference
State
| Property | Type | Details |
|---|---|---|
error | null | MediaError | |
| ||
Actions
| Action | Type | Details |
|---|---|---|
dismissError | () => void | |
| ||
Selector
Pass selectError to PlayerController to subscribe to error state. Returns undefined if the error feature is not configured.
import { createPlayer, MediaElement, selectError } from '@videojs/html';
import { videoFeatures } from '@videojs/html/video';
const { PlayerController, context } = createPlayer({ features: videoFeatures });
class ErrorDisplay extends MediaElement {
readonly #error = new PlayerController(this, context, selectError);
}