Fix play on iOS (grumph)
[oweals/peertube.git] / client / src / assets / player / peertube-link-button.ts
1 import { VideoJSComponentInterface, videojsUntyped } from './peertube-videojs-typings'
2
3 const Button: VideoJSComponentInterface = videojsUntyped.getComponent('Button')
4 class 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 }
20 Button.registerComponent('PeerTubeLinkButton', PeerTubeLinkButton)