ActivityPub-federated video streaming platform using P2P directly in your web browser
Add ability to disable peertube button link in embed
Chocobozzz189ab8deb362
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.htmlindex 5e6a2d5188..71ae6544f3 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 @@i18n-labelText labelText="Display player controls"></my-peertube-checkbox></div>++ <div class="form-group">+ <my-peertube-checkbox+ inputName="controls" [(ngModel)]="customizations.peertubeLink"+ i18n-labelText labelText="Display PeerTube button link"+ ></my-peertube-checkbox>+ </div></ng-container></div>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.tsindex b42b775c13..23c562273f 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 = {title: booleanwarningTitle: booleancontrols: boolean+ peertubeLink: boolean}@Component({@@ -65,7 +66,8 @@ export class VideoShareComponent {// Embed optionstitle: true,warningTitle: true,- controls: true+ controls: true,+ peertubeLink: true}this.modalService.open(this.modal, { centered: true })@@ -120,7 +122,8 @@ export class VideoShareComponent {title: this.customizations.title,warningTitle: this.customizations.warningTitle,- controls: this.customizations.controls+ controls: this.customizations.controls,+ peertubeLink: this.customizations.peertubeLink}}}diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.tsindex 20d97c7e21..115fdfa49e 100644--- a/client/src/assets/player/utils.ts+++ b/client/src/assets/player/utils.ts@@ -58,6 +58,7 @@ function buildVideoLink (options: {title?: boolean,warningTitle?: boolean,controls?: boolean+ peertubeLink?: boolean} = {}) {const { baseUrl } = options@@ -88,6 +89,7 @@ function buildVideoLink (options: {if (options.title === false) params.set('title', '0')if (options.warningTitle === false) params.set('warningTitle', '0')if (options.controls === false) params.set('controls', '0')+ if (options.peertubeLink === false) params.set('peertubeLink', '0')let hasParams = falseparams.forEach(() => hasParams = true)