2020-06-22 10:31:54 +00:00
|
|
|
title: $:/plugins/tiddlywiki/consent-banner/youtube
|
|
|
|
tags: $:/tags/Macro
|
|
|
|
|
|
|
|
\define embed-video-with-consent(code)
|
2020-07-02 12:14:51 +00:00
|
|
|
<$set name="tv-block-embedded-content" value="no">
|
2020-06-22 10:31:54 +00:00
|
|
|
<$reveal state="$:/state/consent-banner/accepted" type="match" text="yes" tag="div">
|
|
|
|
<iframe width="560" height="315" src="https://www.youtube.com/embed/$code$" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
|
|
|
|
</$reveal>
|
|
|
|
<$reveal state="$:/state/consent-banner/accepted" type="nomatch" text="yes" tag="div">
|
|
|
|
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/$code$" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
|
|
|
|
</$reveal>
|
2020-07-02 12:14:51 +00:00
|
|
|
</$set>
|
2020-06-22 10:31:54 +00:00
|
|
|
\end
|
|
|
|
|
|
|
|
! Macro source
|
|
|
|
|
|
|
|
<$codeblock code={{$:/plugins/tiddlywiki/consent-banner/youtube}}/>
|
|
|
|
|
|
|
|
! Example
|
|
|
|
|
|
|
|
<<embed-video-with-consent KtCUr83XgyE>>
|