mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-14 18:01:20 +08:00
c4b1018f1e
The previous commit claimed a remount could retry the player chunk after a failed load. In a browser it cannot: the module map caches a failed fetch as an errored entry for the document's lifetime, so a repeated import of the same specifier rejects from cache without touching the network (measured in headless Chrome: three attempts, one request). Clearing the memo on rejection is still right, because it stops every later mount awaiting the same poisoned promise, but recovery is a page reload, and the comment now says so. The tests said what vitest does, not what the browser does. Two assertions survived their own mutation: removing the memoisation left the attempt counter unchanged because vitest caches a resolved mock, and deleting the module-scope kick, the optimisation this branch exists for, left the suite green. Both are now asserted directly: the kick has run once at import time before any mount, and every mount receives the identical promise.