Skip to content

Follow native and observable media and timeline states - #202

Merged
jdalton merged 1 commit into
dperini:masterfrom
jdalton:preserve/media-time-pseudos
Sep 7, 2026
Merged

Follow native and observable media and timeline states#202
jdalton merged 1 commit into
dperini:masterfrom
jdalton:preserve/media-time-pseudos

Conversation

@jdalton

@jdalton jdalton commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Media selectors now use native host state when available and fall back to observable HTML audio/video properties. This fixes ordinary elements matching paused/seeking states, playback at time zero or during buffering, and muting that depended on the audio content attribute. Buffering can match while playback remains active. Timed stalls and volume locks require native support; the engine does not infer them from a network flag.

Time selectors delegate to the host timeline and match nothing when it is unavailable. Functional :current() validates a nonempty compound-selector list, including with no candidates, and follows existing forgiving-list behavior.

The changes follow the draft resource-state definitions and time-dimensional definitions. The retained browser assertions now live under test/repo/e2e and run through the default CI browser command. New tests cover real playback, pause, seeking, muting, completion, native delegation, unsupported-host fallbacks, and malformed time selectors. The two archived expected failures are passing contracts; host-only limitations are documented in docs/media-time-state.md.

Rebased as one commit onto the completed selector and benchmark changes. Validation: 585 Node tests, 22 packed-package tests, 20 existing browser tests, 7 media/display browser tests, and 58 WPT pages pass. Types, lint, formatting, repository checks, and coverage thresholds pass. Combined coverage: 86.42% statements, 77.72% branches, 85.16% functions, 85.31% lines.

@jdalton
jdalton marked this pull request as ready for review September 5, 2026 19:42
@jdalton
jdalton force-pushed the preserve/media-time-pseudos branch 2 times, most recently from 7daac5c to e6769cf Compare September 6, 2026 11:40
@jdalton
jdalton force-pushed the preserve/media-time-pseudos branch from e6769cf to 989282d Compare September 7, 2026 15:27
@jdalton jdalton changed the title Review media and time state handling extracted from #167 Follow native and observable media and timeline states Sep 7, 2026
@jdalton
jdalton merged commit d72c036 into dperini:master Sep 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant