Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

151
Visualizações
How Guest play a hidden youtube video in my website

I have a website with real visits and I want to maybe generate a bot views for youtube.

How do I get the person to enter the site and play a youtube video (hidden) just by clicking anywhere on my site?

I can't use the code below for example because youtube doesn't count as view if I use autoplay

<iframe width="420" height="345" src="http://www.youtube.com/embed/oHg5SJYRHA0?autoplay=1" frameborder="0" allowfullscreen></iframe>

I'm a beginner, I tried the code below, but it didn't work.

<html> 
  <head> 
    <title>Youtube br</title>
  </head> 
  
  <style> #botYoutube { opacity: 0; position: absolute; right: 0; top: 0; } </style> 
  
  <body onclick="play()"> 
    
    <div id="botYoutube"></div> 
    
    <script async src="https://www.youtube.com/iframe_api"></script> 
    
    <script> 
       var player; 
       
       function play(){ 
           player.playVideo(); 
       } 

       function onYouTubeIframeAPIReady() { 
           player = new YT.Player('botYoutube', { 
               videoId: 'x5MhydijWmc', // YouTube Video ID 
               width: 10, // Player width (in px) 
               height: 10, // Player height (in px) 
               playerVars: { 
                   autoplay: 0, // Auto-play the video on load 
                   controls: 1, // Show pause/play buttons in player 
                   showinfo: 0, // Hide the video title 
                   modestbranding: 1, // Hide the Youtube Logo 
                   loop: 1, // Run the video in a loop 
                   fs: 0, // Hide the full screen button 
                   cc_load_policy: 0, // Hide closed captions 
                   iv_load_policy: 3, // Hide the Video Annotations 
                   autohide: 0 // Hide video controls when playing 
              }, 
              events: { 
                   onReady: function(e) { 
                       e.target.mute(); 
                   } 
              } 
          }); 
      } 
</script> 

</body> 

</html>

I used google translate to ask this question!

thanks

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

this is not allowed on Youtube, but you can create a div with a white background, and 420px×375px, and high z-index and place it on top of the player
don't forget autoplay:

autoplay: 0, // Auto-play the video on load 
about 4 years ago · Juan Pablo Isaza Relatório

0

What you are trying to do is against Youtube terms of service and will likely not work anyways. Youtube has protections against this kind of behavior.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda