## ErrorDisplay

A display that indicates an error has occurred. This means that the video is unplayable.

## Constructor

#### new ErrorDisplay(player, optionsopt)
`error-display.js`, `line 14`

  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

- ModalDialog

### Methods

#### buildCSSClass() → {string}
`error-display.js`, `line 38`

  Builds the default DOM `className`.

  ##### Returns:

  string -

  The DOM `className` for this object.

  Overrides:
    - ModalDialog#buildCSSClass
  Deprecated:
    - Since version 5.

#### close()
`modal-dialog.js`, `line 229`

  Closes the modal, does nothing if the `ModalDialog` is not open.

  ##### Fires:

  - ModalDialog#event:beforemodalclose
  - ModalDialog#event:modalclose
  Inherited From:
    - ModalDialog#close

#### closeable(valueopt) → {boolean}
`modal-dialog.js`, `line 279`

  Check to see if the `ModalDialog` is closeable via the UI.

  ##### Parameters:

  Name | Type | Attributes | Description
  --- | --- | --- | ---
  `value` | boolean | <optional> | If given as a boolean, it will set the `closeable` option.

  ##### Returns:

  boolean -

  Returns the final value of the closable option.

  Inherited From:
    - ModalDialog#closeable

#### content() → {string}
`error-display.js`, `line 48`

  Gets the localized error message based on the `Player`s error.

  ##### Returns:

  string -

  The `Player`s error message localized or an empty string.

  Overrides:
    - ModalDialog#content

#### createEl() → {Element}
`modal-dialog.js`, `line 88`

  Create the `ModalDialog`'s DOM element

  ##### Returns:

  Element -

  The DOM element that gets created.

  Inherited From:
    - ModalDialog#createEl

#### description() → {string}
`modal-dialog.js`, `line 142`

  Returns the description string for this modal. Primarily used for accessibility.

  ##### Returns:

  string -

  The localized or raw description of this modal.

  Inherited From:
    - ModalDialog#description

#### empty()
`modal-dialog.js`, `line 373`

  Empties the content element. This happens anytime the modal is filled.

  ##### Fires:

  - ModalDialog#event:beforemodalempty
  - ModalDialog#event:modalempty
  Inherited From:
    - ModalDialog#empty

#### fill()
`modal-dialog.js`, `line 311`

  Fill the modal's content element with the modal's "content" option. The content element will be emptied before this change takes place.

  Inherited From:
    - ModalDialog#fill

#### fillWith(contentopt)
`modal-dialog.js`, `line 325`

  Fill the modal's content element with arbitrary content. The content element will be emptied before this change takes place.

  ##### Parameters:

  Name | Type | Attributes | Description
  --- | --- | --- | ---
  `content` | Mixed | <optional> | The same rules apply to this as apply to the `content` option.

  ##### Fires:

  - ModalDialog#event:beforemodalfill
  - ModalDialog#event:modalfill
  Inherited From:
    - ModalDialog#fillWith

#### handleKeyDown()
`modal-dialog.js`, `line 453`

  Keydown handler. Attached when modal is focused.

  ##### Listens to Events:

  - event:keydown
  Inherited From:
    - ModalDialog#handleKeyDown

#### handleKeyPress(e)
`modal-dialog.js`, `line 119`

  Handles `keydown` events on the document, looking for ESC, which closes the modal.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `e` | EventTarget~Event | The keypress that triggered this event.

  ##### Listens to Events:

  - event:keydown
  Inherited From:
    - ModalDialog#handleKeyPress

#### label() → {string}
`modal-dialog.js`, `line 131`

  Returns the label string for this modal. Primarily used for accessibility.

  ##### Returns:

  string -

  the localized or raw label of this modal.

  Inherited From:
    - ModalDialog#label

#### open()
`modal-dialog.js`, `line 159`

  Opens the modal.

  ##### Fires:

  - ModalDialog#event:beforemodalopen
  - ModalDialog#event:modalopen
  Inherited From:
    - ModalDialog#open

#### opened(valueopt) → {boolean}
`modal-dialog.js`, `line 215`

  If the `ModalDialog` is currently open or closed.

  ##### Parameters:

  Name | Type | Attributes | Description
  --- | --- | --- | ---
  `value` | boolean | <optional> | If given, it will open (`true`) or close (`false`) the modal.

  ##### Returns:

  boolean -

  the current open state of the modaldialog

  Inherited From:
    - ModalDialog#opened

### Events

#### beforemodalclose
`modal-dialog.js`, `line 235`

  Fired just before a `ModalDialog` is closed.

  ##### Type:

  - EventTarget~Event
  Inherited From:
    - ModalDialog#event:beforemodalclose

#### beforemodalempty
`modal-dialog.js`, `line 374`

  Fired just before a `ModalDialog` is emptied.

  ##### Type:

  - EventTarget~Event
  Inherited From:
    - ModalDialog#event:beforemodalempty

#### beforemodalfill
`modal-dialog.js`, `line 330`

  Fired just before a `ModalDialog` is filled with content.

  ##### Type:

  - EventTarget~Event
  Inherited From:
    - ModalDialog#event:beforemodalfill

#### beforemodalopen
`modal-dialog.js`, `line 163`

  Fired just before a `ModalDialog` is opened.

  ##### Type:

  - EventTarget~Event
  Inherited From:
    - ModalDialog#event:beforemodalopen

#### modalclose
`modal-dialog.js`, `line 256`

  Fired just after a `ModalDialog` is closed.

  ##### Type:

  - EventTarget~Event
  Inherited From:
    - ModalDialog#event:modalclose

#### modalempty
`modal-dialog.js`, `line 383`

  Fired just after a `ModalDialog` is emptied.

  ##### Type:

  - EventTarget~Event
  Inherited From:
    - ModalDialog#event:modalempty

#### modalfill
`modal-dialog.js`, `line 344`

  Fired just after a `ModalDialog` is filled with content.

  ##### Type:

  - EventTarget~Event
  Inherited From:
    - ModalDialog#event:modalfill

#### modalopen
`modal-dialog.js`, `line 195`

  Fired just after a `ModalDialog` is opened.

  ##### Type:

  - EventTarget~Event
  Inherited From:
    - ModalDialog#event:modalopen