Skip to content

Write HTML. Render video. Built for agents.

1.7 KB
Raw Blame
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=1920, height=1080" />
    <title>Camcorder HUD - Demo</title>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
    <style>
      * {
        box-sizing: border-box;
      }

      html,
      body,
      #camcorder-hud-demo {
        width: 1920px;
        height: 1080px;
        margin: 0;
        overflow: hidden;
        background: #050505;
      }

      #ch-demo-backdrop,
      #ch-demo-overlay {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
      }

      #ch-demo-backdrop {
        object-fit: cover;
      }
    </style>
  </head>
  <body>
    <div
      id="camcorder-hud-demo"
      data-composition-id="camcorder-hud-demo"
      data-start="0"
      data-duration="4"
      data-width="1920"
      data-height="1080"
    >
      <img
        id="ch-demo-backdrop"
        class="clip"
        src="demo-backdrop.jpg"
        data-start="0"
        data-duration="4"
        data-track-index="0"
        alt="Creator recording a video"
      />
      <div
        id="ch-demo-overlay"
        data-composition-id="camcorder-hud"
        data-composition-src="camcorder-hud.html"
        data-start="0"
        data-duration="4"
        data-track-index="1"
        data-width="1920"
        data-height="1080"
      ></div>
    </div>

    <script>
      const tl = gsap.timeline({ paused: true });
      tl.to("#ch-demo-backdrop", { scale: 1.02, duration: 4, ease: "none" }, 0);
      window.__timelines = window.__timelines || {};
      window.__timelines["camcorder-hud-demo"] = tl;
    </script>
  </body>
</html>