Constructor
new HiddenSeekButton(parentnon-null, controlsnon-null)
Parameters:
Name | Type | Description |
---|---|---|
parent |
HTMLElement | |
controls |
shaka.ui.Controls |
- Extends:
- Source:
Extends
Members
DOUBLE_TAP_WINDOW_ :number
The amount of time, in seconds, to double-tap detection.
Type:
- number
- Source:
SCROLL_THRESHOLD_ :number
Minimum distance (px) the finger must move during touch to consider it a
scroll rather than a tap.
Type:
- number
- Source:
hasMoved_ :boolean
Keeps track of whether the user has moved enough
to be considered scrolling.
Type:
- boolean
- Source:
hideSeekButtonContainerTimer_ :shaka.util.Timer
Timer used to hide the seek button container. In the timer’s callback,
if the seek value is still 0s, we interpret it as a single tap
(play/pause). If not, we perform the seek.
Type:
- Source:
parent :HTMLElement
Type:
- HTMLElement
- Overrides:
- Implements:
- Source:
touchStartX_ :number
Touch-start coordinates for detecting scroll distance.
Type:
- number
- Source:
Methods
hideSeekButtonContainer_()
If the seek value is zero, interpret it as a single tap (play/pause).
Otherwise, apply the seek and reset.
- Source:
onSeekButtonClick_()
Determines whether this tap is a single tap (leading to play/pause)
or a double tap (leading to a seek). We use a 500 ms window.
- Source:
onTouchEnd_(eventnon-null)
Called when the user lifts the finger from the screen.
If we haven't moved beyond the threshold, treat it as a tap.
Parameters:
Name | Type | Description |
---|---|---|
event |
TouchEvent |
- Source:
onTouchMove_(eventnon-null)
Called when the user moves the finger on the screen.
If the movement exceeds the scroll threshold, we mark this as scrolling.
Parameters:
Name | Type | Description |
---|---|---|
event |
TouchEvent |
- Source:
onTouchStart_(eventnon-null)
Called when the user starts touching the screen.
We record the initial touch coordinates for scroll detection.
Parameters:
Name | Type | Description |
---|---|---|
event |
TouchEvent |
- Source: