Do not show buffering indicator when playing local file

This commit is contained in:
ByteHamster 2020-03-26 17:12:00 +01:00
parent b4b2b45247
commit 5a3778e2f0
2 changed files with 9 additions and 1 deletions

View File

@ -265,7 +265,11 @@ public class AudioPlayerFragment extends Fragment implements
@Override
public void onBufferUpdate(float progress) {
if (isStreaming()) {
sbPosition.setSecondaryProgress((int) (progress * sbPosition.getMax()));
} else {
sbPosition.setSecondaryProgress(0);
}
}
@Override

View File

@ -743,6 +743,10 @@ public class PlaybackController {
}
}
public boolean isStreaming() {
return playbackService != null && playbackService.isStreaming();
}
private void initServiceNotRunning() {
if (getPlayButton() == null) {
return;