Skip to content

Preview hides a later scene's autoAlpha layer when the page has audio and a setter tween #7193

Open

Description

@sydneypalumbo

Describe the bug

In preview, a layer whose first tween is a deferred autoAlpha cut (fromTo(el, { autoAlpha: 1 }, { autoAlpha: 0, immediateRender: false }, T)) is missing from the start of its scene. Render shows it. This happens when the page has an <audio>/<video> and any tween targets an object with a property setter, such as a count-up through { get v(), set v() }.

Minimal reproduction

https://github.com/ArcadeHQ/hyperframes-repros/tree/patch/volume-probe-autoalpha

Steps to reproduce

  1. git checkout patch/volume-probe-autoalpha
  2. npx hyperframes@0.9.13 check (passes)
  3. npx hyperframes@0.9.13 preview, then scrub to 6.5s.
  4. npx hyperframes@0.9.13 render --quality draft -o renders/render.mp4, then look at the frame at 6.5s.

Expected behavior

The yellow box in compositions/scene3.html shows from 6s to 7.5s, in preview and in render.

Actual behavior

Render shows the box at 6.5s. Preview never shows it. At 6.5s it carries inline opacity: 0; visibility: hidden.

Preview matches render if you do either of these:

  • Drive the count-up with onUpdate on a plain object instead of a setter.
  • Remove the <audio>.

Environment

hyperframes 0.9.13 (latest), Node 25.6.1, macOS arm64 (Apple M2 Max), chrome-headless-shell 152.0.7977.30, GSAP 3.14.2.

Additional context

With a media element on the page, the preview runtime samples the element's volume automation by seeking the live root timeline through its window (probeAndCacheElementVolume, packages/core/src/runtime/mediaVolumeEnvelope.ts). volumeMoversOf skips that sweep only when it can rule out a volume change. A tween on any object with a setter counts as a possible volume change.

The sweep runs before the first visibility pass. At that point the until-first-pass sheet ([data-start]:not(video, audio, img) { visibility: hidden !important }) hides every clip. The sweep is the box's tween's first render, so GSAP records the inherited hidden as the value to restore, and every later seek before T writes it back. Render skips the sweep (allowLiveTimelineSeek: !__HF_RENDER_CAPTURE_MODE), so render is right.

#5690 fixed this pattern for jump seeks with showHiddenClips(), but the volume probe doesn't use it. A fix that works in our fork:

  • Wrap the probe's sweep and its restore seek in showHiddenClips().
  • Have showHiddenClips() also detach the until-first-pass sheet, and restore it unless the first pass has lifted it in the meantime.

It has a jsdom test that fails without the fix and passes with it, and the full packages/core/src/runtime suite passes. Happy to open a PR if that's useful.

Activity

  1. added
    bug
    triage/ready
    difficulty/hard
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdifficulty/hardtriage/ready

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions