aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/assets/player/videojs-components/settings-dialog.ts
blob: dd0b1e4721343e080e8893747c34f00af5b141c3 (plain) (tree)




































                                                                         
import videojs, { VideoJsPlayer } from 'video.js'

const Component = videojs.getComponent('Component')

class SettingsDialog extends Component {
  constructor (player: VideoJsPlayer) {
    super(player)

    this.hide()
  }

  /**
   * Create the component's DOM element
   *
   * @return {Element}
   * @method createEl
   */
  createEl () {
    const uniqueId = this.id()
    const dialogLabelId = 'TTsettingsDialogLabel-' + uniqueId
    const dialogDescriptionId = 'TTsettingsDialogDescription-' + uniqueId

    return super.createEl('div', {
      className: 'vjs-settings-dialog vjs-modal-overlay',
      innerHTML: '',
      tabIndex: -1
    }, {
      'role': 'dialog',
      'aria-labelledby': dialogLabelId,
      'aria-describedby': dialogDescriptionId
    })
  }
}

Component.registerComponent('SettingsDialog', SettingsDialog)

export { SettingsDialog }