Commit eb8a57ee by tonihei Committed by Ian Baker

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
parent 4936c730
...@@ -993,8 +993,8 @@ import java.util.concurrent.atomic.AtomicBoolean; ...@@ -993,8 +993,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
setState(Player.STATE_BUFFERING); setState(Player.STATE_BUFFERING);
if (isRebuffering) { if (isRebuffering) {
notifyTrackSelectionRebuffer(); notifyTrackSelectionRebuffer();
livePlaybackSpeedControl.notifyRebuffer();
} }
livePlaybackSpeedControl.notifyRebuffer();
stopRenderers(); stopRenderers();
} }
......
...@@ -44,7 +44,8 @@ public interface LivePlaybackSpeedControl { ...@@ -44,7 +44,8 @@ public interface LivePlaybackSpeedControl {
* Notifies the live playback speed control that a rebuffer occurred. * 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 * <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(); void notifyRebuffer();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment