[PR #1218] [CLOSED] Added extended headset controls (headset button click handling) #1523

Closed
opened 2026-04-24 23:59:02 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf-app/pull/1218
Author: @sandreas
Created: 5/28/2024
Status: Closed

Base: masterHead: master


📝 Commits (10+)

  • 7ba1ebf Clickhandler works partially, I need support on the rest
  • bfb571a Clickhandler works in all tested scenarios
  • 595ac55 Merge branch 'advplyr:master' into master
  • b0c5588 removed useless currentPlayerDispatcher property
  • 25c1cec Implemented fastForward, adjusted timings
  • 56cd667 reverted unneccessary formatting changes, added experimental headset settings flag
  • dc8d0cf added enableExperimentalHeadsetControl as a setting
  • c24db68 Renamed "experimental" to "extended", fixed issues with extended headset controls
  • 1ee23ad Fixed translations, reduced seekBufferTime for fastForward and rewind
  • d1cd7bc Moved headset settings in an extra category

📊 Changes

28 files changed (+409 additions, -75 deletions)

View changed files

📝 android/app/src/main/java/com/audiobookshelf/app/data/DeviceClasses.kt (+4 -2)
📝 android/app/src/main/java/com/audiobookshelf/app/player/MediaSessionCallback.kt (+97 -2)
📝 android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt (+172 -10)
📝 ios/App/App/plugins/AbsDatabase.swift (+38 -35)
📝 ios/App/Shared/models/DeviceSettings.swift (+5 -1)
📝 pages/settings.vue (+24 -2)
📝 store/index.js (+6 -2)
📝 strings/cs.json (+3 -1)
📝 strings/da.json (+3 -1)
📝 strings/de.json (+4 -2)
📝 strings/en-us.json (+3 -1)
📝 strings/es.json (+3 -1)
📝 strings/fr.json (+3 -1)
📝 strings/gu.json (+3 -1)
📝 strings/hi.json (+3 -1)
📝 strings/hr.json (+3 -1)
📝 strings/hu.json (+3 -1)
📝 strings/it.json (+3 -1)
📝 strings/lt.json (+3 -1)
📝 strings/nl.json (+3 -1)

...and 8 more files

📄 Description

Fixes https://github.com/advplyr/audiobookshelf-app/issues/847

In addition I should say:

  • This PR contains just another method of handling headset clicks but keeps the existing behaviour intact - so it should not break any existing behaviour
  • I created an extra "Headset Settings" headline in the settings
  • This currently contains only one setting switch
  • In the future it may contain Additional select boxes to set settings for:
    • 1 click = play / pause
    • 2 clicks = next chapter or track (currently jump forward 5 mins)
    • 3 clicks = prev chapter or track (currently jump backwards 5 mins)
    • Hold = jumpBackwards
    • 1 click + hold (fast forward)
    • 2 click + hold (rewind)

Feedback welcome.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf-app/pull/1218 **Author:** [@sandreas](https://github.com/sandreas) **Created:** 5/28/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (10+) - [`7ba1ebf`](https://github.com/advplyr/audiobookshelf-app/commit/7ba1ebf63e034c8a7d2100da02dd3f706595bd7a) Clickhandler works partially, I need support on the rest - [`bfb571a`](https://github.com/advplyr/audiobookshelf-app/commit/bfb571a7c6bbec5cab78110a73b1f5a67aae6d4a) Clickhandler works in all tested scenarios - [`595ac55`](https://github.com/advplyr/audiobookshelf-app/commit/595ac550207d6c5b5a98a8944e92060d9a151e8d) Merge branch 'advplyr:master' into master - [`b0c5588`](https://github.com/advplyr/audiobookshelf-app/commit/b0c558851836daa33b01fc73da3f55a132b1f021) removed useless currentPlayerDispatcher property - [`25c1cec`](https://github.com/advplyr/audiobookshelf-app/commit/25c1cec7190d998bf15d215e6cab26e02e6d3142) Implemented fastForward, adjusted timings - [`56cd667`](https://github.com/advplyr/audiobookshelf-app/commit/56cd6673e62240bd95ace794fb29dafce2b21ab2) reverted unneccessary formatting changes, added experimental headset settings flag - [`dc8d0cf`](https://github.com/advplyr/audiobookshelf-app/commit/dc8d0cff56edea1791b373de4511e6c26956ffd6) added enableExperimentalHeadsetControl as a setting - [`c24db68`](https://github.com/advplyr/audiobookshelf-app/commit/c24db68f45cf9f8fe2d5524fdd134811f8289e0d) Renamed "experimental" to "extended", fixed issues with extended headset controls - [`1ee23ad`](https://github.com/advplyr/audiobookshelf-app/commit/1ee23addf081308e18ed1b9126ae3421bd41f921) Fixed translations, reduced seekBufferTime for fastForward and rewind - [`d1cd7bc`](https://github.com/advplyr/audiobookshelf-app/commit/d1cd7bc2079a163231913bfc447fab46b6b70d2d) Moved headset settings in an extra category ### 📊 Changes **28 files changed** (+409 additions, -75 deletions) <details> <summary>View changed files</summary> 📝 `android/app/src/main/java/com/audiobookshelf/app/data/DeviceClasses.kt` (+4 -2) 📝 `android/app/src/main/java/com/audiobookshelf/app/player/MediaSessionCallback.kt` (+97 -2) 📝 `android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt` (+172 -10) 📝 `ios/App/App/plugins/AbsDatabase.swift` (+38 -35) 📝 `ios/App/Shared/models/DeviceSettings.swift` (+5 -1) 📝 `pages/settings.vue` (+24 -2) 📝 `store/index.js` (+6 -2) 📝 `strings/cs.json` (+3 -1) 📝 `strings/da.json` (+3 -1) 📝 `strings/de.json` (+4 -2) 📝 `strings/en-us.json` (+3 -1) 📝 `strings/es.json` (+3 -1) 📝 `strings/fr.json` (+3 -1) 📝 `strings/gu.json` (+3 -1) 📝 `strings/hi.json` (+3 -1) 📝 `strings/hr.json` (+3 -1) 📝 `strings/hu.json` (+3 -1) 📝 `strings/it.json` (+3 -1) 📝 `strings/lt.json` (+3 -1) 📝 `strings/nl.json` (+3 -1) _...and 8 more files_ </details> ### 📄 Description Fixes https://github.com/advplyr/audiobookshelf-app/issues/847 In addition I should say: - This PR contains just another method of handling headset clicks but keeps the existing behaviour intact - so it should not break any existing behaviour - I created an extra "Headset Settings" headline in the settings - This currently contains only one setting switch - In the future it may contain Additional select boxes to set settings for: - 1 click = play / pause - 2 clicks = next chapter or track (currently jump forward 5 mins) - 3 clicks = prev chapter or track (currently jump backwards 5 mins) - Hold = jumpBackwards - 1 click + hold (fast forward) - 2 click + hold (rewind) Feedback welcome. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-24 23:59:02 +02:00
adam closed this issue 2026-04-24 23:59:03 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#1523