[iOS] Can't pause from headphones #485

Closed
opened 2026-04-24 23:25:42 +02:00 by adam · 11 comments
Owner

Originally created by @KaiStarkk on GitHub (Mar 4, 2023).

Pressing the pause button causes the app to rewind a few seconds. It seems to register as two presses (pause then play again).

Tested with Aftershokz Aeropex and AcousticSheep sleepphones, both have same problem.

Sony wh1000mx3 works correctly.

iOS 16.3.1
iOS 17.1.1
iOS 17.2.1
App version 0.9.66
App version 0.9.67
App version 0.9.68
Server version 2.5.0
Server version 2.6.0

Please thumbs up if you have this issue, appears to be preferred way of prioritizing issues.

Originally created by @KaiStarkk on GitHub (Mar 4, 2023). Pressing the pause button causes the app to rewind a few seconds. It seems to register as two presses (pause then play again). Tested with Aftershokz Aeropex and AcousticSheep sleepphones, both have same problem. Sony wh1000mx3 works correctly. ~iOS 16.3.1~ ~iOS 17.1.1~ iOS 17.2.1 ~App version 0.9.66~ ~App version 0.9.67~ App version 0.9.68 ~Server version 2.5.0~ Server version 2.6.0 Please thumbs up if you have this issue, appears to be preferred way of prioritizing issues.
adam added the bug label 2026-04-24 23:25:42 +02:00
adam closed this issue 2026-04-24 23:25:43 +02:00
Author
Owner

@cmccambridge commented on GitHub (Apr 24, 2023):

I’m also experiencing this in the iOS app with my soundpeats q30 Bluetooth headset. I have to get my phone out to pause a book, which hurts a lot of my favorite audiobook cases- working out, doing chores, etc.

App: 0.9.63-beta
Backend: 2.2.19

@cmccambridge commented on GitHub (Apr 24, 2023): I’m also experiencing this in the iOS app with my soundpeats q30 Bluetooth headset. I have to get my phone out to pause a book, which hurts a lot of my favorite audiobook cases- working out, doing chores, etc. App: 0.9.63-beta Backend: 2.2.19
Author
Owner

@cmccambridge commented on GitHub (Apr 24, 2023):

@advplyr - Possible root cause... If I'm way off the rails here, kindly ignore me. Not an iOS developer, just skimming code & docs :)

Looks like in AudioPlayer.swift there's no explicit handler for togglePlayPauseCommand, only for the explicit playCommand and pauseCommand...

I'm wondering if perhaps depending on the bluetooth headset & iOS implementations, it might default to sending a playCommand if the physical toggle button is pressed without the togglePlayPauseCommand being enabled? That would also explain the brief skip backward, given the allowSeekBack: true parameter there.

Perhaps on other headsets the headset itself is smart enough to send differentiated play vs pause commands... no idea.

@cmccambridge commented on GitHub (Apr 24, 2023): @advplyr - Possible root cause... If I'm way off the rails here, kindly ignore me. Not an iOS developer, just skimming code & docs :) Looks like in [`AudioPlayer.swift`](https://github.com/advplyr/audiobookshelf-app/blob/master/ios/App/Shared/player/AudioPlayer.swift#L584) there's no explicit handler for [`togglePlayPauseCommand`](https://developer.apple.com/documentation/mediaplayer/mpremotecommandcenter/1618992-toggleplaypausecommand), only for the explicit `playCommand` and `pauseCommand`... I'm wondering if perhaps depending on the bluetooth headset & iOS implementations, it might default to sending a `playCommand` if the physical toggle button is pressed without the `togglePlayPauseCommand` being enabled? That would also explain the brief skip backward, given the `allowSeekBack: true` parameter there. Perhaps on other headsets the headset itself is smart enough to send differentiated play vs pause commands... no idea.
Author
Owner

@advplyr commented on GitHub (May 20, 2023):

I'm not very familiar with iOS since I use Android but on Android it is similar to how you are describing.

@advplyr commented on GitHub (May 20, 2023): I'm not very familiar with iOS since I use Android but on Android it is similar to how you are describing.
Author
Owner

@KaiStarkk commented on GitHub (Jul 25, 2023):

I'm not very familiar with iOS since I use Android but on Android it is similar to how you are describing.

To clarify, on iPhone it’s behaving differently to android - when you press the play/pause button once, it rewinds and continues playing. As though the button was pressed twice.

@KaiStarkk commented on GitHub (Jul 25, 2023): > I'm not very familiar with iOS since I use Android but on Android it is similar to how you are describing. To clarify, on iPhone it’s behaving differently to android - when you press the play/pause button once, it rewinds and continues playing. As though the button was pressed twice.
Author
Owner

@wnoakes commented on GitHub (Oct 5, 2023):

I see this with my iPhone 13 mini on 17.0.3 on Ultimate Ears Boom 3 bluetooth speaker and Creative Outlier ONE bluetooth headphones

@wnoakes commented on GitHub (Oct 5, 2023): I see this with my iPhone 13 mini on 17.0.3 on Ultimate Ears Boom 3 bluetooth speaker and Creative Outlier ONE bluetooth headphones
Author
Owner

@KaiStarkk commented on GitHub (Nov 5, 2023):

@ronaldheft hoping you might be able to share some wisdom on this one? Appears you’ve had some involvement in the iOS player handlers

@KaiStarkk commented on GitHub (Nov 5, 2023): @ronaldheft hoping you might be able to share some wisdom on this one? Appears you’ve had some involvement in the iOS player handlers
Author
Owner

@ronaldheft commented on GitHub (Nov 5, 2023):

@KaiStarkk Are you experiencing this with a book that is multi-track (multiple files) or single-track (one file)?

I ask, because I know there are definitely still issues with multi-track in the player, especially around winding back the book a few seconds when resuming.

@ronaldheft commented on GitHub (Nov 5, 2023): @KaiStarkk Are you experiencing this with a book that is multi-track (multiple files) or single-track (one file)? I ask, because I know there are definitely still issues with multi-track in the player, especially around winding back the book a few seconds when resuming.
Author
Owner

@KaiStarkk commented on GitHub (Nov 6, 2023):

@ronaldheft just tested, it’s happening with both multi track and single track.

Essentially it’s impossible to pause from headphones.

Any thoughts on the suggestion above about handling https://developer.apple.com/documentation/mediaplayer/mpremotecommandcenter/1618992-toggleplaypausecommand

@KaiStarkk commented on GitHub (Nov 6, 2023): @ronaldheft just tested, it’s happening with both multi track and single track. Essentially it’s impossible to pause from headphones. Any thoughts on the suggestion above about handling https://developer.apple.com/documentation/mediaplayer/mpremotecommandcenter/1618992-toggleplaypausecommand
Author
Owner

@KaiStarkk commented on GitHub (Dec 17, 2023):

@cmccambridge don't suppose you have a machine which can run Xcode and an iPhone to test with? I'm hamstrung on both fronts.

Sidenote, it seems like it would make sense to do a sanity check when pausing and playing also. i.e.

        commandCenter.playCommand.isEnabled = true
        commandCenter.playCommand.addTarget { [weak self] event in
            if (self?.isPlaying()) {
                self?.pause()
            } else {
                self?.play(allowSeekBack: true)
            }
            return .success
        }
        
        commandCenter.pauseCommand.isEnabled = true
        commandCenter.pauseCommand.addTarget { [weak self] event in
            if (self?.isPlaying()) {
                self?.pause()
            } else {
                self?.play(allowSeekBack: true)
            }
            return .success
        }

        commandCenter.togglePlayPauseCommand.isEnabled = true
        commandCenter.togglePlayPauseCommand.addTarget { [weak self] event in
            if (self?.isPlaying()) {
                self?.pause()
            } else {
                self?.play(allowSeekBack: true)
            }
            return .success
        }
@KaiStarkk commented on GitHub (Dec 17, 2023): @cmccambridge don't suppose you have a machine which can run Xcode and an iPhone to test with? I'm hamstrung on both fronts. Sidenote, it seems like it would make sense to do a sanity check when pausing and playing also. i.e. ``` commandCenter.playCommand.isEnabled = true commandCenter.playCommand.addTarget { [weak self] event in if (self?.isPlaying()) { self?.pause() } else { self?.play(allowSeekBack: true) } return .success } commandCenter.pauseCommand.isEnabled = true commandCenter.pauseCommand.addTarget { [weak self] event in if (self?.isPlaying()) { self?.pause() } else { self?.play(allowSeekBack: true) } return .success } commandCenter.togglePlayPauseCommand.isEnabled = true commandCenter.togglePlayPauseCommand.addTarget { [weak self] event in if (self?.isPlaying()) { self?.pause() } else { self?.play(allowSeekBack: true) } return .success } ```
Author
Owner

@advplyr commented on GitHub (Jan 2, 2024):

Fixed in v0.9.71-beta

@advplyr commented on GitHub (Jan 2, 2024): Fixed in [v0.9.71-beta](https://github.com/advplyr/audiobookshelf-app/releases/tag/v0.9.71-beta)
Author
Owner

@indiefan commented on GitHub (Apr 8, 2024):

Experiencing this issue specifically with a pair of Bose Ultra Open Earbuds.

If I pause the book from my phone screen, the headphones can resume play, but they can't pause the book while it's playing. All of their other controls work fine.

Worth noting, the headphones play/pause the audible app without issue.

Also worth noting, my airpods play/pause ABS without issue.

It's only the specific combination of these Bose headphones + Pause in ABS that is breaking.

I tried relaunching the app and also deleting it and reinstalling but neither helped.

Server Version: v2.8.1
App Version: 0.9.73

@indiefan commented on GitHub (Apr 8, 2024): Experiencing this issue specifically with a pair of Bose Ultra Open Earbuds. If I pause the book from my phone screen, the headphones can resume play, but they can't pause the book while it's playing. All of their other controls work fine. Worth noting, the headphones play/pause the audible app without issue. Also worth noting, my airpods play/pause ABS without issue. It's only the specific combination of these Bose headphones + Pause in ABS that is breaking. I tried relaunching the app and also deleting it and reinstalling but neither helped. Server Version: v2.8.1 App Version: 0.9.73
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#485