Skip to content

Add headphone controls support for media flyout - #1194

Open
FaroJoaoFaro wants to merge 2 commits into
unchihugo:masterfrom
FaroJoaoFaro:feature/headphone-gestures
Open

FaroJoaoFaro wants to merge 2 commits into
unchihugo:masterfrom
FaroJoaoFaro:feature/headphone-gestures

Conversation

@FaroJoaoFaro

Copy link
Copy Markdown
Contributor

Show the media flyout when media or volume is controlled from Bluetooth headphones or other external devices, not only keyboard media keys.

  • Accept media/volume app commands sent by OEM devices in the shell hook
  • Detect volume changes made without keyboard or mouse input
  • Detect play/pause toggles made without keyboard or mouse input
  • Add "Headphone Controls" setting (off by default)

Summary

Show the media flyout when media or volume is controlled from Bluetooth headphones or other external devices, not only from keyboard media keys. This is behind a new "Headphone Controls" setting, off by default.

Motivation

I use Bluetooth headphones and wanted the flyout to show when I change the volume or play/pause from the headphones. Right now it only shows for keyboard media keys, so using the headphone controls gives no on-screen feedback. More users wanted this change

Closes #18, and should also close duplicates: #286 and #354

Type of Change

  • [ X] Feature
  • Bug fix
  • Refactor (no functional changes)
  • Style (formatting, naming)
  • Other

What Changed

  • Accept media/volume app commands sent by OEM devices in the shell hook
  • Detect volume changes made without keyboard or mouse input
  • Detect play/pause toggles made without keyboard or mouse input
  • Add "Headphone Controls" setting (off by default)

Additional Information

Checklist

  • [X ] Code changes are manually tested and working.
  • [X ] Formatting and naming are consistent with the project.
  • [ X] Self-review of changes is done.
  • [X ] AI tools were used (if yes, I reviewed and fully understand the changes myself).

Show the media flyout when media or volume is controlled from Bluetooth
headphones or other external devices, not only keyboard media keys.

- Accept media/volume app commands sent by OEM devices in the shell hook
- Detect volume changes made without keyboard or mouse input
- Detect play/pause toggles made without keyboard or mouse input
- Add "Headphone Controls" setting (off by default)
@github-actions github-actions Bot added the MainWindow / Media Flyout Changes to MainWindow including the Media Flyout label Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@FaroJoaoFaro

Copy link
Copy Markdown
Contributor Author

I have read and agree to the FluentFlyout CLA

github-actions Bot added a commit that referenced this pull request Oct 8, 2026
@FaroJoaoFaro

Copy link
Copy Markdown
Contributor Author

recheck

Remove newlines at end of files

@unchihugo unchihugo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Hi @FaroJoaoFaro, thanks for the PR, looks good. Is there a reason you prefer this to be a toggleable feature that's off by default instead of being always on?

@FaroJoaoFaro

Copy link
Copy Markdown
Contributor Author

Hi @FaroJoaoFaro, thanks for the PR, looks good. Is there a reason you prefer this to be a toggleable feature that's off by default instead of being always on?

To be honest I would always use it on, and I, personally, wouldn't even need to have this option, but I thought this could be a desired option so I added it.

Tell me if you need me to modify it and I'll change it

@FaroJoaoFaro

Copy link
Copy Markdown
Contributor Author

I forgot to add but I tested this on a pair of Sony wh-1000xm5

@unchihugo

Copy link
Copy Markdown
Owner

I forgot to add but I tested this on a pair of Sony wh-1000xm5

Sounds good. Have you tested this against edge-case scenarios e.g. frequently disconnecting and reconnecting the Bluetooth device, switching Bluetooth devices, and after device sleep/hibernation?

@FaroJoaoFaro

FaroJoaoFaro commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor Author

I didn't but I can try to do it tomorrow!
I'll give it a go with multiple headsets and using more bluetooth devices

As for the settings do you want me to change anything?

@FaroJoaoFaro

Copy link
Copy Markdown
Contributor Author

Tested on Sony WH-1000XM5 (Windows 11). Results with Headphone Controls enabled:

  • Basic gestures: volume swipes and play/pause show the flyout. Keyboard media/volume keys and the Windows volume slider behave as before (no duplicate flyouts).
  • Disconnect/reconnect: turning the headset off/on (including several times in a row) and going out of range/back. Audio pauses or moves to the speakers as usual, and gestures work again after reconnecting.
  • Switching devices: switching output between the headset and the PC speakers, works as expected.
  • Sleep: after suspending and resuming the PC, gestures still work.
  • Bluetooth mouse connected at the same time: no interference. Using the mouse within 500 ms of a gesture suppresses the flyout, as intended/expected.
  • Setting disabled: no change from current behavior. Toggling it on again works without restarting the app.

Not tested: multipoint (headset connected to a phone at the same time) and hibernation.

One unrelated finding: restarting the Windows Audio service crashes the app with COMException 0x88890010 in VolumeMixerViewModel.SyncMasterFromDevice(). This isn't caused by this PR. I didn't touch it and intend to leave it out of this PR to keep it focused, but I'm happy to open a separate PR for it.

@unchihugo unchihugo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Hi @FaroJoaoFaro, I just tested out the branch on my own Bluetooth devices and noticed that the volume flyout (native or FluentFlyout's) doesn't display when volume has been changed, if the device had already been connected before starting, and the volume flyout setting is turned on. I'm not getting anything in the logs, so not sure what's going on. Are you able to check this out?

@FaroJoaoFaro

Copy link
Copy Markdown
Contributor Author

I will test it and attempt to fix!

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

MainWindow / Media Flyout Changes to MainWindow including the Media Flyout

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] Also show media flyout when modifying volume from Bluetooth headphones

2 participants