Hi
In order to comply with GDPR, I need to change the iframe tag for videos on the frontend product page, so that it includes a class and also changes the 'src' attribute to 'data-src'. For example the current tag looks like
<iframe frameborder="0" allowfullscreen="1" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" title="YouTube video player" width="100%" height="100%" src="https://www.youtube.com/embed/gNtJ4HdMavo?autoplay=1&rel=0&enablejsapi=1&origin=https%3A%2F%2Fwww.example.com&widgetid=1" id="widget2"> </iframe>
the tag needs to change to
<iframe frameborder="0" allowfullscreen="1" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" title="YouTube video player" width="100%" height="100%" class="optanon-category-VID01" data-src="https://www.youtube.com/embed/gNtJ4HdMavo?autoplay=1&rel=0&enablejsapi=1&origin=https%3A%2F%2Fwww.example.com&widgetid=1" id="widget2"> </iframe>
Does anyone know if this is possible? And if so how do I go about doing it?
Any help with this, would be brill.
Cheers
Rob
Developers mainly use the iframe tag to embed another HTML ... like button), a YouTube video, or an advertising section on your website. ... Here is another example in which we display a button to tweet your web page on Twitter: ... and everything that could help her fellow front-end web developers Download iMessage for PC
An iFrame is a way to embed a web page into the content of another page. This is done using HTML tags