artpolikarpov / fotorama

A simple, stunning, powerful jQuery gallery.
http://fotorama.io
Other
1.58k stars 380 forks source link

Is it possible to alter the iframe tag for Videos #563

Open deedy-tech opened 3 years ago

deedy-tech commented 3 years ago

Hi We are using Fotorama for displaying Youtube videos.

To conform to GDPR we need to able to control the cookies that YouTube sets and if the client chooses not to have cookies set, then disable the Youtube videos.

To enable us to do this we are using OneTrust's Cookie Management. They require that all the Iframe tags for Youtube are altered so that:

  1. It includes a "class" attribute eg '<iframe frameborder="0" class="optanon-category-VID01" ....'
  2. The 'src attribute is renamed to 'data-src' eg. '<iframe frameborder="0" class="optanon-category-VID01" data-src=...'

Is this possible in Fotorama and if so how?

Cheers Rob