fix(android): return the value as a float for the getCurrentPosition function (#4054)
* fix(android): return value for getCurrentPosition function * fix: remove additional casting
This commit is contained in:
parent
74c6dd6279
commit
af0302b1b7
@ -717,7 +717,7 @@ public class ReactExoplayerView extends FrameLayout implements
|
|||||||
|
|
||||||
public void getCurrentPosition(Promise promise) {
|
public void getCurrentPosition(Promise promise) {
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
double currentPosition = player.getCurrentPosition() / 1000;
|
float currentPosition = player.getCurrentPosition() / 1000.0f;
|
||||||
promise.resolve(currentPosition);
|
promise.resolve(currentPosition);
|
||||||
} else {
|
} else {
|
||||||
promise.reject("PLAYER_NOT_AVAILABLE", "Player is not initialized.");
|
promise.reject("PLAYER_NOT_AVAILABLE", "Player is not initialized.");
|
||||||
|
Loading…
Reference in New Issue
Block a user