GapController
Constructor Summary
| Public Constructor | ||
| public |  | |
Member Summary
| Public Members | ||
| public | config: HlsConfig | |
| public |  | |
| public |  | |
| public | media: * | |
| public |  | |
| public |  | |
| public |  | |
| public |  | |
| public | stalled: * | |
Method Summary
| Public Methods | ||
| public | destroy() | |
| public | Checks if the playhead is stuck within a gap, and if so, attempts to free it. | |
| Private Methods | ||
| private | _reportStall(bufferInfo: BufferInfo) Triggers a BUFFER_STALLED_ERROR event, but only once per stall period. | |
| private | _tryFixBufferStall(bufferInfo: BufferInfo, stalledDurationMs: number) Detects and attempts to fix known buffer stalling issues. | |
| private | Attempts to fix buffer stalls by advancing the mediaElement's current time by a small amount. | |
| private | _trySkipBufferHole(partial: undefined): number Attempts to fix buffer stalls by jumping over known gaps caused by partial fragments | |
Public Constructors
public constructor() source
Public Members
public config: HlsConfig source
public fragmentTracker: FragmentTracker source
public media: * source
public stalled: * source
Public Methods
public destroy() source
public poll(lastCurrentTime: number, activeFrag: undefined) source
Checks if the playhead is stuck within a gap, and if so, attempts to free it. A gap is an unbuffered range between two buffered ranges (or the start and the first buffered range).
Private Methods
private _reportStall(bufferInfo: BufferInfo) source
Triggers a BUFFER_STALLED_ERROR event, but only once per stall period.
Params:
| Name | Type | Attribute | Description | 
| bufferInfo | BufferInfo | 
private _tryFixBufferStall(bufferInfo: BufferInfo, stalledDurationMs: number) source
Detects and attempts to fix known buffer stalling issues.
Params:
| Name | Type | Attribute | Description | 
| bufferInfo | BufferInfo | ||
| stalledDurationMs | number | 
private _tryNudgeBuffer() source
Attempts to fix buffer stalls by advancing the mediaElement's current time by a small amount.
 
    
  