mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 07:50:13 +00:00
* fix(producer): keep the probe stage's media pre-checks linear in page size hasRuntimeMediaChanges now collects the page's media elements in one walk, answers id lookups from a set, de-duplicates selectors and checks them only against media elements. Past a fixed number of checks it lets the browser probe decide. hasVariableBoundMedia parses each element's variable attributes once per scan and shares one step budget across the ancestor walks. Past the budget it gives the conservative answer and probes in the browser. * fix(producer): bound the media-source scan by selector length, and walk every top-level element The selector budget now counts selector characters times media elements, since each match parses the selector again. A selector with a sibling combinator goes to the browser probe. The media walk starts from every top-level element, so a page written without the html tag is still scanned. Tests now count lookups and JSON parses instead of timing them.