Please disable your ad blocker.
The only ads on this site are discreet (sidebar on desktop, below the content on mobile).They do not interfere with reading and may even offer you benefits (discounts, free months…).
Brivembed
Project description
Embed videos, pens, demos and other external content without loading third-party iframes before user consent.
- Does not create the iframe before consent
- Supports YouTube, Dailymotion, CodePen and GitHub Pages, with the option to add your own services
- Displays a privacy-friendly placeholder
- Lets you easily add a fullscreen button when the service does not provide one
- Lets users allow one piece of content once, or always allow a service
- Does not depend on any external service
Useful links
- Full tutorial
- Support and suggestions [ discord.gg ]
- License (in english) AGPL v3.0 [ gnu.org ]
Demo
Example with YouTube
<div class="brivembed" data-provider="youtube" data-code="IU0q-RXET8c"></div>
Example with Dailymotion
<div class="brivembed" data-provider="dailymotion" data-code="x2khcmq"></div>
Example with CodePen
<div class="brivembed" data-provider="codepen" data-user="BreatFR" data-code="bGbxNm"></div>
Example with GitHub Pages
<div class="brivembed" data-fullscreen="1" data-provider="githubpages" data-src="https://androdawton.github.io/stellaris-tech-tree/cetus-4.3.2/"></div>
This example also uses the data-fullscreen="1" attribute to add a button that lets users switch the content to fullscreen.
Quick install
- Add the CSS, which you can of course customize
- Add the JavaScript
- Replace your iframes with the corresponding HTML code
Download
Do you find this project useful? You can support its development using the buttons in the page footer.
Comments