StuckPlayerDetector
@UnstableApi
class StuckPlayerDetector
A utility class to detect whether a Player is stuck.
The class must be used on the thread associated with the getApplicationLooper.
Summary
Nested types |
|---|
interface StuckPlayerDetector.CallbackCallback notified when the player appears stuck. |
Public constructors |
|---|
StuckPlayerDetector(Creates the stuck player detector. |
Public constructors
StuckPlayerDetector
StuckPlayerDetector(
player: Player!,
callback: StuckPlayerDetector.Callback!,
clock: Clock!,
stuckBufferingTimeoutMs: Int,
stuckPlayingTimeoutMs: Int,
stuckPlayingNotEndingTimeoutMs: Int,
stuckSuppressedTimeoutMs: Int
)
Creates the stuck player detector.
Must be called on the player's getApplicationLooper.
| Parameters | |
|---|---|
player: Player! |
The |
callback: StuckPlayerDetector.Callback! |
The |
clock: Clock! |
The |
stuckBufferingTimeoutMs: Int |
The timeout after which the player is assumed stuck buffering if it's buffering and no loading progress is made, in milliseconds. |
stuckPlayingTimeoutMs: Int |
The timeout after which the player is assumed stuck playing if it's playing and no position progress is made, in milliseconds. |
stuckPlayingNotEndingTimeoutMs: Int |
The timeout after which the player is assumed stuck playing if it's playing and it should have ended, in milliseconds. |
stuckSuppressedTimeoutMs: Int |
The timeout after which the player is assumed stuck in a suppression state, in milliseconds. |