Class: shaka.ui.RangeElement

Constructor

(export) new RangeElement(parentnon-null, controlsnon-null, containerClassNamesnon-null, barClassNamesnon-null)

Parameters:
Name Type Description
parent HTMLElement
controls shaka.ui.Controls
containerClassNames Array.<string>
barClassNames Array.<string>
Implements:
Source:

Members

(protected, non-null) bar :HTMLInputElement

Type:
  • HTMLInputElement
Source:

(protected, non-null) container :HTMLElement

This container is to support IE 11. See detailed notes in less/range_elements.less for a complete explanation.
Type:
  • HTMLElement
Source:

(private) endFakeChangeTimer_ :shaka.util.Timer

Type:
Source:

(private) isChanging_ :boolean

Type:
  • boolean
Source:

Methods

(export) changeTo(value)

Called to implement keyboard-based changes, where this is no clear "end". This will simulate events like onChangeStart(), onChange(), and onChangeEnd() as appropriate.
Parameters:
Name Type Description
value number
Implements:
Source:

(export) getValue() → {number}

Implements:
Source:
Returns:
Type
number

(export) onChange()

Called when a new value is set by user interaction. To be overridden by subclasses.
Implements:
Source:

(export) onChangeEnd()

Called when user interaction ends. To be overridden by subclasses.
Implements:
Source:

(export) onChangeStart()

Called when user interaction begins. To be overridden by subclasses.
Implements:
Source:

(private) setBarValueForTouch_(event)

Synchronize the touch position with the range value. Comes in handy on iOS, where users have to grab the handle in order to start seeking.
Parameters:
Name Type Description
event Event
Source:

(export) setRange(min, max)

Parameters:
Name Type Description
min number
max number
Implements:
Source:

(export) setValue(value)

Parameters:
Name Type Description
value number
Implements:
Source: