Constructor
new StallDetector(implementation, stallThresholdSeconds, onStall)
Parameters:
| Name | Type | Description |
|---|---|---|
implementation |
shaka.media.StallDetector.Implementation | |
stallThresholdSeconds |
number | |
onStall |
function | Callback that should be called when a stall is detected. Given the time the playhead is stalled at, the stall duration in seconds, and the retry number (0 for the initial attempt). |
- Implements:
- Source:
Classes
Interfaces
Members
MAX_STALL_RETRIES :number
The maximum number of times the stall detector will retry the
stall-breaking action for the same stall, after the initial attempt,
while the playhead is still making no progress. This bounds the number
of corrective actions taken on platforms where the action never manages
to resume playback.
Type:
- number
implementation_ :shaka.media.StallDetector.Implementation
Type:
lastAttemptSeconds_ :number
The wall time, in seconds, at which |onStall| was last called. Only
meaningful when |stallAttempts_| is greater than zero.
Type:
- number
onStall_ :?function(number, number, number)
Type:
- ?function(number, number, number)
stallAttempts_ :number
The number of times |onStall| has been called for the current stall.
Reset when the playhead makes progress again.
Type:
- number
stallThresholdSeconds_ :number
The amount of time in seconds that we must have the same value of
|value_| before we declare it as a stall.
Type:
- number
Methods
poll() → {boolean}
Have the detector update itself and fire the "on stall" callback if a stall
was detected.
Returns:
True if action was taken.
- Type
- boolean
release()
Request that this object release all internal references.
- Implements:
- Source: