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

170
Vistas
How can I "fake" fullscreen mode on iOS using playsinline?

As most web developers are aware, there’s an annoying lack of support for the full screen api in Safari on iOS. However most popular video sites such as YouTube and Vimeo have a way of faking it by allowing the user to toggle between playing the video inline (with the playsinline attribute I assume) and playing the video in the native iOS player (like when videos don’t use playsinline).

I made a simple script that I thought would do this, but it doesn’t work reliably and I’m sure there’s a better way to implement it. It goes like this:

    var video = document.getElementById('video');

    function toggleFullScreen() {
    video.pause();
    video.hasAttribute('playsinline') ? video.removeAttribute('playsinline') : video.setAttribute('playsinline', '');
    video.play();
  }

My question is: does anyone know how these sites do it? And is there a better way than toggling playsinline?

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