diff options
author | Chocobozzz <me@florianbigard.com> | 2023-02-15 10:27:26 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-02-15 10:27:26 +0100 |
commit | c9c21fafdb481a4bbb661229f6dc3e2b673ab3c6 (patch) | |
tree | 0808a4908f118bd1e20dfcddf2793f2e92f8a235 /client/src | |
parent | fd7581b036d9e3580e2e0b1e20d7e4c771d8ff83 (diff) | |
download | PeerTube-c9c21fafdb481a4bbb661229f6dc3e2b673ab3c6.tar.gz PeerTube-c9c21fafdb481a4bbb661229f6dc3e2b673ab3c6.tar.zst PeerTube-c9c21fafdb481a4bbb661229f6dc3e2b673ab3c6.zip |
Fix button link on mobile
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/assets/player/shared/control-bar/peertube-link-button.ts | 9 |
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' | |||
2 | import { buildVideoLink, decorateVideoLink } from '@shared/core-utils' | 2 | import { buildVideoLink, decorateVideoLink } from '@shared/core-utils' |
3 | import { PeerTubeLinkButtonOptions } from '../../types' | 3 | import { PeerTubeLinkButtonOptions } from '../../types' |
4 | 4 | ||
5 | const Button = videojs.getComponent('Button') | 5 | const Component = videojs.getComponent('Component') |
6 | class PeerTubeLinkButton extends Button { | 6 | class 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 | } |