<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>TG - @CRICSPORTCENTRAL</title>
  <style>
    body {
      margin: 0;
      padding: 0;
      font-family: Arial, sans-serif;
      background-color: #000;
      color: #fff;
    }
    #player {
      position: absolute;
      width: 100% !important;
      height: 100% !important;
    }
    .watermark {
      position: absolute;
      top: 7px;
      left: 10px;
      z-index: 10;
    }
    .watermark img {
      width: 100px;
      opacity: 0.8;
    }
  </style>
  <script src="https://content.jwplatform.com/libraries/KB5zFt7A.js"></script>
</head>
<body>
  <div id="player"></div>
  <div class="watermark">
    <img src="https://i.postimg.cc/VsT7gT3R/Picsart-24-12-25-12-00-51-804.png" alt="Watermark">
  </div>
  <script>
    // Function to extract the video URL from the query string
    function extractVideoUrl() {
      const urlParams = new URLSearchParams(window.location.search);
      const videoUrl = urlParams.get('url'); // Look for 'url' parameter
      return videoUrl || 'default-video-url.m3u8'; // Fallback if no URL is provided
    }

    // Prompt to join Telegram channel
    if (confirm("Join Our Telegram Channel @CRICSPORTCENTRAL")) {
      window.location.href = "https://t.me/CRICSPORTCENTRAL";
    }

    // Initialize the JWPlayer with the dynamically fetched video URL
    const videoFile = extractVideoUrl();
    jwplayer("player").setup({
      file: videoFile, // Use the dynamically extracted video URL
      preload: "metadata",
      width: "100%",
      height: "100%",
    });
  </script>
</body>
</html>
