Add background=1|0 to embed url parameters

Hi,

One of the use cases I use PeerTube for is to self-host videos for websites we build. We often use videos as background on websites.

I would like to request the option to add a " &background=1 " url parameter that would fully disable any visible element on top of the video. The controlBar parameter disables a bunch of them, but the bigplaybutton and the mobile-buttons-overlay still remain active. When you load the page, you see the « play/pause » button for a split second before the video starts.

So when this parameter is active, it would only need to add the following CSS:
.vjs-mobile-buttons-overlay, .vjs-bezels-content, .vjs-big-play-button { display:none !important;}
(and maybe other classes I don’t know about)

Thank you for considering,

Best,
sawine

I ended up « piggybacking » on the « BigPlayBackgroundColor » implementation and edited the embed.js file with this for the time being;

const elementsToHide = document.querySelectorAll(‹ .vjs-mobile-buttons-overlay, .vjs-bezels-content, .vjs-big-play-button, .vjs-bezels-pause, .vjs-bezels-play ›);this.playerManagerOptions.hasBigPlayBackgroundColor()&&elementsToHide.forEach((element) => {element.style.opacity = ‹ 0 ›;});

Hi,

Use controls param: PeerTube Embed API | PeerTube documentation

Example: PeerTube Nightly