From af0302b1b7cfa570d3b4d37e56fd76539f482360 Mon Sep 17 00:00:00 2001 From: Seyed Mostafa Hasani Date: Mon, 5 Aug 2024 13:28:33 +0330 Subject: [PATCH] fix(android): return the value as a float for the getCurrentPosition function (#4054) * fix(android): return value for getCurrentPosition function * fix: remove additional casting --- .../main/java/com/brentvatne/exoplayer/ReactExoplayerView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 8ebba8c5..6f854efb 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -717,7 +717,7 @@ public class ReactExoplayerView extends FrameLayout implements public void getCurrentPosition(Promise promise) { if (player != null) { - double currentPosition = player.getCurrentPosition() / 1000; + float currentPosition = player.getCurrentPosition() / 1000.0f; promise.resolve(currentPosition); } else { promise.reject("PLAYER_NOT_AVAILABLE", "Player is not initialized.");