Repository navigation
fix(cli): detect beats from child media sources - #5310
Conversation
jrusso1020
left a comment
There was a problem hiding this comment.
Confirmed findMusicAudioSrc on main only reads a src attribute on the <audio>/<video> tag itself, so music supplied through a child <source> is not found. The fix hoists the first local child source (falling back to the first remote one) onto source-less media in an in-memory linkedom copy, then reuses the existing selector, which matches the renderer's resolveMediaElementSrc order in packages/engine/src/services/videoFrameExtractor.ts and walks composition templates via walkCompositionDescendants. The tests run the real command against WAV and AAC fixtures and cover parent-first, local-before-remote, muted and non-music exclusions, templates, entity decoding, and that the authored HTML is untouched. Non-blocking reuse note: resolveMediaElementSrc already encodes this selection rule, and exporting it from the engine (or a shared spot) would keep the CLI from carrying a third copy of the same rule next to lint's mediaHasResolvableSrc.
Need: yes · Size: ok · Reuse: engine resolveMediaElementSrc has the same rule (not exported today) · Simpler: fine as is
— Rames
hyperframes beatsskips music supplied through a child<source>, even though the renderer supports it. Resolve absent parent sources on an in-memory HTML copy, then use the existing music selector and path derivation. Preserve parent-first and local-before-remote selection without changing the authored HTML.The current-main integration uses its new native FFmpeg decoding and signal analysis. It preserves the real audio command tests and converts discovery coverage from the removed headless analyzer to real WAV and AAC fixtures.
Related work: #3238 introduced renderer child-source support, #4817 added audible video beat sources, and #5281 covers shared authored-attribute parsing.
Validation: