Home Reference Source
import TaskLoop from 'hls.js/src/task-loop.js'
public class | source

TaskLoop

Extends:

EventHandler → TaskLoop

Constructor Summary

Public Constructor
public

Member Summary

Private Members
private
private

Method Summary

Public Methods
public
public
public abstract

doTick()

For subclass to implement task logic

public
public
public

tick(forceAsync: Wether to force async): boolean

Inherited Summary

From class EventHandler
public
public

hls: *

public
public
public
public

onEvent(event: *, data: *)

arguments: event (string), data (any)

public

onEventGeneric(event: *, data: *)

public
public
public
public

Public Constructors

public constructor() source

Override:

EventHandler#constructor

Private Members

private _tickCallCount: number source

private _tickInterval: * source

Public Methods

public clearInterval(): boolean source

Return:

boolean

True when interval was cleared, false when none was set (no effect)

public destroy() source

Override:

EventHandler#destroy

public abstract doTick() source

For subclass to implement task logic

public hasInterval(): boolean source

Return:

boolean

public setInterval(millis: number): boolean source

Params:

NameTypeAttributeDescription
millis number

Interval time (ms)

Return:

boolean

True when interval has been scheduled, false when already scheduled (no effect)

public tick(forceAsync: Wether to force async): boolean source

Params:

NameTypeAttributeDescription
forceAsync Wether to force async

Return:

boolean

True when async, false when sync