mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-28 15:44:32 +00:00
Change in the slider and added +10 -10 controls
This commit is contained in:
parent
bd23b5f210
commit
d88d9acb60
8 changed files with 497 additions and 228 deletions
|
|
@ -509,6 +509,16 @@ class MusicManager: ObservableObject {
|
|||
}
|
||||
}
|
||||
|
||||
func seek(by offset: TimeInterval) {
|
||||
guard !isLiveStream else { return }
|
||||
let duration = songDuration
|
||||
guard duration > 0 else { return }
|
||||
|
||||
let current = estimatedPlaybackPosition()
|
||||
let target = min(max(0, current + offset), duration)
|
||||
seek(to: target)
|
||||
}
|
||||
|
||||
func openMusicApp() {
|
||||
guard let bundleID = bundleIdentifier else {
|
||||
print("Error: appBundleIdentifier is nil")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue