aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/src')
-rw-r--r--client/src/assets/player/shared/control-bar/peertube-link-button.ts9
1 files changed, 3 insertions, 6 deletions
diff --git a/client/src/assets/player/shared/control-bar/peertube-link-button.ts b/client/src/assets/player/shared/control-bar/peertube-link-button.ts
index a9b432b8c..45d7ac42f 100644
--- a/client/src/assets/player/shared/control-bar/peertube-link-button.ts
+++ b/client/src/assets/player/shared/control-bar/peertube-link-button.ts
@@ -2,8 +2,8 @@ import videojs from 'video.js'
2import { buildVideoLink, decorateVideoLink } from '@shared/core-utils' 2import { buildVideoLink, decorateVideoLink } from '@shared/core-utils'
3import { PeerTubeLinkButtonOptions } from '../../types' 3import { PeerTubeLinkButtonOptions } from '../../types'
4 4
5const Button = videojs.getComponent('Button') 5const Component = videojs.getComponent('Component')
6class PeerTubeLinkButton extends Button { 6class PeerTubeLinkButton extends Component {
7 7
8 constructor (player: videojs.Player, options?: PeerTubeLinkButtonOptions) { 8 constructor (player: videojs.Player, options?: PeerTubeLinkButtonOptions) {
9 super(player, options as any) 9 super(player, options as any)
@@ -17,10 +17,6 @@ class PeerTubeLinkButton extends Button {
17 this.el().setAttribute('href', this.buildLink()) 17 this.el().setAttribute('href', this.buildLink())
18 } 18 }
19 19
20 handleClick () {
21 this.player().pause()
22 }
23
24 private buildElement () { 20 private buildElement () {
25 const el = videojs.dom.createEl('a', { 21 const el = videojs.dom.createEl('a', {
26 href: this.buildLink(), 22 href: this.buildLink(),
@@ -31,6 +27,7 @@ class PeerTubeLinkButton extends Button {
31 }) 27 })
32 28
33 el.addEventListener('mouseenter', () => this.updateHref()) 29 el.addEventListener('mouseenter', () => this.updateHref())
30 el.addEventListener('click', () => this.player().pause())
34 31
35 return el as HTMLButtonElement 32 return el as HTMLButtonElement
36 } 33 }