aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/settings/settings-dialog.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-03-14 10:27:05 +0100
committerChocobozzz <me@florianbigard.com>2022-03-14 10:27:05 +0100
commit9af2accee68082e4e1160a4e4a7036451262be02 (patch)
tree50d74a901068c00cf16d65133bc0ddb842293b79 /client/src/assets/player/settings/settings-dialog.ts
parent637a10afb5d539b04a653abbe9b0309eb4cbf7c6 (diff)
downloadPeerTube-9af2accee68082e4e1160a4e4a7036451262be02.tar.gz
PeerTube-9af2accee68082e4e1160a4e4a7036451262be02.tar.zst
PeerTube-9af2accee68082e4e1160a4e4a7036451262be02.zip
Reorganize videojs components
Diffstat (limited to 'client/src/assets/player/settings/settings-dialog.ts')
-rw-r--r--client/src/assets/player/settings/settings-dialog.ts35
1 files changed, 35 insertions, 0 deletions
diff --git a/client/src/assets/player/settings/settings-dialog.ts b/client/src/assets/player/settings/settings-dialog.ts
new file mode 100644
index 000000000..8cd98967f
--- /dev/null
+++ b/client/src/assets/player/settings/settings-dialog.ts
@@ -0,0 +1,35 @@
1import videojs from 'video.js'
2
3const Component = videojs.getComponent('Component')
4
5class 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
33Component.registerComponent('SettingsDialog', SettingsDialog)
34
35export { SettingsDialog }