Install transport patches and begin recording CMCD reports.
No-op if already attached — the previously supplied options are
retained and the new options argument is silently ignored.
Call detach() first if you need to re-attach with different
options.
Discard all recorded reports. Does not affect the attached state.
Remove transport patches and stop recording. Rejects any pending
wait promises with Error('Recorder detached while waiting').
Return a defensive copy of all recorded reports.
Wait until at least count event-mode reports are recorded.
Resolves with all matching reports; rejects with a diagnostic error
on timeout. count defaults to 1; timeout falls back to the
recorder's waitTimeout option (default 15000 ms).
Wait until at least count manifest reports are recorded.
Resolves with all matching reports; rejects with a diagnostic error
on timeout. count defaults to 1; timeout falls back to the
recorder's waitTimeout option (default 15000 ms).
Wait until at least count reports of any type are recorded.
Resolves with all matching reports; rejects with a diagnostic error
on timeout. count defaults to 1; timeout falls back to the
recorder's waitTimeout option (default 15000 ms).
Wait until at least count segment reports are recorded.
Resolves with all matching reports; rejects with a diagnostic error
on timeout. count defaults to 1; timeout falls back to the
recorder's waitTimeout option (default 15000 ms).
Test helper that records CMCD-bearing reports across XHR and fetch transports for assertion in e2e tests. Each captured request is normalized to HttpRequest so tests are identical regardless of which transport the player uses.
Example