diff options
Diffstat (limited to 'client/src')
3 files changed, 14 insertions, 2 deletions
diff --git a/client/src/app/+videos/+video-watch/modal/video-share.component.html b/client/src/app/+videos/+video-watch/modal/video-share.component.html index 5e6a2d518..71ae6544f 100644 --- a/client/src/app/+videos/+video-watch/modal/video-share.component.html +++ b/client/src/app/+videos/+video-watch/modal/video-share.component.html | |||
@@ -158,6 +158,13 @@ | |||
158 | i18n-labelText labelText="Display player controls" | 158 | i18n-labelText labelText="Display player controls" |
159 | ></my-peertube-checkbox> | 159 | ></my-peertube-checkbox> |
160 | </div> | 160 | </div> |
161 | |||
162 | <div class="form-group"> | ||
163 | <my-peertube-checkbox | ||
164 | inputName="controls" [(ngModel)]="customizations.peertubeLink" | ||
165 | i18n-labelText labelText="Display PeerTube button link" | ||
166 | ></my-peertube-checkbox> | ||
167 | </div> | ||
161 | </ng-container> | 168 | </ng-container> |
162 | </div> | 169 | </div> |
163 | 170 | ||
diff --git a/client/src/app/+videos/+video-watch/modal/video-share.component.ts b/client/src/app/+videos/+video-watch/modal/video-share.component.ts index b42b775c1..23c562273 100644 --- a/client/src/app/+videos/+video-watch/modal/video-share.component.ts +++ b/client/src/app/+videos/+video-watch/modal/video-share.component.ts | |||
@@ -21,6 +21,7 @@ type Customizations = { | |||
21 | title: boolean | 21 | title: boolean |
22 | warningTitle: boolean | 22 | warningTitle: boolean |
23 | controls: boolean | 23 | controls: boolean |
24 | peertubeLink: boolean | ||
24 | } | 25 | } |
25 | 26 | ||
26 | @Component({ | 27 | @Component({ |
@@ -65,7 +66,8 @@ export class VideoShareComponent { | |||
65 | // Embed options | 66 | // Embed options |
66 | title: true, | 67 | title: true, |
67 | warningTitle: true, | 68 | warningTitle: true, |
68 | controls: true | 69 | controls: true, |
70 | peertubeLink: true | ||
69 | } | 71 | } |
70 | 72 | ||
71 | this.modalService.open(this.modal, { centered: true }) | 73 | this.modalService.open(this.modal, { centered: true }) |
@@ -120,7 +122,8 @@ export class VideoShareComponent { | |||
120 | 122 | ||
121 | title: this.customizations.title, | 123 | title: this.customizations.title, |
122 | warningTitle: this.customizations.warningTitle, | 124 | warningTitle: this.customizations.warningTitle, |
123 | controls: this.customizations.controls | 125 | controls: this.customizations.controls, |
126 | peertubeLink: this.customizations.peertubeLink | ||
124 | } | 127 | } |
125 | } | 128 | } |
126 | } | 129 | } |
diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.ts index 20d97c7e2..115fdfa49 100644 --- a/client/src/assets/player/utils.ts +++ b/client/src/assets/player/utils.ts | |||
@@ -58,6 +58,7 @@ function buildVideoLink (options: { | |||
58 | title?: boolean, | 58 | title?: boolean, |
59 | warningTitle?: boolean, | 59 | warningTitle?: boolean, |
60 | controls?: boolean | 60 | controls?: boolean |
61 | peertubeLink?: boolean | ||
61 | } = {}) { | 62 | } = {}) { |
62 | const { baseUrl } = options | 63 | const { baseUrl } = options |
63 | 64 | ||
@@ -88,6 +89,7 @@ function buildVideoLink (options: { | |||
88 | if (options.title === false) params.set('title', '0') | 89 | if (options.title === false) params.set('title', '0') |
89 | if (options.warningTitle === false) params.set('warningTitle', '0') | 90 | if (options.warningTitle === false) params.set('warningTitle', '0') |
90 | if (options.controls === false) params.set('controls', '0') | 91 | if (options.controls === false) params.set('controls', '0') |
92 | if (options.peertubeLink === false) params.set('peertubeLink', '0') | ||
91 | 93 | ||
92 | let hasParams = false | 94 | let hasParams = false |
93 | params.forEach(() => hasParams = true) | 95 | params.forEach(() => hasParams = true) |