Three states need three meanings
The documented duration property can be NaN when media data is unavailable, Infinity for media without a known duration, or a finite time value. These values describe the resource state. They are not three spellings for a failed connection or three plan entitlements.
An on-demand video before metadata arrives and a continuing live stream can both lack an ordinary total-length label for different reasons. A user interface can show an appropriate loading or live state while retaining the player's actual error information separately. The lack of a finite duration alone does not identify the cause.
Avoid invalid progress arithmetic
Imagine code calculating current position divided by total duration. At position twenty, division by an unknown value cannot create a meaningful percentage; division by an unbounded duration can misleadingly collapse toward zero. Neither result should become a claim that the programme has downloaded nothing.
For a finite 1200-second episode at second three hundred, the position fraction is twenty-five percent. That calculation describes position through the episode, not bytes transferred or time remaining including pauses. Give each metric an explicit label so a correct calculation is not presented as another quantity.
Live windows need their own model
A player can expose a finite seekable portion of an ongoing presentation even when there is no fixed overall duration. The window and the entire programme are different concepts. Use the currently available range when describing how far a viewer can seek back, rather than substituting an arbitrary total length.
If a previously known duration changes, record the before and after values and whether the resource changed. Do not manufacture an end time by adding an old duration to a current guide listing. Programme guides, media metadata and actual event overruns can diverge, and each observation should retain its source.
Questions about this guide
Does Infinity mean the video file is infinitely large?
No. It can indicate media with no known fixed duration.
Is position percentage a download percentage?
No. Position and transferred bytes measure different things.
