Sample Page

This is an example page. It’s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Responsive 16:9 Chat App – Dynamic Models (Final)</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Optional Poppins font -->
  <link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet">
  <style>
    /* Reset body to remove default margins/padding; set background & no scrolling */
    html, body {
      margin: 0;
      padding: 0;
      background: #000;
      font-family: 'Poppins', sans-serif;
      overflow: hidden;
    }
    /* Centered container, up to 900px wide, no extra padding */
    .app-frame {
      width: 100%;
      max-width: 900px;
      margin: 0 auto; /* center horizontally if wider than phone */
      border: 2px solid #444;
      background: #000;
      position: relative;
      box-sizing: border-box;
    }
    /*
      The 16:9 container using aspect-ratio 
      (modern browsers). For older browsers, you can revert to the padding-bottom hack.
    */
    .video-container {
      position: relative;
      width: 100%;
      aspect-ratio: 16 / 9; /* Enforce 16:9 ratio */
      background: #000;
      overflow: hidden;
    }
    /* Partner iframe covers container */
    #partnerIframe {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border: none;
      transition: opacity 0.3s ease;
      opacity: 1;
      visibility: visible;
      background-color: #000;
    }
    /* “Looking for partner…” overlay message */
    #partnerMessage {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: #000;
      color: #fff;
      font-size: 2em;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: opacity 0.3s ease;
      opacity: 0;
      visibility: hidden;
    }
    /*
      Visitor (local) cam pinned in the top-right corner. 
      On desktop: ~7% smaller (186x140), pinned at top:7px; right:7px.
    */
    #localVideo {
      position: absolute;
      top: 7px;
      right: 7px;
      width: 186px;
      height: 140px;
      object-fit: cover;
      border: 2px solid #fff;
      border-radius: 4px;
      background-color: #000;
      z-index: 2;
    }
    /* On mobile, scale the local cam to 40% width; pinned at top:5px; right:5px */
    @media (max-width: 600px) {
      #localVideo {
        width: 40%;
        height: auto;
        aspect-ratio: 4 / 3;
        top: 5px;
        right: 5px;
      }
    }
    /* Overlay buttons pinned at bottom center, 5px from the bottom */
    .video-buttons {
      position: absolute;
      bottom: 5px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 3;
      display: flex;
      gap: 20px;
    }
    .video-buttons button {
      padding: 6px 12px;
      background-color: rgba(128,128,128,0.7);
      color: #fff;
      border: none;
      border-radius: 20px;
      font-size: 16px;
      cursor: pointer;
      transition: transform 0.2s ease;
    }
    .video-buttons button:hover {
      transform: scale(1.05);
    }
    @media (max-width: 600px) {
      .video-buttons button {
        font-size: 11px;
        padding: 4px 8px;
      }
    }
    /* End Chat overlay pinned over entire container */
    #endChatScreen {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: #111;
      color: #fff;
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      z-index: 4;
      text-align: center;
    }
    #endChatScreen button {
      margin-top: 20px;
      padding: 10px 20px;
      background-color: rgba(128,128,128,0.7);
      color: #fff;
      border: none;
      border-radius: 20px;
      font-size: 16px;
      cursor: pointer;
    }
  </style>
</head>
<body>
  <div class="app-frame">
    <div class="video-container">
      <!-- Partner live cam iframe (dynamic) -->
      <iframe id="partnerIframe"></iframe>
      <!-- Transition overlay -->
      <div id="partnerMessage">Looking for partner...</div>
      <!-- Visitor cam -->
      <video id="localVideo" autoplay muted playsinline></video>
      <!-- Overlay buttons pinned at bottom center -->
      <div class="video-buttons">
        <button id="nextButtonOverlay">Next</button>
        <button id="endChatButtonOverlay">End Chat</button>
      </div>
      <!-- End Chat overlay -->
      <div id="endChatScreen">
        <h2>Chat Ended</h2>
        <p>Your chat has ended.</p>
        <button id="restartChat">Restart Chat</button>
      </div>
    </div>
  </div>

  <script>
    // Start local camera feed
    async function startLocalVideo() {
      try {
        const stream = await navigator.mediaDevices.getUserMedia({ video: true, audio: false });
        document.getElementById('localVideo').srcObject = stream;
      } catch (error) {
        console.error('Error accessing camera:', error);
      }
    }
    startLocalVideo();

    /*
       1) Fetch from Chaturbate Users Online API
       2) Randomly pick model (avoiding repeats)
       3) Build embed URL
       4) Fade transitions
    */
    async function fetchOnlineRooms() {
      const apiUrl = "https://chaturbate.com/api/public/affiliates/onlinerooms/?wm=roGHG&client_ip=request_ip&format=json";
      try {
        const response = await fetch(apiUrl);
        const data = await response.json();
        return data.results || [];
      } catch (error) {
        console.error("Error fetching online rooms:", error);
        return [];
      }
    }
    function buildEmbedUrl(username) {
      const baseUrl = "https://cbxyz.com/in/?tour=9oGW&campaign=roGHG&track=embed&room=";
      const params = "&disable_sound=1&mobileRedirect=auto&embed_video_only=1";
      return baseUrl + encodeURIComponent(username) + params;
    }
    let lastModel = "";
    async function getRandomEmbedUrlFromApi() {
      const rooms = await fetchOnlineRooms();
      if (!rooms.length) {
        return buildEmbedUrl("alexacam1");
      }
      // filter out last used model
      let filtered = rooms.filter(r => r.username !== lastModel);
      if (!filtered.length) filtered = rooms;
      const randIndex = Math.floor(Math.random() * filtered.length);
      const room = filtered[randIndex];
      const username = room.username || "alexacam1";
      lastModel = username;
      return buildEmbedUrl(username);
    }

    let nextVideoTimeout;
    const partnerIframe = document.getElementById('partnerIframe');
    const partnerMessage = document.getElementById('partnerMessage');

    // random delay between 5s and 15s
    function getRandomDelay() {
      const minDelay = 5000, maxDelay = 15000;
      return Math.floor(Math.random() * (maxDelay - minDelay + 1)) + minDelay;
    }
    async function playNextStream() {
      if (nextVideoTimeout) clearTimeout(nextVideoTimeout);

      // fade out partner iframe
      partnerIframe.style.opacity = "0";

      // after 300ms, hide and show "Looking for partner..."
      setTimeout(() => {
        partnerIframe.style.visibility = "hidden";
        partnerMessage.style.visibility = "visible";
        partnerMessage.style.opacity = "1";
      }, 300);

      // after 1s (1300ms total), hide message, load new embed
      setTimeout(async () => {
        partnerMessage.style.opacity = "0";
        partnerMessage.style.visibility = "hidden";
        const newUrl = await getRandomEmbedUrlFromApi();
        partnerIframe.src = newUrl;
        // fade in
        setTimeout(() => {
          partnerIframe.style.visibility = "visible";
          partnerIframe.style.opacity = "1";
        }, 300);
      }, 1300);

      // schedule next auto switch
      const delay = getRandomDelay();
      nextVideoTimeout = setTimeout(playNextStream, delay + 1300);
    }
    playNextStream();

    // "Next" triggers new model
    document.getElementById('nextButtonOverlay').addEventListener('click', playNextStream);

    // "End Chat" stops streams
    function endChat() {
      if (nextVideoTimeout) clearTimeout(nextVideoTimeout);
      partnerIframe.style.opacity = "0";
      const localVideo = document.getElementById('localVideo');
      localVideo.pause();
      partnerIframe.src = "";
      document.getElementById('endChatScreen').style.display = "flex";
      document.querySelector('.video-buttons').style.display = "none";
    }
    document.getElementById('endChatButtonOverlay').addEventListener('click', endChat);

    // "Restart Chat" resumes
    function restartChat() {
      document.getElementById('endChatScreen').style.display = "none";
      document.querySelector('.video-buttons').style.display = "flex";
      playNextStream();
      const localVideo = document.getElementById('localVideo');
      if (!localVideo.srcObject) {
        startLocalVideo();
      } else {
        localVideo.play();
      }
    }
    document.getElementById('restartChat').addEventListener('click', restartChat);
  </script>
</body>
</html>

Hi there! I’m a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like piña coladas. (And gettin’ caught in the rain.)

…or something like this:

The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.

As a new WordPress user, you should go to your dashboard to delete this page and create new pages for your content. Have fun!