      if (addedNode.tagName === 'VIDEO') {
                      setVideoBase64(addedNode);
                      observer.disconnect(); // Stop observing once the video is handled
                    }
                  }
                }
              }
            });
            observer.observe(slide, { childList: true, subtree: true });
          }
        }
      }
      // Setup base64 videos
      Reveal.on( 'ready', fixBase64VideoBackground );
      {% endif %}
    </script>
    {% if env['READTH