]>
Commit | Line | Data |
---|---|---|
1 | import videojs from 'video.js' | |
2 | ||
3 | const Component = videojs.getComponent('Component') | |
4 | ||
5 | class SettingsDialog extends Component { | |
6 | constructor (player: videojs.Player) { | |
7 | super(player) | |
8 | ||
9 | this.hide() | |
10 | } | |
11 | ||
12 | /** | |
13 | * Create the component's DOM element | |
14 | * | |
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 | }, { | |
26 | role: 'dialog', | |
27 | 'aria-labelledby': dialogLabelId, | |
28 | 'aria-describedby': dialogDescriptionId | |
29 | }) | |
30 | } | |
31 | } | |
32 | ||
33 | Component.registerComponent('SettingsDialog', SettingsDialog) | |
34 | ||
35 | export { SettingsDialog } |