StreamController
Extends:
Constructor Summary
| Public Constructor | ||
| public | 
      
       | 
    |
Member Summary
| Public Members | ||
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
       config: *  | 
    |
| public get | 
       currentLevel: *  | 
    |
| public | 
       demuxer: *  | 
    |
| public | 
      
       | 
    |
| public | 
       fragCurrent: *  | 
    |
| public | 
       fragLastKbps: *  | 
    |
| public | 
      
       | 
    |
| public | 
       fragPlaying: *  | 
    |
| public | 
       fragPrevious: *  | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
       level: *  | 
    |
| public | 
      
       | 
    |
| public | 
       levels: *  | 
    |
| public get | 
      
       | 
    |
| public set | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
       media: *  | 
    |
| public | 
       mediaBuffer: *  | 
    |
| public get | 
      
       | 
    |
| public get | 
       nextLevel: *  | 
    |
| public | 
      
       | 
    |
| public | 
       onvended: *  | 
    |
| public | 
       onvseeked: *  | 
    |
| public | 
       onvseeking: *  | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
       retryDate: *  | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public set | 
      
       | 
    |
| public get | 
       state: *  | 
    |
| public | 
       stats: *  | 
    |
| public | 
       videoBuffer: *  | 
    |
| Private Members | ||
| private | 
      
       | 
    |
| private | 
       _state: *  | 
    |
Method Summary
| Public Methods | ||
| public | 
       doTick()  | 
    |
| public | 
       flushMainBuffer(startOffset: *, endOffset: *)  | 
    |
| public | 
       followingBufferedFrag(frag: *): *  | 
    |
| public | 
       getBufferedFrag(position: *): *  | 
    |
| public | 
      
       | 
    |
| public | 
      
       on immediate level switch end, after new fragment has been buffered: 
  | 
    |
| public | 
      
       try to switch ASAP without breaking video playback: in order to ensure smooth but quick level switching, we need to find the next flushable buffer range we should take into account new segment fetch time  | 
    |
| public | 
       onAudioTrackSwitched(data: *)  | 
    |
| public | 
       onAudioTrackSwitching(data: *)  | 
    |
| public | 
       onBufferAppended(data: *)  | 
    |
| public | 
       onBufferCreated(data: *)  | 
    |
| public | 
      
       | 
    |
| public | 
       onError(data: *)  | 
    |
| public | 
      
       | 
    |
| public | 
       onFragLoaded(data: *)  | 
    |
| public | 
       onFragParsed(data: *)  | 
    |
| public | 
       onFragParsingData(data: *)  | 
    |
| public | 
       onFragParsingInitSegment(data: *)  | 
    |
| public | 
      
       | 
    |
| public | 
       onLevelLoaded(data: *)  | 
    |
| public | 
       onLevelsUpdated(data: *)  | 
    |
| public | 
      
       | 
    |
| public | 
       onManifestParsed(data: *)  | 
    |
| public | 
       onMediaAttached(data: *)  | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
       startLoad(startPosition: *)  | 
    |
| public | 
       stopLoad()  | 
    |
| public | 
      
       | 
    |
| Private Methods | ||
| private | 
      
       | 
    |
| private | 
      
       Checks the health of the buffer and attempts to resolve playback stalls.  | 
    |
| private | 
      
       | 
    |
| private | 
      
       | 
    |
| private | 
       _ensureFragmentAtLivePoint(levelDetails: *, bufferEnd: *, start: *, end: *, fragPrevious: *, fragments: *): *  | 
    |
| private | 
       _fetchPayloadOrEos(pos: *, bufferInfo: *, levelDetails: *)  | 
    |
| private | 
       _findFragment(start: *, fragPreviousLoad: *, fragmentIndexRange: *, fragments: *, bufferEnd: *, end: *, levelDetails: *): *  | 
    |
| private | 
       _getAudioCodec(currentLevel: *): *  | 
    |
| private | 
       _loadFragment(frag: *, levelDetails: *, pos: *, bufferEnd: *)  | 
    |
| private | 
       _loadKey(frag: *, levelDetails: *)  | 
    |
| private | 
       _reduceMaxBufferLength(minLength: *): boolean  | 
    |
| private | 
      
       Seeks to the set startPosition if not equal to the mediaElement's current time.  | 
    |
Inherited Summary
| From class BaseStreamController | ||
| public | 
       demuxer: *  | 
    |
| public | 
       fragCurrent: *  | 
    |
| public | 
       fragPrevious: *  | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
       state: *  | 
    |
| public | 
       computeLivePosition(sliding: *, levelDetails: *): *  | 
    |
| public | 
       doTick()  | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
      
       | 
    |
| public | 
       stopLoad()  | 
    |
| private | 
       _streamEnded(bufferInfo: *, levelDetails: *): boolean  | 
    |
Public Constructors
public constructor() source
Public Members
public audioCodecSwitch: * source
public config: * source
public get currentLevel: * source
public fragLastKbps: * source
public fragPlaying: * source
public gapController: * source
public level: * source
public levelLastLoaded: * source
public levels: * source
public get liveSyncPosition: * source
public set liveSyncPosition source
public media: * source
public mediaBuffer: * source
public get nextBufferedFrag: * source
public get nextLevel: * source
public onvended: * source
public onvseeked: * source
public onvseeking: * source
public previouslyPaused: * source
public retryDate: * source
public stats: * source
public videoBuffer: * source
Private Members
private _liveSyncPosition: * source
private _state: * source
Public Methods
public flushMainBuffer(startOffset: *, endOffset: *) source
Params:
| Name | Type | Attribute | Description | 
| startOffset | * | ||
| endOffset | * | 
public followingBufferedFrag(frag: *): * source
Params:
| Name | Type | Attribute | Description | 
| frag | * | 
Return:
| * | 
public getBufferedFrag(position: *): * source
Params:
| Name | Type | Attribute | Description | 
| position | * | 
Return:
| * | 
public immediateLevelSwitch() source
public immediateLevelSwitchEnd() source
on immediate level switch end, after new fragment has been buffered:
- nudge video decoder by slightly adjusting video currentTime (if currentTime buffered)
 - resume the playback if needed
 
public nextLevelSwitch() source
try to switch ASAP without breaking video playback: in order to ensure smooth but quick level switching, we need to find the next flushable buffer range we should take into account new segment fetch time
public onAudioTrackSwitched(data: *) source
Params:
| Name | Type | Attribute | Description | 
| data | * | 
public onAudioTrackSwitching(data: *) source
Params:
| Name | Type | Attribute | Description | 
| data | * | 
public onBufferAppended(data: *) source
Params:
| Name | Type | Attribute | Description | 
| data | * | 
public onBufferCreated(data: *) source
Params:
| Name | Type | Attribute | Description | 
| data | * | 
public onBufferFlushed() source
public onError(data: *) source
Params:
| Name | Type | Attribute | Description | 
| data | * | 
public onFragLoadEmergencyAborted() source
public onFragLoaded(data: *) source
Params:
| Name | Type | Attribute | Description | 
| data | * | 
public onFragParsed(data: *) source
Params:
| Name | Type | Attribute | Description | 
| data | * | 
public onFragParsingData(data: *) source
Params:
| Name | Type | Attribute | Description | 
| data | * | 
public onFragParsingInitSegment(data: *) source
Params:
| Name | Type | Attribute | Description | 
| data | * | 
public onKeyLoaded() source
public onLevelLoaded(data: *) source
Params:
| Name | Type | Attribute | Description | 
| data | * | 
public onLevelsUpdated(data: *) source
Params:
| Name | Type | Attribute | Description | 
| data | * | 
public onManifestLoading() source
public onManifestParsed(data: *) source
Params:
| Name | Type | Attribute | Description | 
| data | * | 
public onMediaAttached(data: *) source
Params:
| Name | Type | Attribute | Description | 
| data | * | 
public onMediaDetaching() source
public onMediaSeeked() source
public startLoad(startPosition: *) source
Override:
BaseStreamController#startLoadParams:
| Name | Type | Attribute | Description | 
| startPosition | * | 
public swapAudioCodec() source
Private Methods
private _checkAppendedParsed() source
private _checkBuffer() source
Checks the health of the buffer and attempts to resolve playback stalls.
private _checkFragmentChanged() source
private _doTickIdle() source
private _ensureFragmentAtLivePoint(levelDetails: *, bufferEnd: *, start: *, end: *, fragPrevious: *, fragments: *): * source
Params:
| Name | Type | Attribute | Description | 
| levelDetails | * | ||
| bufferEnd | * | ||
| start | * | ||
| end | * | ||
| fragPrevious | * | ||
| fragments | * | 
Return:
| * | 
private _fetchPayloadOrEos(pos: *, bufferInfo: *, levelDetails: *) source
Params:
| Name | Type | Attribute | Description | 
| pos | * | ||
| bufferInfo | * | ||
| levelDetails | * | 
private _findFragment(start: *, fragPreviousLoad: *, fragmentIndexRange: *, fragments: *, bufferEnd: *, end: *, levelDetails: *): * source
Params:
| Name | Type | Attribute | Description | 
| start | * | ||
| fragPreviousLoad | * | ||
| fragmentIndexRange | * | ||
| fragments | * | ||
| bufferEnd | * | ||
| end | * | ||
| levelDetails | * | 
Return:
| * | 
private _getAudioCodec(currentLevel: *): * source
Params:
| Name | Type | Attribute | Description | 
| currentLevel | * | 
Return:
| * | 
private _loadFragment(frag: *, levelDetails: *, pos: *, bufferEnd: *) source
Params:
| Name | Type | Attribute | Description | 
| frag | * | ||
| levelDetails | * | ||
| pos | * | ||
| bufferEnd | * | 
private _loadKey(frag: *, levelDetails: *) source
Params:
| Name | Type | Attribute | Description | 
| frag | * | ||
| levelDetails | * | 
private _reduceMaxBufferLength(minLength: *): boolean source
Params:
| Name | Type | Attribute | Description | 
| minLength | * | 
private _seekToStartPos() source
Seeks to the set startPosition if not equal to the mediaElement's current time.
    
  