Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ios/Classes/AudioPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class AudioPlayer: NSObject, AVAudioPlayerDelegate {

func seekTo(_ time: Int?, _ result: @escaping FlutterResult) {
if(time != nil) {
player?.currentTime = Double(time! / 1000)
player?.currentTime = TimeInterval(time! / 1000)
Copy link

Copilot AI Oct 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The integer division time! / 1000 still occurs before the TimeInterval conversion, which means millisecond precision is still lost due to integer truncation. Convert to TimeInterval first, then divide: player?.currentTime = TimeInterval(time!) / 1000.0

Suggested change
player?.currentTime = TimeInterval(time! / 1000)
player?.currentTime = TimeInterval(time!) / 1000.0

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattbajorek Please see this.

sendCurrentDuration()
result(true)
} else {
Expand Down