Fixed seeking when streaming

Sometimes, `media` does not know the duration. `getDuration()` loads directly from the `PlaybackService`.
This commit is contained in:
ByteHamster 2020-02-13 13:47:30 +01:00
parent cf5a876dc4
commit 5f9c70df0f
1 changed files with 1 additions and 1 deletions

View File

@ -547,7 +547,7 @@ public class PlaybackController {
*/
public void onSeekBarStopTrackingTouch(SeekBar seekBar, float prog) {
if (playbackService != null && media != null) {
playbackService.seekTo((int) (prog * media.getDuration()));
seekTo((int) (prog * getDuration()));
}
}