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

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

kind
required
TVideoTrackKind
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.
src
required
string
URL of the WebVTT file. Same-origin or CORS-enabled, otherwise the browser silently rejects the track.
srclang
required
string
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>.
label
string
Human-readable label shown in the switcher ("English", "Francais"). Defaults to the uppercased srclang when omitted.
default
boolean
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.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Attaching captions tracks to OrigamVideo

typescript