Fix buffering indicator sometimes sticking

We currently have no method to actively query the buffering state.
Remove indicator if we can no longer receive updates.
This commit is contained in:
ByteHamster 2020-09-29 11:18:03 +02:00
parent 6b173d0c1a
commit c2b0a356ac
2 changed files with 2 additions and 0 deletions

View File

@ -102,6 +102,7 @@ public class VideoplayerActivity extends MediaplayerActivity {
if (!PictureInPictureUtil.isInPictureInPictureMode(this)) {
videoControlsHider.stop();
}
progressIndicator.setVisibility(View.GONE); // Controller released; we will not receive buffering updates
}
@Override

View File

@ -386,6 +386,7 @@ public class AudioPlayerFragment extends Fragment implements
super.onStop();
controller.release();
controller = null;
progressIndicator.setVisibility(View.GONE); // Controller released; we will not receive buffering updates
EventBus.getDefault().unregister(this);
if (disposable != null) {
disposable.dispose();