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
timeFeature(packages/core/src/dom/store/features/time.ts) reportsduration: 0until the media firesloadedmetadata/durationchange. Withpreload="none", this means time displays show0:00until 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
durationuntil 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
defaultduration— uses the value asmediadurationbefore load, paired withpreload="none"