Skip to content

Add ad_volume option to lower volume during ads instead of muting - #502

Open
tutozz wants to merge 3 commits into
dmunozv04:mainfrom
tutozz:ad-volume
Open

tutozz wants to merge 3 commits into
dmunozv04:mainfrom
tutozz:ad-volume

Conversation

@tutozz

@tutozz tutozz commented Sep 8, 2026 •

Copy link
Copy Markdown

Muting an ad cuts the sound dead, and I find that sudden silence more jarring than the ad. I'd rather drop the volume to a few percent and keep a floor.

Adds an optional ad_volume (0-100). When set, an ad drops the volume to that value instead of flipping the mute flag, and the volume in place before the ad is restored when it ends. Left unset, nothing changes.

Three things it has to handle:

  • the device echoes the lowered volume back in onVolumeChanged, so the restore point is saved once at the start of the ad instead of being read back from volume_state;
  • the device only reports its volume when something changes it, so getVolume is sent once the lounge session is up - otherwise the first ad after connecting has nothing to come back to;
  • if the volume is still unknown anyway, it falls back to the muted flag rather than guessing a volume to restore.

Wired into both configurators and the template.

Running on an Apple TV (tvOS 26.6) with ad_volume set: loungeStatus -> getVolume -> onVolumeChanged {'volume': '100'} in 100 ms, then ads play at the low volume and 100 comes back when they end.

@tutozz
tutozz force-pushed the ad-volume branch 2 times, most recently from 339acb7 to 487064d Compare September 8, 2026 18:16
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.

1 participant