From 3bcb368bb31198372a4ad45a5c3d3cc72a4201e4 Mon Sep 17 00:00:00 2001 From: Jonas Kalderstam Date: Fri, 13 Sep 2019 23:22:13 +0200 Subject: [PATCH] Check the media's own speed before loading video speed --- .../core/service/playback/LocalPSMP.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java index 6a694eb6f..fe3b5223e 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java @@ -307,17 +307,19 @@ public class LocalPSMP extends PlaybackServiceMediaPlayer { Log.d(TAG, "Audiofocus successfully requested"); Log.d(TAG, "Resuming/Starting playback"); acquireWifiLockIfNecessary(); - float playbackSpeed; - if (media.getMediaType() == MediaType.VIDEO) { - playbackSpeed = UserPreferences.getVideoPlaybackSpeed(); - } else if (media instanceof FeedMedia) { + + float playbackSpeed = SPEED_USE_GLOBAL; + if (media instanceof FeedMedia) { playbackSpeed = ((FeedMedia) media).getMediaPlaybackSpeed(); - } else { - playbackSpeed = SPEED_USE_GLOBAL; } if (playbackSpeed == SPEED_USE_GLOBAL) { - playbackSpeed = UserPreferences.getPlaybackSpeed(); + if (media.getMediaType() == MediaType.VIDEO) { + playbackSpeed = UserPreferences.getVideoPlaybackSpeed(); + } else { + playbackSpeed = UserPreferences.getPlaybackSpeed(); + } } + setPlaybackParams(playbackSpeed, UserPreferences.isSkipSilence()); setVolume(UserPreferences.getLeftVolume(), UserPreferences.getRightVolume());