Quality
Video rendition state and actions for the player store
Tracks video renditions and selects a manual rendition or automatic adaptive bitrate.
API Reference
State
| Property | Type | Details |
|---|---|---|
videoRenditionList | MediaVideoRendition[] | |
| ||
activeVideoRendition | null | MediaVideoRendition | |
| ||
Actions
| Action | Type | Details |
|---|---|---|
selectVideoRendition | (value: string) => void | |
| ||
Selector
Pass selectQuality to usePlayer to subscribe to quality state. Returns undefined if the quality feature is not configured.
Pass selectQuality to PlayerController to subscribe to quality state. Returns undefined if the quality feature is not configured.
import { selectQuality, usePlayer } from '@videojs/react';
function QualityInfo() {
const quality = usePlayer(selectQuality);
if (!quality) return null;
return <span>{quality.videoRenditionList.length} renditions</span>;
}import { createPlayer, MediaElement, selectQuality } from '@videojs/html';
import { videoFeatures } from '@videojs/html/video';
const { PlayerController, context } = createPlayer({ features: videoFeatures });
class QualityInfo extends MediaElement {
readonly #quality = new PlayerController(this, context, selectQuality);
}