Originally created by @indiefan on GitHub (Apr 14, 2024).
Originally assigned to: @indiefan on GitHub.
Steps to reproduce
Install Bose Music app with compatible headphones
Begin playback in ABS with playback speed set to something above 1x
Try to pause via headphone controls
Expected behaviour
Tell us what should happen
ABS should pause playback
Actual behaviour
Tell us what happens
Nothing. Playback continues as if no command was registered.
Environment data
Audiobookshelf Version: 2.8.1
Android App?
iOS App?
iOS Issue
iOS Version: 0.9.73-beta
iPhone model: iPhone 15 Pro Max
Originally created by @indiefan on GitHub (Apr 14, 2024).
Originally assigned to: @indiefan on GitHub.
### Steps to reproduce
1. Install Bose Music app with compatible headphones
2. Begin playback in ABS with playback speed set to something above 1x
3. Try to pause via headphone controls
### Expected behaviour
- Tell us what should happen
- ABS should pause playback
### Actual behaviour
- Tell us what happens
- Nothing. Playback continues as if no command was registered.
### Environment data
Audiobookshelf Version: 2.8.1
- [ ] Android App?
- [X] iOS App?
#### iOS Issue
iOS Version: 0.9.73-beta
iPhone model: iPhone 15 Pro Max
adam
added the bug label 2026-04-24 23:43:59 +02:00
So I can confirm that this issue is mitigated if I change automaticallyWaitsToMinimizeStalling to false. Obviously that's probably not a viable fix since it probably impacts streaming use-cases, but it helps narrow down the interaction between ABS and Bose Music (my guess is that it comes down to timeControlStatus: https://developer.apple.com/documentation/avfoundation/avplayer/1643485-timecontrolstatus)
I also discovered that the player is using an outdated api for controlling rate (pre-defaultRate introduced in iOS 16+). I'm a bit curious if cleaning up the rate issues also resolves this bug, or if they're separate issues.
I suspect (though haven't confirmed) that the rate issue is related to https://github.com/advplyr/audiobookshelf-app/issues/973 and have confirmed that it's trivial to repro issues similar to https://github.com/advplyr/audiobookshelf-app/issues/622 (when you change rate to anything over 0, the player starts playing, but our state-logic hasn't been executed, so the next time you toggle play/pause from the commandCenter, it thinks it needs to start playing and does a short seek as if it was playing from a paused state).
@indiefan commented on GitHub (Apr 14, 2024):
So I can confirm that this issue is mitigated if I change `automaticallyWaitsToMinimizeStalling` to `false`. Obviously that's probably not a viable fix since it probably impacts streaming use-cases, but it helps narrow down the interaction between ABS and Bose Music (my guess is that it comes down to `timeControlStatus`: https://developer.apple.com/documentation/avfoundation/avplayer/1643485-timecontrolstatus)
I also discovered that the player is using an outdated api for controlling `rate` (pre-`defaultRate` introduced in iOS 16+). I'm a bit curious if cleaning up the `rate` issues also resolves this bug, or if they're separate issues.
I suspect (though haven't confirmed) that the `rate` issue is related to https://github.com/advplyr/audiobookshelf-app/issues/973 and have confirmed that it's trivial to repro issues similar to https://github.com/advplyr/audiobookshelf-app/issues/622 (when you change `rate` to anything over 0, the player starts playing, but our state-logic hasn't been executed, so the next time you toggle play/pause from the `commandCenter`, it thinks it needs to start playing and does a short seek as if it was playing from a paused state).
Ended up being slightly different issue. We're always reporting a defaultRate of 1.0. This doesn't currently impact actual playback, because we always immediately override the defaultRate by setting a temporary rate. But when the user listens at a rate above 1x, the Bose Music app sees the reported temporary rate being faster than the reported defaultRate and interprets it as a srubbing event, waiting to reinstate 'pause' until after it completes (which it never does).
The solution to this specific bug is to report the correct defaultRate (which I believe we're holding onto statefully as tmpRate).
@indiefan commented on GitHub (Apr 14, 2024):
Ended up being slightly different issue. We're always reporting a `defaultRate` of 1.0. This doesn't currently impact actual playback, because we always immediately override the `defaultRate` by setting a temporary `rate`. But when the user listens at a rate above 1x, the Bose Music app sees the reported temporary rate being faster than the reported defaultRate and interprets it as a srubbing event, waiting to reinstate 'pause' until after it completes (which it never does).
The solution to this specific bug is to report the correct `defaultRate` (which I believe we're holding onto statefully as `tmpRate`).
A follow up CL should refactor the internal rate-management code to use `defaultRate` and the new notification for rate changes (https://developer.apple.com/documentation/avfoundation/avplayer/3746584-ratedidchangenotification) instead of the generic keyChange observer approach we currently use.
Thanks for finding these edge cases for #622 , nice stuff.
FWIW, this bug still exists on the YouTube app, so hopefully someone from Google comes across this and fixes it 😂
@KaiStarkk commented on GitHub (Nov 8, 2024):
Thanks for finding these edge cases for #622 , nice stuff.
FWIW, this bug still exists on *the YouTube app*, so hopefully someone from Google comes across this and fixes it 😂
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @indiefan on GitHub (Apr 14, 2024).
Originally assigned to: @indiefan on GitHub.
Steps to reproduce
Expected behaviour
Actual behaviour
Environment data
Audiobookshelf Version: 2.8.1
iOS Issue
iOS Version: 0.9.73-beta
iPhone model: iPhone 15 Pro Max
@indiefan commented on GitHub (Apr 14, 2024):
So I can confirm that this issue is mitigated if I change
automaticallyWaitsToMinimizeStallingtofalse. Obviously that's probably not a viable fix since it probably impacts streaming use-cases, but it helps narrow down the interaction between ABS and Bose Music (my guess is that it comes down totimeControlStatus: https://developer.apple.com/documentation/avfoundation/avplayer/1643485-timecontrolstatus)I also discovered that the player is using an outdated api for controlling
rate(pre-defaultRateintroduced in iOS 16+). I'm a bit curious if cleaning up therateissues also resolves this bug, or if they're separate issues.I suspect (though haven't confirmed) that the
rateissue is related to https://github.com/advplyr/audiobookshelf-app/issues/973 and have confirmed that it's trivial to repro issues similar to https://github.com/advplyr/audiobookshelf-app/issues/622 (when you changerateto anything over 0, the player starts playing, but our state-logic hasn't been executed, so the next time you toggle play/pause from thecommandCenter, it thinks it needs to start playing and does a short seek as if it was playing from a paused state).@indiefan commented on GitHub (Apr 14, 2024):
Ended up being slightly different issue. We're always reporting a
defaultRateof 1.0. This doesn't currently impact actual playback, because we always immediately override thedefaultRateby setting a temporaryrate. But when the user listens at a rate above 1x, the Bose Music app sees the reported temporary rate being faster than the reported defaultRate and interprets it as a srubbing event, waiting to reinstate 'pause' until after it completes (which it never does).The solution to this specific bug is to report the correct
defaultRate(which I believe we're holding onto statefully astmpRate).A follow up CL should refactor the internal rate-management code to use
defaultRateand the new notification for rate changes (https://developer.apple.com/documentation/avfoundation/avplayer/3746584-ratedidchangenotification) instead of the generic keyChange observer approach we currently use.@advplyr commented on GitHub (May 21, 2024):
Fixed in v0.9.74-beta
@KaiStarkk commented on GitHub (Nov 8, 2024):
Thanks for finding these edge cases for #622 , nice stuff.
FWIW, this bug still exists on the YouTube app, so hopefully someone from Google comes across this and fixes it 😂