Class: MediaNode

MediaNode()

new MediaNode()

Initialise an instance of a MediaNode. This should not be called directly, but extended by other Node Types which use a HTMLMediaElement.

Source:

Members

_buffering

  • Check if the element is waiting on the network to continue playback

Properties:
Type Description
Boolean
Source:

_buffering

  • Check if the element is waiting on the network to continue playback

Properties:
Type Description
Boolean
Source:

_element

Get a cached video element and also pass this instance so the cache can access the current play state.

Source:

_element

Get a cached video element and also pass this instance so the cache can access the current play state.

Source:

Methods

_load()

_load has two functions:

  1. _triggerLoad which ensures the element has the correct src and is at the correct currentTime, so that the browser can start fetching media.

  2. shouldPollForElementReadyState waits until the element has a "readState" that signals there is enough media to start playback. This is a little confusing as currently structured. We're using the _update loop to poll the _load function which checks the element status. When ready we fire off the "loaded callback"

Source:

_load()

_load has two functions:

  1. _triggerLoad which ensures the element has the correct src and is at the correct currentTime, so that the browser can start fetching media.

  2. shouldPollForElementReadyState waits until the element has a "readState" that signals there is enough media to start playback. This is a little confusing as currently structured. We're using the _update loop to poll the _load function which checks the element status. When ready we fire off the "loaded callback"

Source:

MediaNode()

new MediaNode()

Initialise an instance of a MediaNode. This should not be called directly, but extended by other Node Types which use a HTMLMediaElement.

Source:

Members

_buffering

  • Check if the element is waiting on the network to continue playback

Properties:
Type Description
Boolean
Source:

_buffering

  • Check if the element is waiting on the network to continue playback

Properties:
Type Description
Boolean
Source:

_element

Get a cached video element and also pass this instance so the cache can access the current play state.

Source:

_element

Get a cached video element and also pass this instance so the cache can access the current play state.

Source:

Methods

_load()

_load has two functions:

  1. _triggerLoad which ensures the element has the correct src and is at the correct currentTime, so that the browser can start fetching media.

  2. shouldPollForElementReadyState waits until the element has a "readState" that signals there is enough media to start playback. This is a little confusing as currently structured. We're using the _update loop to poll the _load function which checks the element status. When ready we fire off the "loaded callback"

Source:

_load()

_load has two functions:

  1. _triggerLoad which ensures the element has the correct src and is at the correct currentTime, so that the browser can start fetching media.

  2. shouldPollForElementReadyState waits until the element has a "readState" that signals there is enough media to start playback. This is a little confusing as currently structured. We're using the _update loop to poll the _load function which checks the element status. When ready we fire off the "loaded callback"

Source: