]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/assets/player/videojs-components/settings-dialog.ts
Improve control bar inactivity handling
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / videojs-components / settings-dialog.ts
CommitLineData
512decf3 1import videojs from 'video.js'
f5fcd9f7
C
2
3const Component = videojs.getComponent('Component')
4
5class SettingsDialog extends Component {
7e37e111 6 constructor (player: videojs.Player) {
f5fcd9f7
C
7 super(player)
8
9 this.hide()
10 }
11
12 /**
13 * Create the component's DOM element
14 *
f5fcd9f7
C
15 */
16 createEl () {
17 const uniqueId = this.id()
18 const dialogLabelId = 'TTsettingsDialogLabel-' + uniqueId
19 const dialogDescriptionId = 'TTsettingsDialogDescription-' + uniqueId
20
21 return super.createEl('div', {
22 className: 'vjs-settings-dialog vjs-modal-overlay',
23 innerHTML: '',
24 tabIndex: -1
25 }, {
9df52d66 26 role: 'dialog',
f5fcd9f7
C
27 'aria-labelledby': dialogLabelId,
28 'aria-describedby': dialogDescriptionId
29 })
30 }
31}
32
33Component.registerComponent('SettingsDialog', SettingsDialog)
34
35export { SettingsDialog }