## SeekBar

Seek bar and container for the progress bars. Uses PlayProgressBar as its `bar`.

## Constructor

#### new SeekBar(player, optionsopt)
`control-bar/progress-control/seek-bar.js`, `line 24`

  Creates an instance of this class.

  ##### Parameters:

  Name | Type | Attributes | Description
  --- | --- | --- | ---
  `player` | Player |  | The `Player` that this class should be attached to.
  `options` | Object | <optional> | The key/value store of player options.

### Extends

- Slider

### Members

#### playerEvent :string
`control-bar/progress-control/seek-bar.js`, `line 238`

  Call the update event for this Slider when this event happens on the player.

### Methods

#### calculateDistance(event) → {number}
`slider/slider.js`, `line 221`

  Calculate distance for slider

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `event` | EventTarget~Event | The event that caused this function to run.

  ##### Returns:

  number -

  The current position of the Slider.

          - postition.x for vertical `Slider`s
          - postition.y for horizontal `Slider`s

  Inherited From:
    - Slider#calculateDistance

#### createEl() → {Element}
`control-bar/progress-control/seek-bar.js`, `line 47`

  Create the `Component`'s DOM element

  ##### Returns:

  Element -

  The element that was created.

  Overrides:
    - Slider#createEl

#### getPercent() → {number}
`control-bar/progress-control/seek-bar.js`, `line 95`

  Get the percentage of media played so far.

  ##### Returns:

  number -

  The percentage of media played so far (0 to 1).

#### handleAction(event)
`control-bar/progress-control/seek-bar.js`, `line 183`

  Toggles the playback state of the player This gets called when enter or space is used on the seekbar

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `event` | EventTarget~Event | The `keydown` event that caused this function to be called

#### handleBlur(event)
`slider/slider.js`, `line 274`

  Handle a `blur` event on this `Slider`.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `event` | EventTarget~Event | The `blur` event that caused this function to run.

  ##### Listens to Events:

  - event:blur
  Inherited From:
    - Slider#handleBlur

#### handleClick(event)
`slider/slider.js`, `line 285`

  Listener for click events on slider, used to prevent clicks from bubbling up to parent elements like button menus.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `event` | Object | Event that caused this object to run

  Inherited From:
    - Slider#handleClick

#### handleFocus(event)
`slider/slider.js`, `line 238`

  Handle a `focus` event on this `Slider`.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `event` | EventTarget~Event | The `focus` event that caused this function to run.

  ##### Listens to Events:

  - event:focus
  Inherited From:
    - Slider#handleFocus

#### handleKeyPress(event)
`control-bar/progress-control/seek-bar.js`, `line 200`

  Called when this SeekBar has focus and a key gets pressed down. By default it will call `this.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
  Overrides:
    - Slider#handleKeyPress

#### handleMouseDown(event)
`control-bar/progress-control/seek-bar.js`, `line 115`

  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
  Overrides:
    - Slider#handleMouseDown

#### handleMouseMove(event)
`control-bar/progress-control/seek-bar.js`, `line 132`

  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
  Overrides:
    - Slider#handleMouseMove

#### handleMouseUp(event)
`control-bar/progress-control/seek-bar.js`, `line 152`

  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
  Overrides:
    - Slider#handleMouseUp

#### stepBack()
`control-bar/progress-control/seek-bar.js`, `line 171`

  Move more quickly rewind for keyboard-only users

#### stepForward()
`control-bar/progress-control/seek-bar.js`, `line 164`

  Move more quickly fast forward for keyboard-only users

#### update(eventopt)
`control-bar/progress-control/seek-bar.js`, `line 64`

  Update the seek bar's UI.

  ##### Parameters:

  Name | Type | Attributes | Description
  --- | --- | --- | ---
  `event` | EventTarget~Event | <optional> | The `timeupdate` or `ended` event that caused this to run.

  ##### Listens to Events:

  - Player#event:timeupdate
  - Player#event:ended
  Overrides:
    - Slider#update

#### vertical(boolopt) → {boolean}
`slider/slider.js`, `line 301`

  Get/set if slider is horizontal for vertical

  ##### Parameters:

  Name | Type | Attributes | Description
  --- | --- | --- | ---
  - `bool` | boolean | <optional> | true if slider is vertical,
         - false is horizontal

  ##### Returns:

  boolean -
  - true if slider is vertical, and getting

          - false if the slider is horizontal, and getting

  Inherited From:
    - Slider#vertical

### Events

#### slideractive
`slider/slider.js`, `line 97`

  Triggered when the slider is in an active state

  ##### Type:

  - EventTarget~Event
  Inherited From:
    - Slider#event:slideractive

#### sliderinactive
`slider/slider.js`, `line 144`

  Triggered when the slider is no longer in an active state.

  ##### Type:

  - EventTarget~Event
  Inherited From:
    - Slider#event:sliderinactive