PeerTube/client/src/assets/player/shared/settings/settings-dialog.ts

36 lines
801 B
TypeScript
Raw Normal View History

2020-04-21 11:02:28 +02:00
import videojs from 'video.js'
2020-01-28 17:29:50 +01:00
const Component = videojs.getComponent('Component')
class SettingsDialog extends Component {
2020-04-17 11:20:12 +02:00
constructor (player: videojs.Player) {
2020-01-28 17:29:50 +01:00
super(player)
this.hide()
}
/**
* Create the component's DOM element
*
*/
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
}, {
2021-08-17 14:42:53 +02:00
role: 'dialog',
2020-01-28 17:29:50 +01:00
'aria-labelledby': dialogLabelId,
'aria-describedby': dialogDescriptionId
})
}
}
Component.registerComponent('SettingsDialog', SettingsDialog)
export { SettingsDialog }