Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent seeking from iOS widget #526

Closed
1 of 2 tasks
mediadev123 opened this issue Jan 29, 2023 · 11 comments · Fixed by #1094
Closed
1 of 2 tasks

Prevent seeking from iOS widget #526

mediadev123 opened this issue Jan 29, 2023 · 11 comments · Fixed by #1094
Labels
bug Something isn't working

Comments

@mediadev123
Copy link

Steps to reproduce

  1. Open the look screen/notification center
  2. Seek inside the audiobook

Expected behaviour

When listing to an audiobook, seeking through the whole audiobook from the iOS play widget (the one you see in the notification center/lock screen) is usually unwanted. This behavior can be supported by other apps such as audible which disable the seeking behavior for audiobooks. This is especially true since audiobooks are quite long and seeking through 20 hours is not a good experience using your fingers (seeking through a single chapter and using the chapter control is another story).

This behavior is especially annoying since it's quite easy to do on accident. For my current audiobook, this has happened around 6 times during the first 10 hours of playback, and finding where I left off can be pretty hard.

This is the widget I am talking about:

Dragging through the little white bar is quite easy to do by accident.

Actual behaviour

Trying to scroll/seek should not register at all.

Changing that behavior should be quite easy here:

https://github.com/advplyr/audiobookshelf-app/blob/master/ios/App/Shared/player/AudioPlayer.swift#L601

You should probably change seekForwardCommand, seekBackwardCommand, and/or changePlaybackPositionCommand from MPRemoteCommandCenter. I am not 100% sure, but you should play and find out what each of those commands do. Unfortunately, I don't have access to xcode to compile and test the app myself right now.

Generally speaking, it would be very useful to have a better "history" of playback sessions and an easy way to reset it. Currently, you can only find "last start" inside the settings from the webapp. It would be cool if this view was available for every audiobook directly. It would also be very helpful if large jumps create new sessions. For example, if I skip ahead/backwards for more than two minutes (and my current listen time is more then 60 secs), a new session should be created. This would make recovering a session easier because sometimes the ios very does not sync with the web version (as in, if I listen on the web, the ios app does not update the position, not sure if I will make another issue for that in the future).

Environment data

Audiobookshelf Version:

  • Android App?
  • iOS App?

Android Issue

Android version:

Device model:

Stock or customized system:

iOS Issue

iOS Version: 16.1.2 (probably not relevant)

iPhone model: not relevant

If you have any more questions, please let me know.

@mediadev123 mediadev123 added the bug Something isn't working label Jan 29, 2023
@blampe
Copy link
Contributor

blampe commented Jan 30, 2023

This behavior can be supported by other apps such as audible which disable the seeking behavior for audiobooks.

Do you have a screenshot of what this looks like? My Audible seems to show all the same controls on the lock screen (skip forward/back, duration, etc.).

@mediadev123
Copy link
Author

It does indeed look the same but the progress bar is not interactive. No matter how I drag my finger over it, it only opens the widget center or the camera. With Audiobookshelf, you can drag the bar and very easily change the position which happens quite often when grabbing the phone by the screen (for example when you pull it out of your pocket).

Hope this clarifies it a bit

@lukas2511
Copy link

I'd also love to have seeking disabled, but in my case from the android lockscreen. Happened a few times already that while on the train I accidentally interacted with the slider.

@ajaxbits
Copy link

ajaxbits commented Apr 21, 2023

I also experience this issue and would be grateful to see it resolved/enhanced.

@fidoriel
Copy link
Contributor

Why should this be a setting? I do not see any situation in which changing the position on the widget seems desirable to me. I would make it default behavior with #683

@ajaxbits
Copy link

I would make it default behavior with #683

I agree. I would move to close this issue, or modify it to be a feature request to make scrubbing on the lockscreen configurable.

My original issue has been solved by #683

@fidoriel
Copy link
Contributor

I would make it default behavior with #683

I agree. I would move to close this issue, or modify it to be a feature request to make scrubbing on the lockscreen configurable.

My original issue has been solved by #683

I thought about making it configurable. But I was not able to come up with any valid reason why I would want it scrubbing. Audible does not allow scrubbing either, they also do not allow configuring it. Why making a useless behavior configurable. More work, more docs for what? Maybe @advplyr needs to decide.

@fidoriel
Copy link
Contributor

I took a look at the code, adding the option in the settings seems not much work.

The android pendant seems to be ACTION_SEEK_TO.

Adding allowScrobbingOnWidget in settings, to the json settings parser for swift and Kotlin and a condition what to do when true. I have never done Kotlin, nor a device to test. If a setting is the wished behavior, I can do this in the coming days, but I would prefer a easy fix without a setting, I do not see the benefit of having one.

@ajaxbits
Copy link

useless behavior

As a user, I personally disagree with this. There are times where I'd like to navigate, say, 5, 10, or 15 minutes back in my chapter because I've missed something or become distracted. This is common for me when listening to audiobooks and podcasts.

The lockscreen/control center scrubber is a very convenient way to accomplish this. I do it often with Overcast. And with #683, this becomes viable for me in Audiobookshelf as well.

I'm totally down for whatever the team thinks is best from a usability and maintainability standpoint. I understand that a toggle-able feature won't just appear out of thin air and would require work to implement. But I wanted to state my opinion as a daily user. 👍🏻

@fidoriel
Copy link
Contributor

@ajaxbits maybe you are right. It was easy for iOS, #1094 does now include an option to configure. Default: seeking not possible. I did testing on iOS, also added a untested Android version. Need to find time to make an android emulator setup or someone can test it quickly.

@advplyr
Copy link
Owner

advplyr commented Mar 4, 2024

Added in v0.9.73-beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
6 participants