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

161
Visualizações
Full screen vimeo embed and Rotate on mobile devices

I have a vimeo embed with background=1 parameter so the controls are not showing and I would like to have a button on mobile that will make the video full screen and rotate it 90 degrees, similar to the functionality in the Youtube app when you click on the Full screen button.

Here's the code I have:

<main>
  <div class="iframe-wrapper">
    <iframe src="https://player.vimeo.com/video/105363047?h=6b97280da1&color=ffffff&title=0&byline=0&portrait=0&background=1" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe>
  </div>
  
  <button id="full-screen-mobile">Full Screen</button>
</main>

<style>
main {
  max-width: 640px;
  margin: 0 auto;
}

main.active {
  max-width: 100%;
  height: 100%;
}

.iframe-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding-top: 56.25%;
}

.iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
}

.iframe-wrapper.active {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  padding-top: 0;
}

.iframe-wrapper.active iframe {
  transform: rotate(90deg);
}
</style>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
jQuery(document).ready(function ($) {
  $("#full-screen-mobile").on("click", function () {
    $(".iframe-wrapper").addClass("active");
    $("main").addClass("active");
  });
});
</script>

Right now it shows like this:
Screenshot

How can I get the video to show full screen?

Thanks!

about 4 years ago · Juan Pablo Isaza
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