Skip to content

Commit

Permalink
fix: Make sure onComplete resets the position even when not looping (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
luanpotter authored Jun 19, 2022
1 parent 51b4c73 commit 6e6005a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/audioplayers/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
audioplayers_darwin: 387322cb364026a1782298c982693b1b6aa9fa1b
Flutter: 405776dd0763d7e32a8f989d4e271ca1317d080c
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,12 @@ class WrappedMediaPlayer {
if !isPlaying {
return
}

pause()
if looping {
seek(time: toCMTime(millis: 0)) {

seek(time: toCMTime(millis: 0)) {
if self.looping {
self.resume()
} else {
self.isPlaying = false
}
}

Expand Down

0 comments on commit 6e6005a

Please sign in to comment.