* fix: hand the picture-in-picture window to the advert
An advert plays in its own element laid over the stage, which is right for
the engine driving the programme and wrong for a viewer watching in
picture-in-picture: that window renders one element's frames and nothing
else on the page, so the overlay is simply not in it. The break arrived as
a frozen frame of the paused programme with advert sound over it, and the
programme then carried on - heard, never seen, and billed as an impression
nobody saw.
The window now moves to the advert for the length of the break and is
handed back before the advert's source is dropped, which is what closes it.
Requesting the swap while the advert still holds the window is deliberate:
the specification skips the user-activation check when the document already
has a picture-in-picture element, so no gesture is needed mid-break.
Safari's presentation modes are driven too, an audio advert leaves the
window alone since it has no picture to show, and a browser that refuses
the swap reports it and keeps the break rather than losing it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* test: a manual check for the break in the picture-in-picture window
Neither jsdom nor a headless browser opens the window, so the one thing the
unit tests cannot prove - that a real browser accepts the swap mid-break,
with no gesture behind it - is left as a page to open. One press, then
everything that matters happens on a timer.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* chore: run prettier, so CI can get past its first step
The Format step runs before Typecheck, Test and Build, and has been failing
on main since before these adverts: every run since has stopped at it, so
nothing else in the workflow has actually executed. Formatting only - no
behaviour changes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* chore: 0.13.2
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>