Similar to the podcast app, I need to keep track of how far the audio has been played. My solution right now is to start a timer that updates a swiftdata object property. This will later be an TimeInterval, but right now I am working with the SwiftData Template. Since a playback can be started from many places in the app, I need to write a function that can be accessed anywhere. None of the places I tried (extensions, global, within class) support @Query so I need to use another way.
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: