Members

(constant) MediaState

Provides an enumeration of possible media states.

(constant) Time :Number

(in seconds) compared to current time within which seeking has no effect. On a sample device (Samsung FoxP 2013), seeking by two seconds worked 90% of the time, but seeking by 2.5 seconds was always seen to work.

Type:
  • Number

(constant) Time :Number

(in seconds) compared to current time within which seeking has no effect. Jumping to time lower than 3s causes error in PlayFrom60 on HLS live - player jumps to previous chunk. Value set to 4s to be ahead of potential wrong player jumps.

Type:
  • Number

(constant) Time :Number

(in seconds) compared to current time within which seeking has no effect. Jumping to time lower than 3s causes error in PlayFrom60 on HLS live - player jumps to previous chunk. Value set to 4s to be ahead of potential wrong player jumps.

Type:
  • Number

(constant) TimelineZeroPoints

Properties
NameTypeDescription
MPD
VIDEO
WALLCLOCK

(constant) TransportControlPosition

Provides an enumeration of on-screen transport control positions, which can be combined as flags.

(constant) WindowTypes :string

Enums for WindowTypes

Type:
  • string

Methods

hasAttribute(el, attribute)

Safely checks if an attribute exists on an element. Browsers < DOM Level 2 do not have 'hasAttribute'

The interesting case - can be null when it isn't there or "", but then can also return "" when there is an attribute with no value. For subs this is good enough. There should not be attributes without values.

Parameters:
NameTypeDescription
elElement

HTML Element

attributeString

attribute to check for

rgbaToRGB()

Checks that the string is an RGBA tuple and returns a RGB Tripple. A string that isn't an RGBA tuple will be returned to the caller.

safeRemoveElement(el)

Safely removes an element from the DOM, simply doing nothing if the node is detached (Has no parent).

Parameters:
NameTypeDescription
el

The Element to remove