Add ability to disable peertube button link in embed
This commit is contained in:
parent
193b9ba7c0
commit
189ab8deb3
3 changed files with 14 additions and 2 deletions
|
@ -158,6 +158,13 @@
|
||||||
i18n-labelText labelText="Display player controls"
|
i18n-labelText labelText="Display player controls"
|
||||||
></my-peertube-checkbox>
|
></my-peertube-checkbox>
|
||||||
</div>
|
</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>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ type Customizations = {
|
||||||
title: boolean
|
title: boolean
|
||||||
warningTitle: boolean
|
warningTitle: boolean
|
||||||
controls: boolean
|
controls: boolean
|
||||||
|
peertubeLink: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -65,7 +66,8 @@ export class VideoShareComponent {
|
||||||
// Embed options
|
// Embed options
|
||||||
title: true,
|
title: true,
|
||||||
warningTitle: true,
|
warningTitle: true,
|
||||||
controls: true
|
controls: true,
|
||||||
|
peertubeLink: true
|
||||||
}
|
}
|
||||||
|
|
||||||
this.modalService.open(this.modal, { centered: true })
|
this.modalService.open(this.modal, { centered: true })
|
||||||
|
@ -120,7 +122,8 @@ export class VideoShareComponent {
|
||||||
|
|
||||||
title: this.customizations.title,
|
title: this.customizations.title,
|
||||||
warningTitle: this.customizations.warningTitle,
|
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,
|
title?: boolean,
|
||||||
warningTitle?: boolean,
|
warningTitle?: boolean,
|
||||||
controls?: boolean
|
controls?: boolean
|
||||||
|
peertubeLink?: boolean
|
||||||
} = {}) {
|
} = {}) {
|
||||||
const { baseUrl } = options
|
const { baseUrl } = options
|
||||||
|
|
||||||
|
@ -88,6 +89,7 @@ function buildVideoLink (options: {
|
||||||
if (options.title === false) params.set('title', '0')
|
if (options.title === false) params.set('title', '0')
|
||||||
if (options.warningTitle === false) params.set('warningTitle', '0')
|
if (options.warningTitle === false) params.set('warningTitle', '0')
|
||||||
if (options.controls === false) params.set('controls', '0')
|
if (options.controls === false) params.set('controls', '0')
|
||||||
|
if (options.peertubeLink === false) params.set('peertubeLink', '0')
|
||||||
|
|
||||||
let hasParams = false
|
let hasParams = false
|
||||||
params.forEach(() => hasParams = true)
|
params.forEach(() => hasParams = true)
|
||||||
|
|
Loading…
Reference in a new issue