Files
piik/tests
T
AAA c606695722 refactor(watch): one owner of whether this browser can receive a format
canReceivePeerWatch took "is hls.js supported" as a parameter, and
three callers each found that answer for themselves: the page kept it
in component state, the session probed afresh for every route, and
HTMLVideoMedia probed twice in one load, once to choose the reader and
once to choose the player. The answers could differ. watch-media now
owns the probe: one in flight at a time, its last answer kept, a failed
one retried by the next caller, and canReceivePeerWatch(format) reads
it with no parameter. The identical MediaSource checks of the DASH and
MP4 adapters, and their inverse in track selection, are one
hasWatchMediaSource beside the worker check.

What changes:

- A player uses one answer for both its byte reader and its decoder,
  so the reader's address can no longer be paired with the other
  player.
- A stage that mounts again shows what an earlier probe found at once,
  where it showed the hint to use the App or a secure page until its
  own probe returned.
- A probe that throws in the page is no longer an unhandled rejection.

Kept: a route chosen by hand and a newly arrived grant still try the
player without waiting for the probe; the codec checks at track
selection and at playback.

Tests: a failed probe at a join and its retry shared with the stage,
one decision for each peer player, and each format's outcome with the
worker and MediaSource present or absent independently.
c606695722 · 2026-11-29 19:26:17 +08:00
History
..