From f5b3ce92bc96d0aff0bdf03a55913d7c79c56a7f Mon Sep 17 00:00:00 2001 From: Ryan Heise Date: Wed, 5 Feb 2020 22:47:10 +1100 Subject: [PATCH] Set buffering to false on dispose --- android/src/main/java/com/ryanheise/just_audio/AudioPlayer.java | 1 + ios/Classes/AudioPlayer.m | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/ryanheise/just_audio/AudioPlayer.java b/android/src/main/java/com/ryanheise/just_audio/AudioPlayer.java index dc7ad1f..581929c 100644 --- a/android/src/main/java/com/ryanheise/just_audio/AudioPlayer.java +++ b/android/src/main/java/com/ryanheise/just_audio/AudioPlayer.java @@ -323,6 +323,7 @@ public class AudioPlayer implements MethodCallHandler, Player.EventListener { public void dispose() { player.release(); + buffering = false; transition(PlaybackState.none); } diff --git a/ios/Classes/AudioPlayer.m b/ios/Classes/AudioPlayer.m index 1c2d2f5..b7caad6 100644 --- a/ios/Classes/AudioPlayer.m +++ b/ios/Classes/AudioPlayer.m @@ -323,7 +323,7 @@ - (void)dispose { if (_state != none) { [self stop]; - [self setPlaybackState:none]; + [self setPlaybackBufferingState:none buffering:NO]; } }