Skip to content

Commit

Permalink
added ended data to the stop()
Browse files Browse the repository at this point in the history
  • Loading branch information
Digital authored and Digital committed Sep 11, 2024
1 parent 1a2177c commit 54f8bcb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public void onPlaybackStateChanged(int state) {
case Player.STATE_ENDED:
stopUpdatingTime();
stop();
notifyListeners("stop", new JSObject());
notifyListeners("stop", new JSObject().put("ended", true));
break;
}
}
Expand Down Expand Up @@ -262,12 +262,12 @@ public void stop(PluginCall call) {
}

public void stop() {
notifyListeners("stop", new JSObject().put("ended", false));
releasePlayer();
if (service != null) {
// stop may be called before the service is started
service.destroy();
}
notifyListeners("stop", new JSObject());
}

@PluginMethod
Expand Down

0 comments on commit 54f8bcb

Please sign in to comment.