aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/videojs-components/settings-dialog.ts
blob: 8cd98967f5a9ad6417095a3469ad5710aa0ce675 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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 }