From be7ac6a957fccadf5bcecf0f1fbea197d32bda21 Mon Sep 17 00:00:00 2001 From: Gustl22 Date: Fri, 2 Sep 2022 13:51:15 +0200 Subject: [PATCH] fix(android): emit onPositionChanged when seek is completed (closes #1259) (#1265) --- .../main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/audioplayers_android/android/src/main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt b/packages/audioplayers_android/android/src/main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt index 4228e9639..8a90a87ce 100644 --- a/packages/audioplayers_android/android/src/main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt +++ b/packages/audioplayers_android/android/src/main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt @@ -169,6 +169,10 @@ class AudioplayersPlugin : FlutterPlugin, IUpdateCallback { fun handleSeekComplete(player: WrappedPlayer) { channel.invokeMethod("audio.onSeekComplete", buildArguments(player.playerId)) + channel.invokeMethod( + "audio.onCurrentPosition", + buildArguments(player.playerId, player.getCurrentPosition() ?: 0) + ) } override fun startUpdates() {