aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-02-15 10:27:26 +0100
committerChocobozzz <me@florianbigard.com>2023-02-15 10:27:26 +0100
commitc9c21fafdb481a4bbb661229f6dc3e2b673ab3c6 (patch)
tree0808a4908f118bd1e20dfcddf2793f2e92f8a235 /client/src/assets/player/shared
parentfd7581b036d9e3580e2e0b1e20d7e4c771d8ff83 (diff)
downloadPeerTube-c9c21fafdb481a4bbb661229f6dc3e2b673ab3c6.tar.gz
PeerTube-c9c21fafdb481a4bbb661229f6dc3e2b673ab3c6.tar.zst
PeerTube-c9c21fafdb481a4bbb661229f6dc3e2b673ab3c6.zip
Fix button link on mobile
Diffstat (limited to 'client/src/assets/player/shared')
-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 }