Pause background video when lightbox is open and play the background video when the lightbox is closed

Hi. Is there a way to pause a background video element when a lightbox is opened? And play the background video when lightbox is closed. Thanks in advance!

  1. you need to put an ID on the play pause button
  2. The play pause beutton can remain invisible
  3. you need a little javascript that do this :
  • on clic on element that open slider : trigger play pause
  • on clic on element that close the lightbox : trigger plays pause

you could add the same empty classe to the two elemnt that will trigger the play pause so it make the code simplier

Have fun