Class: shaka.media.StallDetector

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

MediaElementImplementation

Interfaces

Implementation

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
Source:

lastAttemptSeconds_ :number

The wall time, in seconds, at which |onStall| was last called. Only meaningful when |stallAttempts_| is greater than zero.
Type:
  • number
Source:

lastUpdateSeconds_ :number

Type:
  • number
Source:

onStall_ :?function(number, number, number)

Type:
  • ?function(number, number, number)
Source:

stallAttempts_ :number

The number of times |onStall| has been called for the current stall. Reset when the playhead makes progress again.
Type:
  • number
Source:

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
Source:

value_ :number

Type:
  • number
Source:

wasMakingProgress_ :boolean

Type:
  • boolean
Source:

Methods

poll() → {boolean}

Have the detector update itself and fire the "on stall" callback if a stall was detected.
Source:
Returns:
True if action was taken.
Type
boolean

release()

Request that this object release all internal references.
Implements:
Source: