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:
parent
6b173d0c1a
commit
c2b0a356ac
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue