<script>
    function getParam ( sname )
    {
      var params = location.search.substr(location.search.indexOf("?")+1);
      var sval =  params.replace("url=", "");
      
      return sval;
    }
    var sv = getParam("sv");
</script>

<title>BD STREAMS TV</title>
<meta name="referrer" content="no-referrer">
<script src="http://content.jwplatform.com/libraries/SAHhwvZq.js"></script>

<body onload="init()">

<script>
    $(document).ready(function() {
      $("img").on("contextmenu", function() {
         return false;
      });
    });
</script>

<div id="jwPlayer"></div>
<div id="jwplayers"></div>

<script>
    // Get the `src` and `url` parameters from the URL.
    const urlParams = new URLSearchParams(window.location.search);
    const srcParam = urlParams.get('src');
    const videoUrl = urlParams.get('url');
    const videoId = urlParams.get('videoId'); // Assuming the videoId is passed in the URL

    if (srcParam) {
      // Show the iframe player
      document.getElementById('iframe').src = srcParam;
      document.getElementById('jwPlayer').style.display = 'none';
    } else if (videoUrl) {
      // Show the JW Player with the provided video URL
      jwplayer("jwPlayer").setup({
        file: videoUrl,
      });
      document.getElementById('iframe').style.display = 'none';
    } else if (videoId) {
      // If videoId is present, create the dynamic HLS stream URL
      const hlsUrl = `https://lebo.huminbird.cn/live/ballbar_${videoId}.m3u8`;
      // Show the JW Player with the HLS stream URL
      jwplayer("jwPlayer").setup({
        file: hlsUrl,
      });
      document.getElementById('iframe').style.display = 'none';
    }
</script>

</body>