Class: shaka.media.GapJumpingController

Constructor

new GapJumpingController(videonon-null, timelinenon-null, config, onEvent)

Creates a new GapJumpingController that handles jumping gaps that appear within the content. This will only jump gaps between two buffered ranges, so we should not have to worry about the availability window.
Parameters:
Name Type Description
video HTMLMediaElement
timeline shaka.media.PresentationTimeline
config shaka.extern.StreamingConfiguration
onEvent function(!Event) Called when an event is raised to be sent to the application.
Implements:
Source:

Members

(static, constant) BROWSER_GAP_TOLERANCE

The limit, in seconds, for the gap size that we will assume the browser will handle for us.
Source:

(private) didFireLargeGap_ :boolean

Type:
  • boolean
Source:

(private, nullable) gapJumpTimer_ :shaka.util.Timer

Type:
Source:

(private) hadSegmentAppended_ :boolean

Type:
  • boolean
Source:

(private, nullable) onEvent_ :?function(!Event)

Type:
  • ?function(!Event)
Source:

(private) prevReadyState_ :number

Type:
  • number
Source:

(private) seekingEventReceived_ :boolean

Type:
  • boolean
Source:

(private) stallDetector_ :shaka.media.StallDetector

Used to detect stalls and to "jump-start" playback when a stall is detected. We will update it manually to avoid conflicts with gap-jumping.
Type:
Source:

Methods

(private) onPollGapJump_()

Called on a recurring timer to check for gaps in the media. This is also called in a 'waiting' event.
Source:

onSeeking()

Called when a seek has started.
Source:

onSegmentAppended()

Called when a segment is appended by StreamingEngine, but not when a clear is pending. This means StreamingEngine will continue buffering forward from what is buffered. So we know about any gaps before the start.
Source:

(export) release()

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