]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/assets/player/peertube-link-button.ts
Don't start application until all components were initialized
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / peertube-link-button.ts
CommitLineData
c6352f2c
C
1import { VideoJSComponentInterface, videojsUntyped } from './peertube-videojs-typings'
2
3const Button: VideoJSComponentInterface = videojsUntyped.getComponent('Button')
4class PeerTubeLinkButton extends Button {
5
6 createEl () {
7 return videojsUntyped.dom.createEl('a', {
8 href: window.location.href.replace('embed', 'watch'),
9 innerHTML: 'PeerTube',
10 title: 'Go to the video page',
11 className: 'vjs-peertube-link',
12 target: '_blank'
13 })
14 }
15
16 handleClick () {
17 this.player_.pause()
18 }
19}
20Button.registerComponent('PeerTubeLinkButton', PeerTubeLinkButton)