aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/assets/player/shared/control-bar/peertube-link-button.ts9
-rwxr-xr-xscripts/i18n/create-custom-files.ts1
2 files changed, 4 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 }
diff --git a/scripts/i18n/create-custom-files.ts b/scripts/i18n/create-custom-files.ts
index 66dbbfcb8..7d03346a0 100755
--- a/scripts/i18n/create-custom-files.ts
+++ b/scripts/i18n/create-custom-files.ts
@@ -64,6 +64,7 @@ const playerKeys = {
64 ' (muted)': ' (muted)', 64 ' (muted)': ' (muted)',
65 '{1} from servers · {2} from peers': '{1} from servers · {2} from peers', 65 '{1} from servers · {2} from peers': '{1} from servers · {2} from peers',
66 'Previous video': 'Previous video', 66 'Previous video': 'Previous video',
67 'Video page (new window)': 'Video page (new window)',
67 'Next video': 'Next video' 68 'Next video': 'Next video'
68} 69}
69Object.assign(playerKeys, videojs) 70Object.assign(playerKeys, videojs)