LeoKlaus / plappa

An Audiobook client for Jellyfin and AudioBookShelf, written in Swift/SwiftUI.
https://plappa.me
159 stars 0 forks source link

[BUG] Seek bar not functional on iOS 18 #129

Closed sevenlayercookie closed 2 weeks ago

sevenlayercookie commented 2 weeks ago

Describe the bug Dragging the seek bar does not change the time location of playing audio.

To Reproduce Steps to reproduce the behavior:

  1. Start playing an audiobook.
  2. Click on the seek bar and drag forward or backwards.
  3. Playing location does not change.

Expected behavior if I drag the seek bar forward to five minutes, for instance, I expect the audiobook to begin playing at five minutes.

Screenshots https://github.com/LeoKlaus/plappa/assets/15989705/542b54b5-6013-4021-809a-43d54913f997 Logs NA

Environment(please complete the following information):

Additional context I don't remember this being an issue with earlier versions of plappa. Also, this seems to be an issue whether the book is streaming from remote server or downloaded locally.

LeoKlaus commented 2 weeks ago

I have noticed the same issue on my phone, but it only occurs on iOS18.

There has been no change to the playback controls in recent updates, so this is probably a bug in iOS18.

LeoKlaus commented 2 weeks ago

I've looked into this and developed a workaround. It'll release to TestFlight once the 1.2.0 update is approved by Apple.

iOS 18 has changed the way the .onLongPressGesture modifier is called in SwiftUI, leading to the progress being reset whenever you let go of the handle.