@byomakase/omakase-player
    Preparing search index...

    Interface Track<S, E>

    A track associated with a MainMedia (video, audio, text, markers, thumbnails, etc.).

    Tracks carry their own source, load lifecycle, and inter-track relations. Extends MediaEntity with mediaType always set to MediaEntityType.TRACK.

    interface Track<
        S extends TrackState = TrackState,
        E extends OmpEventGroup<any, any> = OmpEventGroup<any, any>,
    > {
        id: string;
        label: string | undefined;
        loadStage: OpStage;
        mediaType: MediaEntityType;
        onEvent$: Observable<E | TrackEvent<S>>;
        relations: Relation[];
        source: Source | undefined;
        sourceFileFormatType: FileFormatType | undefined;
        state: S;
        trackType: TrackType;
        addRelation(relation: Relation): void;
        hasRelation(relation: Relation): boolean;
        loadError(error: string | undefined): void;
        loadStart(): void;
        loadSuccess(): void;
        updateAttrs(attrs: TrackUpdateableAttrs): void;
    }

    Type Parameters

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    id: string

    Unique identifier (UUID).

    label: string | undefined

    Human-readable label for this track.

    loadStage: OpStage

    Current load lifecycle stage (idle → loading → success / failure).

    mediaType: MediaEntityType

    Discriminator indicating whether this entity is a main media or a track.

    onEvent$: Observable<E | TrackEvent<S>>

    Observable stream of track lifecycle events.

    relations: Relation[]

    Directed relations to other MediaEntity instances (e.g. RelationType.PART_OF, RelationType.DERIVED_FROM).

    source: Source | undefined

    The data source backing this track, if any.

    sourceFileFormatType: FileFormatType | undefined

    The resolved file format type of the source.

    state: S

    Serializable state snapshot.

    trackType: TrackType

    The kind of track (VIDEO, AUDIO, TEXT_TRACK, MARKER_TRACK, etc.).

    Methods