]>
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 | * | |
15 | * @return {Element} | |
16 | * @method createEl | |
17 | */ | |
18 | createEl () { | |
19 | const uniqueId = this.id() | |
20 | const dialogLabelId = 'TTsettingsDialogLabel-' + uniqueId | |
21 | const dialogDescriptionId = 'TTsettingsDialogDescription-' + uniqueId | |
22 | ||
23 | return super.createEl('div', { | |
24 | className: 'vjs-settings-dialog vjs-modal-overlay', | |
25 | innerHTML: '', | |
26 | tabIndex: -1 | |
27 | }, { | |
28 | 'role': 'dialog', | |
29 | 'aria-labelledby': dialogLabelId, | |
30 | 'aria-describedby': dialogDescriptionId | |
31 | }) | |
32 | } | |
33 | } | |
34 | ||
35 | Component.registerComponent('SettingsDialog', SettingsDialog) | |
36 | ||
37 | export { SettingsDialog } |