Skip to content

Feature: Support Default Duration Before Media Loads #1729

Description

@luwes

timeFeature (packages/core/src/dom/store/features/time.ts) reports duration: 0 until the media fires loadedmetadata / durationchange. With preload="none", this means time displays show 0:00 until the user starts playback — even when the real duration is already known (e.g. from a CMS). Apps that defer loading for cost or bandwidth reasons can't show the correct length up front.

Add a configurable default duration that seeds the store's duration until the media reports its own, so the UI can render the known length without preloading. The real value should take over once metadata loads.

This depends on the same per-feature configuration mechanism being decided in #1728 (features are currently parameterless via definePlayerFeature).

Context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions