The title says it all, I'm using SwiftUI for multiplatform app, and I'm using ScrollView
in it.
My app has player bar which tracks the AVPlayer
's current time. I made it using .offset(y:)
.
The problem here is that whenever I change offset, the scroll gesture suddenly doesn't work on macOS.
Video link: https://streamable.com/euzuwk
But weirdly, it works on Mac Catalyst version.
Video link: https://streamable.com/oq01mt
The source code is on GitHub.
I tried using Animation, but it made the player bar and music out of sync.
So right now I made a publisher based on AVPlayer
's addPeriodicTimeObserver
and receiving the time from AVPlayer
but now the scroll doesn't work as expected.