Class: shaka.media.SegmentPrefetchOperation

This class manages a segment prefetch operation.

Constructor

new SegmentPrefetchOperation(fetchDispatcher)

This class manages a segment prefetch operation.

Parameters:
Name Type Description
fetchDispatcher shaka.media.SegmentPrefetch.FetchDispatcher
Source:

Members

streamDataCallback_ :?function(BufferSource):!Promise

Type:
  • ?function(BufferSource):!Promise
Source:

Methods

abort()

Abort the current operation if exists.
Source:

dispatchFetch(referencenon-null, streamnon-null)

Fetch a segments
Parameters:
Name Type Description
reference shaka.media.SegmentReference | shaka.media.InitSegmentReference
stream shaka.extern.Stream
Source:

getOperation() → {shaka.net.NetworkingEngine.PendingRequest}

Get the operation of prefetched segment if already exists.
Source:
Returns:
op
Type
shaka.net.NetworkingEngine.PendingRequest

setStreamDataCallback(streamDataCallbacknullable)

Parameters:
Name Type Attributes Description
streamDataCallback ?function(BufferSource):!Promise <nullable>
Source: