From 8d7063ee78e46264d8294a7ffcd8c020b5a3ea7d Mon Sep 17 00:00:00 2001 From: Florian CUNY Date: Sat, 4 Jul 2020 22:30:00 +0200 Subject: [PATCH] Added VideoPlayerService#getPlayBackSpeed --- .../schueller/peertube/service/VideoPlayerService.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/schueller/peertube/service/VideoPlayerService.java b/app/src/main/java/net/schueller/peertube/service/VideoPlayerService.java index d3aa9a8..b01ab4d 100644 --- a/app/src/main/java/net/schueller/peertube/service/VideoPlayerService.java +++ b/app/src/main/java/net/schueller/peertube/service/VideoPlayerService.java @@ -178,11 +178,18 @@ public class VideoPlayerService extends Service { //Playback speed control public void setPlayBackSpeed(float speed) { - Log.v(TAG, "setPlayBackSpeed..."); player.setPlaybackParameters(new PlaybackParameters(speed)); } + /** + * Returns the current playback speed of the player. + * @return the current playback speed of the player. + */ + public float getPlayBackSpeed() { + return player.getPlaybackParameters().speed; + } + public void playVideo() { Context context = this;