Only notify rebuffer to if we are actually rebuffering.

Right now we also notify while we are paused although this doesn't classify as a rebuffer.

PiperOrigin-RevId: 342892667
This commit is contained in:
tonihei 2020-11-17 18:27:27 +00:00 committed by Ian Baker
parent 4936c730c3
commit eb8a57ee46
2 changed files with 3 additions and 2 deletions

View file

@ -993,8 +993,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
setState(Player.STATE_BUFFERING);
if (isRebuffering) {
notifyTrackSelectionRebuffer();
livePlaybackSpeedControl.notifyRebuffer();
}
livePlaybackSpeedControl.notifyRebuffer();
stopRenderers();
}

View file

@ -44,7 +44,8 @@ public interface LivePlaybackSpeedControl {
* Notifies the live playback speed control that a rebuffer occurred.
*
* <p>A rebuffer is defined to be caused by buffer depletion rather than a user action. Hence this
* method is not called during initial or when buffering as a result of a seek operation.
* method is not called during initial buffering or when buffering as a result of a seek
* operation.
*/
void notifyRebuffer();