Skip to content

feat(mobile): opt-in visualizer, full screen on iPhone Duo - #14819

Open
dylanjeffers wants to merge 5 commits into
mainfrom
claude/duo-immersive-now-playing
Open

dylanjeffers wants to merge 5 commits into
mainfrom
claude/duo-immersive-now-playing

Conversation

@dylanjeffers

@dylanjeffers dylanjeffers commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Stacked on #14813. Adds the Butterchurn visualizer to Now Playing as something you opt into, never the default. This now also carries the phone drawer change that was #14820.

Before: on the iPhone Duo's open posture, the docked Now Playing panel always ran the visualizer behind the waveform, and a separate arrow took it full screen.

After: the docked panel is the plain panel from #14813. A Visualizer button (stars icon) next to "Now Playing" turns the visualizer on and takes the player full screen on the inner screen. Pressing it again turns the visualizer off and goes back to the docked panel next to the feed. On regular phones the same button sits in the Now Playing drawer's title bar and turns the visualizer on behind the drawer.

  • Off by default everywhere. The choice lasts while the app is running and is not stored, so every launch starts plain. On the Duo it also resets when you leave the open posture (fold to half-open or closed).
  • Feature flag: both buttons are behind now_playing_visualizer, on in development and off in production until the flag is created in Optimizely. With the flag off there is no button and nothing changes.
  • Visualizer: Butterchurn (the Milkdrop visualizer desktop uses) in a WebView. Each track gets a fixed preset chosen from its track ID, tinted with the most saturated dominant colours from its artwork. The WebView decodes the stream the player is using and feeds the real samples at the playhead, with a pulse on bass hits and a bigger flash and preset cut on drops. Tracks over 7 minutes, offline tracks and failed decodes fall back to a signal built from the waveform peaks.
  • Dark theme while on: a ThemeOverrideContext in utils/theme.ts forces the dark theme over the visualizer so text and controls stay readable on any app theme.
  • Full screen layout on the Duo: landscape puts the artwork on the left half and the details in a column on the right; portrait is one centred column.
  • Butterchurn and its 29-preset "minimal" pack are bundled as strings in visualizerLibs.ts (about 390KB), generated by packages/mobile/scripts/generate-visualizer-libs.js from the copies packages/web already depends on.

Closed, Gatefold and the half-open split view are unchanged from #14813.

How to test on an iPhone Duo

Use a build where now_playing_visualizer is on (any development build).

  1. Open the Duo flat with a track playing. The right panel should be the plain light/dark panel with no visualizer, and a stars button next to "Now Playing".
  2. Tap the stars button. The feed should disappear, the player should fill the inner screen with the visualizer behind it, and the button should turn active.
  3. Rotate between landscape and portrait while it is on.
  4. Tap the stars button again. You should be back to the feed with the plain docked panel.
  5. Turn it on, then fold to half-open. Gatefold should show as before. Open flat again: the visualizer should be off.
  6. On the outer screen, open the Now Playing drawer. No visualizer until you tap the stars button in the title bar; relaunching the app should start with it off.

Checks

  • tsc and eslint on the changed mobile files: no new errors (a local install without built workspace packages reports missing @audius/fixed-decimal and similar in untouched files). Comment ratchet passes.
  • The earlier simulator runs (iPhone Duo sim on iOS 27.2, iPhone 17 Pro sim on iOS 26.5) covered the visualizer itself. The opt-in wiring in this revision has not been run on a simulator or device.

Not verified

  • A real Duo or any real device: frame rate, battery and heat of a WebGL canvas rendering every frame.
  • Beat and drop thresholds are first guesses.
  • Android tablets at least 600pt wide also get the docked panel and this button. Not tested there.

Notes

  • Each track's audio is downloaded a second time while the visualizer is on, which matters on cellular.

Generated by Claude Code

dylanjeffers and others added 4 commits November 30, 2026 11:12
- Layout reacts to window size changes (fold/unfold) instead of reading
  Dimensions once at startup; drawer height is now a hook.
- Wide windows (>= 600pt) show a split view with a docked Now Playing
  panel (artwork, waveform, controls, Up Next) in place of the drawer.
- Half-open hinge shows Gatefold: artwork and controls on the left page,
  timestamped comments synced to playback on the right; tap to seek.
- New AudiusHinge native module wraps UIHingeInteraction (iOS 27.1+).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Size Now Playing panel and Gatefold artwork from the space left after
  the controls, so the play controls stay on screen.
- Gatefold pages flex within the modal's measured width and apply its
  own safe-area insets, including left/right.
- Gatefold only on a vertical fold (window wider than tall).
- Render the Dynamic Island logo only when the top inset can hide it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The docked Now Playing panel in the open posture gets a Butterchurn
visualizer behind the existing waveform and comment bubble, driven by
the track's decoded audio, with a per-track preset tinted from the
artwork. An expand button takes the panel full screen.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Adds a visualizer toggle to the Now Playing drawer behind the
now_playing_visualizer flag, reusing the Duo panel's backdrop.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b2165d9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

The Duo's open posture shows the plain docked Now Playing panel by default.
A Visualizer button in the panel header turns the visualizer on and takes
the player full screen; pressing it again returns to the docked panel.
The phone drawer toggle no longer persists between launches. Both sit
behind the now_playing_visualizer flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dylanjeffers dylanjeffers changed the title feat(mobile): immersive Now Playing on iPhone Duo's open posture feat(mobile): opt-in visualizer, full screen on iPhone Duo Dec 2, 2026
@dylanjeffers
dylanjeffers marked this pull request as ready for review December 2, 2026 19:35
Base automatically changed from feat/mobile-iphone-duo to main December 2, 2026 21:44

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant