From 996c6e2d4749afb42f33e573ea780657b290cc12 Mon Sep 17 00:00:00 2001 From: Vance Ingalls Date: Fri, 21 Aug 2026 00:04:51 -0700 Subject: [PATCH 1/2] refactor(producer): delete the dead audioExtractor duplicate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `packages/producer/src/services/audioExtractor.ts` defined its own `parseAudioElements` and a `processAudio` that nothing calls. Every live consumer — `audioMixer.ts` (a pure re-export), `renderMediaCollector.ts`, the playback-rate parity fixture — imports these from `@hyperframes/engine` instead, so the file was a second, silently diverging copy of an engine decision. That divergence was already a bug: PRINFRA-349's review flagged this file's hand-rolled `startsWith("/")` source-path join as the same percent-encoded-CJK failure fixed in the HDR probes, with no decode, no compiledDir and no Windows `isAbsolute`. Engine's resolver has all three. Deleting the copy is the fix — patching it would have kept a resolver nobody reaches. --- .../producer/src/services/audioExtractor.ts | 323 ------------------ 1 file changed, 323 deletions(-) delete mode 100644 packages/producer/src/services/audioExtractor.ts diff --git a/packages/producer/src/services/audioExtractor.ts b/packages/producer/src/services/audioExtractor.ts deleted file mode 100644 index 6e6f0fa65d..0000000000 --- a/packages/producer/src/services/audioExtractor.ts +++ /dev/null @@ -1,323 +0,0 @@ -// fallow-ignore-file unused-file code-duplication complexity -/** - * Audio Extractor Service - * - * Extracts audio from media elements in the composition HTML, - * applies timeline positioning, and mixes into a single audio track. - */ - -import { spawn } from "node:child_process"; -import { existsSync, mkdirSync, rmSync, readFileSync } from "node:fs"; -import { join, dirname } from "node:path"; -import { getFfmpegBinary, trackChildProcess } from "@hyperframes/engine"; - -export interface AudioElement { - id: string; - src: string; - start: number; - duration: number; - mediaStart: number; - volume: number; - tagName: "audio" | "video"; -} - -export interface AudioTrack { - id: string; - srcPath: string; - start: number; - duration: number; - mediaStart: number; - volume: number; -} - -/** - * Parse audio/video elements from HTML to find media with audio. - */ -export function parseAudioElements(html: string): AudioElement[] { - const elements: AudioElement[] = []; - - // Match