Class: shaka.media.PlayheadObserverManager

Constructor

new PlayheadObserverManager(mediaElementnon-null)

Parameters:
Name Type Description
mediaElement HTMLMediaElement
Implements:
Source:

Members

(private, non-null) observers_ :Set.<shaka.media.IPlayheadObserver>

The set of all observers that this manager is responsible for updating. We are using a set to ensure that we don't double update an observer if it is accidentally added twice.
Type:
Source:

(private) pollingLoop_ :shaka.util.Timer

To fire events semi-accurately, poll the observers 4 times a second. This should be frequent enough to trigger an event close enough to its actual occurrence without the user noticing a delay.
Type:
Source:

Methods

manage(observernon-null)

Have the playhead observer manager manage a new observer. This will ensure that observers are only tracked once within the manager. After this call, the manager will be responsible for the life cycle of |observer|.
Parameters:
Name Type Description
observer shaka.media.IPlayheadObserver
Source:

notifyOfSeek()

Notify all the observers that we just seeked.
Source:

(private) pollAllObservers_(seeking)

Parameters:
Name Type Description
seeking boolean
Source:

(export) release()

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