IVideoTrack
interface
Data Shapes
A single <track> declaration attached to the <video> element. Mirrors the HTML attributes of the native element 1:1 so consumers do not have to learn a new shape. The component renders one <track> per item.
TypeScript
Définition
La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.
API
Propriétés
Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.
- kindrequisTVideoTrackKind
- Kind of the track. captions is the default — used by the built-in captions switcher. subtitles is treated the same way; descriptions and chapters are declared but not surfaced in the default toolbar.
- srcrequisstring
- URL of the WebVTT file. Same-origin or CORS-enabled, otherwise the browser silently rejects the track.
- srclangrequisstring
- BCP-47 language tag — "en", "fr", "pt-BR". Drives the language label in the captions switcher and is exposed to assistive technology via the underlying <track srclang>.
- labelstring
- Human-readable label shown in the switcher ("English", "Francais"). Defaults to the uppercased srclang when omitted.
- defaultboolean
- Marks this track as the one to enable on load. At most one track per kind should be flagged — if multiple are passed, the first one wins.
Écosystème
Utilisé par
Composants et composables qui étendent ou consomment cette interface.
Usage
Exemples
Extraits de code prêts à coller utilisant cette interface.
Attaching captions tracks to OrigamVideo