Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

257
Vistas
Stop fullscreen HTML5 video rotating on trigger

If I trigger fullscreen in Chrome Android, portrait mode it automatically rotates the fullscreen video to landscape.

To get it back to portrait fullscreen I have to rotate the device landscape then back to portrait.

How can I launch fullscreen to match the orientation that the user is using?

i.e if the device is in portrait and I trigger fullscreen it opens in portrait fullscreen, and if the device is in landscape it triggers landscape fullscreen

I still want to be able to rotate my device to change orientation, I just want it to match the native orientation. It works fine in the emulator on Mac Chrome, just not on my Android mobile device.

videoSmallTrigger.on('click', function() {

     if (!document.isFullScreen && !document.fullscreenElement && !document.webkitFullscreenElement && !document.mozFullScreenElement && !document.msFullscreenElement) {
       openFullscreen(videoSmallID);
        body.addClass('fullscreen-video-sm');
        videoSmall.get(0).play();

    }
});

function openFullscreen(element) {
   
    if (element.requestFullscreen) {
        element.requestFullscreen();
    } else if (element.mozRequestFullScreen) {
        element.mozRequestFullScreen();
    } else if (element.webkitRequestFullscreen) {
        element.webkitRequestFullscreen();
    } else if (element.msRequestFullscreen) {
        element.msRequestFullscreen();
    }

}

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda