new SeekBar(player [, options])
Creates an instance of this class.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
player |
Player | The |
|
options |
Object |
<optional> |
The key/value store of player options. |
Extends
- Slider
Members
-
playerEvent :string
-
Call the update event for this Slider when this event happens on the player.
Type:
- string
Methods
-
createEl()
-
Create the
Component
's DOM elementReturns:
The element that was created.
- Type
- Element
-
disable()
-
disable
-
enable()
-
enable
-
getPercent()
-
Get the percentage of media played so far.
Returns:
The percentage of media played so far (0 to 1).
- Type
- number
-
handleAction(event)
-
Toggles the playback state of the player
This gets called when enter or space is used on the seekbarParameters:
Name Type Description event
EventTarget~Event The
keydown
event that caused this function to be called -
handleEnded( [event])
-
We want the seek bar to be full on ended
no matter what the actual internal values are. so we force it.Parameters:
Name Type Argument Description event
EventTarget~Event <optional>
The
timeupdate
orended
event that caused this to run.Listens to Events:
-
handleKeyPress(event)
-
Called when this SeekBar has focus and a key gets pressed down. By
default it will callthis.handleAction
when the key is space or enter.Parameters:
Name Type Description event
EventTarget~Event The
keydown
event that caused this function to be called.Listens to Events:
- event:keydown
-
handleMouseDown(event)
-
Handle mouse down on seek bar
Parameters:
Name Type Description event
EventTarget~Event The
mousedown
event that caused this to run.Listens to Events:
- event:mousedown
-
handleMouseMove(event)
-
Handle mouse move on seek bar
Parameters:
Name Type Description event
EventTarget~Event The
mousemove
event that caused this to run.Listens to Events:
- event:mousemove
-
handleMouseUp(event)
-
Handle mouse up on seek bar
Parameters:
Name Type Description event
EventTarget~Event The
mouseup
event that caused this to run.Listens to Events:
- event:mouseup
-
onSeekInputTimeout_(newTime)
-
on Seek Input Timeout
Parameters:
Name Type Description newTime
number -
setCurrentTime(newTime)
-
setCurrentTime
Parameters:
Name Type Description newTime
number -
stepBack()
-
Move more quickly rewind for keyboard-only users
-
stepForward()
-
Move more quickly fast forward for keyboard-only users
-
throttleSetCurrentTime(newTime)
-
Throttle Set CurrentTime
Parameters:
Name Type Description newTime
number The new currentTime value
-
update( [event], data)
-
Update the seek bar's UI.
Parameters:
Name Type Argument Description event
EventTarget~Event <optional>
The
timeupdate
orended
event that caused this to run.data
Object Listens to Events:
- Player#event:timeupdate
Returns:
The current percent at a number from 0-1
- Type
- number
-
updateMarkers( [event], data)
-
Update the marker displays
Parameters:
Name Type Argument Description event
EventTarget~Event <optional>
data
Object