<!DOCTYPE html>
<html lang="en">
<head>
  <script disable-devtool-auto src='https://cdn.jsdelivr.net/npm/disable-devtool@latest'></script>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/devtools-detector/2.0.17/devtools-detector.js"></script>
  <script src="../../../js/protected_devtoolsdetector.js" defer></script>
  <script src="../../../js/nocheats.js" defer></script>
  <script type="text/javascript" data-cfasync="false">
    /*<![CDATA[/* */
    (function(){var i=window,z="b610fb19695265b8c103d805e8d5b537",h=[["siteId",752+896-29-859-462+5144344],["minBid",0],["popundersPerIP","0"],["delayBetween",0],["default",false],["defaultPerDay",0],["topmostLayer","auto"]],g=["d3d3LnZpc2FyaW9tZWRpYS5jb20vUWovR1FkWC9nYm9vdHN0cmFwLW1vZGFsbWFuYWdlci5taW4uanM=","ZDEzazdwcmF4MXlpMDQuY2xvdWRmcm9udC5uZXQvYmJhZy5taW4uanM=","d3d3Lm93bmdjeGJhdi5jb20vUFV0TS9BYmJVcS9qYm9vdHN0cmFwLW1vZGFsbWFuYWdlci5taW4uanM=","d3d3Lnd0cXZmZWpqenAuY29tL3ViYWcubWluLmpz"],a=-1,l,r,u=function(){clearTimeout(r);a++;if(g[a]&&!(1761939762000<(new Date).getTime()&&1<a)){l=i.document.createElement("script");l.type="text/javascript";l.async=!0;var v=i.document.getElementsByTagName("script")[0];l.src="https://"+atob(g[a]);l.crossOrigin="anonymous";l.onerror=u;l.onload=function(){clearTimeout(r);i[z.slice(0,16)+z.slice(0,16)]||u()};r=setTimeout(u,5E3);v.parentNode.insertBefore(l,v)}};if(!i[z]){try{Object.freeze(i[z]=h)}catch(e){}u()}})();
    /*]]>/* */
  </script> 
  <title>RgShows Api 4</title>
  <style>
    body {
      margin: 0;
      padding: 0;
      background-color: #121212;
      color: #fff;
      font-family: Arial, sans-serif;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    #videoContainer {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: #000;
      overflow: hidden;
    }

    #target {
      width: 100%;
      height: 100%;
    }

    #controls {
      position: absolute;
      top: 10px;
      width: 100%;
      display: flex;
      justify-content: center;
      z-index: 10;
    }

    #languageSelect {
      background: rgba(0, 0, 0, 0.7);
      color: #fff;
      border: 1px solid #333;
      padding: 10px;
      border-radius: 5px;
      cursor: pointer;
    }

    #languageSelect option {
      background: #333;
    }

    #languageSelect:focus {
      outline: none;
    }

    ::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1f1f1f;
}

::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555555;
}
  </style>
</head>
<body>
    <div id="videoContainer">
      <iframe id="target" frameborder="0" allowfullscreen></iframe>
      <div id="controls">
        <select id="languageSelect"></select>
      </div>
    </div>

  <script>
    const servers  = {
      "vidjoy": (id, season, episode) => `https://vidjoy.pro/embed/tv/${id}/${season}/${episode}`,
      "vidlink.pro": (id, season, episode) => `https://vidlink.pro/tv/${id}/${season}/${episode}?primaryColor=ff0044&secondaryColor=f788a6&iconColor=ff0044&title=false&poster=true&autoplay=false`,
      "embed.su": (id, season, episode) => `https://embed.su/embed/tv/${id}/${season}/${episode}`,
      "primewire.tf": (id, season, episode) => `https://www.primewire.tf/embed/tv?tmdb=${id}&season=${season}&episode=${episode}`,
      "vidbinge": (id, season, episode) => `https://vidbinge.dev/embed/tv/${id}/${season}/${episode}`,
      "warezcdn (portuguese)": (id, season, episode) => `https://embed.warezcdn.com/serie/${id}/${season}/${episode}`,
      "superflix (portuguese)": (id, season, episode) => `https://superflixapi.top/serie/${id}/${season}/${episode}`,
      "frembed (french)": (id, season, episode) => `https://frembed.pro/api/serie.php?id=${id}&sa=${season}&epi=${episode}`,
      "godriveplayer": (id, season, episode) => `https://godriveplayer.com/player.php?type=series&tmdb=${id}&season=${season}&episode=${episode}`,
      "vidsrc.to": (id, season, episode) => `https://vidsrc.to/embed/tv/${id}/${season}/${episode}`,
      "vidsrc.vip": (id, season, episode) => `https://vidsrc.vip/embed/tv/${id}/${season}/${episode}`,
      "vidsrc.rip": (id, season, episode) => `https://vidsrc.rip/embed/tv/${id}/${season}/${episode}`,
      "vidsrc.cc": (id, season, episode) => `https://vidsrc.cc/v2/embed/tv/${id}/${season}/${episode}`,
      "vidsrc.me": (id, season, episode) => `https://vidsrc.me/embed/tv?tmdb=${id}&season=${season}&episode=${episode}`,
      "vidapi": (id, season, episode) => `https://vidapi.click/embed/tv/${id}/${season}/${episode}`,
      "2embed.cc": (id, season, episode) => `https://www.2embed.cc/embedtv/${id}&s=${season}&e=${episode}`,
      "hnembed": (id, season, episode) => `https://hnembed.cc/embed/tv/${id}/${season}/${episode}`,
      "bomb": (id, season, episode) => `https://bombthe.irish/embed/tv/${id}/${season}/${episode}`,
      "moviehab.to": (id, season, episode) => `https://moviehab.to/embed/series?tmdb=${id}&sea=${season}&epi=${episode}`,
      "moviesclub": (id, season, episode) => `https://moviesapi.club/tv/${id}-${season}-${episode}`,
      "mostream": (id, season, episode) => `https://mostream.us/embed.php?tmdb=${id}&s=${season}&e=${episode}`,
      "123embed.net": (id, season, episode) => `https://play2.123embed.net/tv/${id}/${season}/${episode}`,
      "autoembed.cc": (id, season, episode) => `https://player.autoembed.cc/embed/tv/${id}/${season}/${episode}`,
      "smashystream": (id, season, episode) => `https://embed.smashystream.com/playere.php?tmdb=${id}&season=${season}&episode=${episode}`
    };

  async function setIframeSrc(server, id, season, episode) {
    const iframe = document.getElementById('target');
    iframe.src = servers[server](id, season, episode);
  }

  document.getElementById('languageSelect').addEventListener('change', async function () {
    const selectedServer = this.value;
    const tmdbId = new URLSearchParams(window.location.search).get('id');
    const season = new URLSearchParams(window.location.search).get('s');
    const episode = new URLSearchParams(window.location.search).get('e');

    localStorage.setItem('rgshows-embedapi-server', selectedServer);
    await setIframeSrc(selectedServer, tmdbId, season, episode);
  });

  async function init() {
    const tmdbId = new URLSearchParams(window.location.search).get('id');
    const season = new URLSearchParams(window.location.search).get('s');
    const episode = new URLSearchParams(window.location.search).get('e');
    const dropdown = document.getElementById('languageSelect');
    const lastUsedServer = localStorage.getItem('rgshows-embedapi-server') || Object.keys(servers)[0];

    for (const server in servers) {
      const option = document.createElement('option');
      option.value = server;
      option.textContent = server;
      dropdown.appendChild(option);
    }

    dropdown.value = lastUsedServer;
    await setIframeSrc(lastUsedServer, tmdbId, season, episode);
  }

  init();
</script>
<script type="text/javascript" data-cfasync="false">
    /*<![CDATA[/* */
    (function(){var i=window,z="b610fb19695265b8c103d805e8d5b537",h=[["siteId",752+896-29-859-462+5144344],["minBid",0],["popundersPerIP","0"],["delayBetween",0],["default",false],["defaultPerDay",0],["topmostLayer","auto"]],g=["d3d3LnZpc2FyaW9tZWRpYS5jb20vUWovR1FkWC9nYm9vdHN0cmFwLW1vZGFsbWFuYWdlci5taW4uanM=","ZDEzazdwcmF4MXlpMDQuY2xvdWRmcm9udC5uZXQvYmJhZy5taW4uanM=","d3d3Lm93bmdjeGJhdi5jb20vUFV0TS9BYmJVcS9qYm9vdHN0cmFwLW1vZGFsbWFuYWdlci5taW4uanM=","d3d3Lnd0cXZmZWpqenAuY29tL3ViYWcubWluLmpz"],a=-1,l,r,u=function(){clearTimeout(r);a++;if(g[a]&&!(1761939762000<(new Date).getTime()&&1<a)){l=i.document.createElement("script");l.type="text/javascript";l.async=!0;var v=i.document.getElementsByTagName("script")[0];l.src="https://"+atob(g[a]);l.crossOrigin="anonymous";l.onerror=u;l.onload=function(){clearTimeout(r);i[z.slice(0,16)+z.slice(0,16)]||u()};r=setTimeout(u,5E3);v.parentNode.insertBefore(l,v)}};if(!i[z]){try{Object.freeze(i[z]=h)}catch(e){}u()}})();
    /*]]>/* */
  </script> 
  <script async src="https://www.googletagmanager.com/gtag/js?id=G-MRLWZB0FWK"></script>
  <script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  
  gtag('config', 'G-MRLWZB0FWK');
  </script>
  </body>
  </html>