IVideoSource

interface
Data Shapes

A single <source> entry when the consumer passes multiple media URLs to OrigamVideo (typically one mp4 + one webm so the browser picks whichever codec it can decode). Supports optional quality labelling for the in-player quality switcher.

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.

src
required
string
Absolute or root-relative URL to the media file.
type
string
MIME type — video/mp4, video/webm, application/vnd.apple.mpegurl for HLS. Recommended: lets the browser skip sources it cannot decode without a network round-trip.
quality
string
Quality identifier used to group multiple sources of the same content at different resolutions (e.g. "1080p", "720p", "auto"). When two or more sources expose distinct quality values, OrigamVideo shows a Quality entry in the settings menu.
label
string
Optional human-readable label override for the quality switcher menu. Defaults to the quality value when not provided.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Passing multiple sources for quality switching

typescript