aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/shared
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets/player/shared')
-rw-r--r--client/src/assets/player/shared/control-bar/peertube-link-button.ts4
-rw-r--r--client/src/assets/player/shared/manager-options/control-bar-options-builder.ts5
2 files changed, 7 insertions, 2 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 6d83263cc..4687525a9 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
@@ -5,6 +5,8 @@ import { PeerTubeLinkButtonOptions } from '../../types'
5const Button = videojs.getComponent('Button') 5const Button = videojs.getComponent('Button')
6class PeerTubeLinkButton extends Button { 6class PeerTubeLinkButton extends Button {
7 7
8 private instanceName: string
9
8 constructor (player: videojs.Player, options?: PeerTubeLinkButtonOptions) { 10 constructor (player: videojs.Player, options?: PeerTubeLinkButtonOptions) {
9 super(player, options as any) 11 super(player, options as any)
10 } 12 }
@@ -24,7 +26,7 @@ class PeerTubeLinkButton extends Button {
24 private buildElement () { 26 private buildElement () {
25 const el = videojs.dom.createEl('a', { 27 const el = videojs.dom.createEl('a', {
26 href: this.buildLink(), 28 href: this.buildLink(),
27 innerHTML: 'PeerTube', 29 innerHTML: (this.options_ as PeerTubeLinkButtonOptions).instanceName,
28 title: this.player().localize('Video page (new window)'), 30 title: this.player().localize('Video page (new window)'),
29 className: 'vjs-peertube-link', 31 className: 'vjs-peertube-link',
30 target: '_blank' 32 target: '_blank'
diff --git a/client/src/assets/player/shared/manager-options/control-bar-options-builder.ts b/client/src/assets/player/shared/manager-options/control-bar-options-builder.ts
index 72a10eb26..27f366732 100644
--- a/client/src/assets/player/shared/manager-options/control-bar-options-builder.ts
+++ b/client/src/assets/player/shared/manager-options/control-bar-options-builder.ts
@@ -51,7 +51,10 @@ export class ControlBarOptionsBuilder {
51 51
52 if (this.options.peertubeLink === true) { 52 if (this.options.peertubeLink === true) {
53 Object.assign(children, { 53 Object.assign(children, {
54 peerTubeLinkButton: { shortUUID: this.options.videoShortUUID } as PeerTubeLinkButtonOptions 54 peerTubeLinkButton: {
55 shortUUID: this.options.videoShortUUID,
56 instanceName: this.options.instanceName
57 } as PeerTubeLinkButtonOptions
55 }) 58 })
56 } 59 }
57 60