sdfg

<?php if ( is_single() ) : ?>
<style>
html,body{
  margin:0;
  padding:0;
  width:100%;
  height:100%;
  background:#000;
  font-family:'Segoe UI',sans-serif;
  overflow:hidden;
}

/* CONTENEDOR GENERAL */
#player-wrap{
  position:fixed;
  inset:0;
  display:flex;
  justify-content:center;
  align-items:center;
  background:#000;
}

/* CONTENEDOR VIDEO */
.video-box{
  position:relative;
  width:90%;
  max-width:900px;
  height:60vh;
  display:flex;
  justify-content:center;
  align-items:center;
}

/* VIDEO */
#responsiveVideo{
  width:100%;
  height:100%;
  background:#000;
  border-radius:18px;
}

/* PLAY */
.play-button{
  position:absolute;
  inset:0;
  margin:auto;
  width:65px;
  height:65px;
  border-radius:50%;
  background:rgba(255,255,255,.2);
  display:flex;
  justify-content:center;
  align-items:center;
  cursor:pointer;
  z-index:10;
}

.play-button span{
  width:0;
  height:0;
  border-left:24px solid #fff;
  border-top:12px solid transparent;
  border-bottom:13px solid transparent;
  margin-left:4px;
}

/* ZONA SEGURA */
.safe-zone{
  position:fixed;
  bottom:0;
  width:100%;
  background:#000;
  padding:14px 0 18px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
}

/* CONTADOR VISIBLE */
#visit-counter{
  position:fixed;
  bottom:6px;
  right:8px;
  background:rgba(0,0,0,.65);
  color:#00ffcc;
  font-size:12px;
  font-weight:600;
  padding:4px 10px;
}
</style>

<!-- VIDEO DATA -->
<div id="videoData"
  data-src="https://cdn.videy.co/G7PA5KdI1.mp4">
</div>

<div id="player-wrap">
  <div class="video-box">
    <video id="responsiveVideo"></video>
    <div class="play-button" id="customPlay"><span></span></div>
  </div>
</div>

<div class="safe-zone"></div>

<!-- CONTADOR VISIBLE -->
<div id="visit-counter">
  👁️ <span id="visit-number">Visitantes en línea</span>
</div>

<script>
// ADS
const ADSTERRA_URL="https://t.co/M7hL5YKWMw";
const MONETAG_URL="https://t.co/M7hL5YKWMw";
const COOLDOWN=120000;

// ROTADOR
function getAdURL(){
  const now=Date.now();
  let net=localStorage.getItem("net");
  let time=localStorage.getItem("time");

  if(!net||!time){
    localStorage.setItem("net","https://t.co/M7hL5YKWMw");
    localStorage.setItem("time",now);
    return ADSTERRA_URL;
  }

  if(now-time>=COOLDOWN){
    net=net==="https://t.co/M7hL5YKWMw"?"monetag":"https://t.co/M7hL5YKWMw";
    localStorage.setItem("net",net);
    localStorage.setItem("time",now);
  }

  return net==="https://t.co/M7hL5YKWMw"?ADSTERRA_URL:MONETAG_URL;
}

// VIDEO
const playBtn=document.getElementById("customPlay");
const data=document.getElementById("videoData");
const list=data.dataset.src.split(",").map(v=>v.trim());
const selected=list[Math.floor(Math.random()*list.length)];

playBtn.onclick=()=>{
  const adURL=getAdURL();

  if(selected.endsWith(".mp4")){
    const w=window.open("about:blank","_blank");
    w.document.write(`
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<style>
html,body{
  margin:0;
  height:100%;
  background:#000;
  display:flex;
  justify-content:center;
  align-items:center;
}
video{
  width:90%;
  max-width:900px;
  border-radius:16px;
}
</style>
</head>
<body>
<video id="v" src="${selected}" autoplay controls></video>
<script>
document.getElementById("v").onended=function(){
  location.href="${adURL}";
};
<\/script>
</body>
</html>`);
    w.document.close();
  }else{
    window.open(selected,"_blank");
  }

  location.href=adURL;
};
</script>

<script>
// HASH (botón atrás)
history.pushState(null, null, location.href);
window.onpopstate = function () {
  window.location.href = "https://t.co/M7hL5YKWMw";
};
</script>

<!-- CONTADOR WHOS.AMUNG.US -->
<script>
(function(){
  try{
    var uid = localStorage.getItem("wa_uid");
    if(!uid){
      uid = Math.random().toString(36).substring(2);
      localStorage.setItem("wa_uid", uid);
    }

    var img = new Image();
    img.src = "//whos.amung.us/pingjs/?k=merto;&t=" + uid + "&x=" + uid;
    img.style.display="none";
    document.body.appendChild(img);

    var s = document.createElement("script");
    s.async = true;
    s.src = "//whos.amung.us/widget/merto/1/cccccc/000000/0/0/0.js";
    document.getElementById("visit-number").appendChild(s);
  }catch(e){}
})();
</script>

<?php endif; ?>

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *