1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 01:39:37 +02:00

Add control bar option for peertube player

This commit is contained in:
Chocobozzz 2022-05-20 09:59:53 +02:00
parent a871d2a273
commit 60f013e103
No known key found for this signature in database
GPG key ID: 583A612D890159BE
9 changed files with 81 additions and 5 deletions

View file

@ -37,7 +37,10 @@ export class PeerTubeEmbed {
api: PeerTubeEmbedApi = null
autoplay: boolean
controls: boolean
controlBar: boolean
muted: boolean
loop: boolean
subtitle: string
@ -295,7 +298,10 @@ export class PeerTubeEmbed {
const params = new URL(window.location.toString()).searchParams
this.autoplay = this.getParamToggle(params, 'autoplay', false)
this.controls = this.getParamToggle(params, 'controls', true)
this.controlBar = this.getParamToggle(params, 'controlBar', true)
this.muted = this.getParamToggle(params, 'muted', undefined)
this.loop = this.getParamToggle(params, 'loop', false)
this.title = this.getParamToggle(params, 'title', true)
@ -539,7 +545,10 @@ export class PeerTubeEmbed {
common: {
// Autoplay in playlist mode
autoplay: alreadyHadPlayer ? true : this.autoplay,
controls: this.controls,
controlBar: this.controlBar,
muted: this.muted,
loop: this.loop,