blob: dd0b1e4721343e080e8893747c34f00af5b141c3 (
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
36
37
|
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 }
|