Ok, I have now found out that you can create a Consent banner with button, with the attributes: class="require-consent" data-src="https://www.youtube-nocookie.com/embed/abcd" data-category="external_media" data-ask-consent="1".
This also works wonderfully, BUT only for 1 element.
I have a YouTube video (iframe) and a google map (div) on my website. Unfortunately, a banner with a consent button is only displayed for the first element.
Only when I comment out the iframe, the banner for the div #standortmap is displayed.
echo '<iframe class="require-consent" data-src="https://www.youtube-nocookie.com/embed/123" data-category="external_media" data-ask-consent="1" data-ask-consent-message="Externere Inhalte von google.com und youtube.com werden aus Datenschutz­gründen erst nach expliziter Zustimmung geladen." data-ask-consent-button-label="Video laden" id="youtube-video" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen width="100%" height="100%" ></iframe> <br><br>';
echo '<div id="standortmap" data-lat="11.123" data-lng="1.123" data-zoom="12" data-category="external_media" data-ask-consent="1" data-ask-consent-message="Externere Inhalte von google.com und youtube.com werden aus Datenschutz­gründen erst nach expliziter Zustimmung geladen." data-ask-consent-button-label="Karte laden" style="height: 300px;"></div>';
Is this an error? Or can the module only display one banner at a time?