Fix NullPointerException on eventSink
This commit is contained in:
parent
8d15a6c65c
commit
7911f2010f
|
@ -228,7 +228,9 @@ public class AudioPlayer implements MethodCallHandler, Player.EventListener {
|
||||||
event.add(updatePosition = getCurrentPosition());
|
event.add(updatePosition = getCurrentPosition());
|
||||||
event.add(updateTime = System.currentTimeMillis());
|
event.add(updateTime = System.currentTimeMillis());
|
||||||
event.add(Math.max(updatePosition, bufferedPosition));
|
event.add(Math.max(updatePosition, bufferedPosition));
|
||||||
eventSink.success(event);
|
if (eventSink != null) {
|
||||||
|
eventSink.success(event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private long getCurrentPosition() {
|
private long getCurrentPosition() {
|
||||||
|
|
Loading…
Reference in New Issue