Skip to content

fix(cli): detect beats from child media sources - #5310

Merged
jrusso1020 merged 4 commits into
heygen-com:mainfrom
user-github-me:fix/beats-child-media-sources
Oct 24, 2026
Merged

jrusso1020 merged 4 commits into
heygen-com:mainfrom
user-github-me:fix/beats-child-media-sources

Conversation

@user-github-me

@user-github-me user-github-me commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

hyperframes beats skips 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:

  • All 19 command/result tests pass. Restoring main's discovery path makes 11 discovery tests fail while five controls pass.
  • Built parent-source and child-source commands produce byte-identical JSON with 24 beats at 120 BPM. Both leave the WAV and authored HTML unchanged and emit no stderr.
  • Full workspace build, CLI typecheck, lint, formatting, comment checks, test reachability and normal commit hooks pass.

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@jrusso1020
jrusso1020 added this pull request to the merge queue Oct 24, 2026
@jrusso1020
jrusso1020 removed this pull request from the merge queue due to a manual request Oct 24, 2026
@jrusso1020
jrusso1020 added this pull request to the merge queue Oct 24, 2026
Merged via the queue into heygen-com:main with commit e10155c Oct 24, 2026
103 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants