Add ability to disable peertube button link in embed
This commit is contained in:
parent
193b9ba7c0
commit
189ab8deb3
|
@ -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>
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ type Customizations = {
|
|||
title: boolean
|
||||
warningTitle: boolean
|
||||
controls: boolean
|
||||
peertubeLink: boolean
|
||||
}
|
||||
|
||||
@Component({
|
||||
|
@ -65,7 +66,8 @@ export class VideoShareComponent {
|
|||
// Embed options
|
||||
title: 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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 = false
|
||||
params.forEach(() => hasParams = true)
|
||||
|
|
Loading…
Reference in New Issue