// text_over_face: text painted in front of a video, over a face in it. The page reports the text's // word boxes and where the video's frame lands (layout-audit.browser.js); the faces come from the // file itself, with the detector `measure face` uses, because headless Chrome has none. import type { AnchoredLayoutIssue, CheckBbox, FaceCheck, TextOverVideoCandidate, } from "./checkTypes.js"; import { terminalLines } from "@hyperframes/core/terminal-text"; import { normalizeErrorMessage } from "./errorMessage.js"; /** Below this share of the face a descender or a letter's corner touches it, which hides nothing. */ export const FACE_COVER_REPORT = 0.05; // A face the video's own box crops to less than half is not one the viewer is shown. const FACE_SHOWN_MIN = 0.5; const MESSAGE_TEXT_MAX = 40; // The detector's first use downloads OpenCV: a network that never answers costs the finding, not the check. const DETECTOR_READY_MS = 30_000; const DETECTOR_LATE = `no answer within ${DETECTOR_READY_MS / 1000} s; \`hyperframes measure face