]>
Commit | Line | Data |
---|---|---|
512decf3 | 1 | import videojs from 'video.js' |
f5fcd9f7 C |
2 | |
3 | const Component = videojs.getComponent('Component') | |
4 | ||
5 | class 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 | ||
33 | Component.registerComponent('SettingsDialog', SettingsDialog) | |
34 | ||
35 | export { SettingsDialog } |