aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/assets/player/shared/settings/settings-dialog.ts
blob: 8cd98967f5a9ad6417095a3469ad5710aa0ce675 (plain) (tree)
1
2
3
4
5
6
                              



                                                   
                                        







                                       










                                                                         
                     








                                                             
import videojs from 'video.js'

const Component = videojs.getComponent('Component')

class SettingsDialog extends Component {
  constructor (player: videojs.Player) {
    super(player)

    this.hide()
  }

  /**
   * Create the component's DOM element
   *
   */
  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 }