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

102
Visualizações
how to play inline video more than once in ios safari when in low power mode

iOS safari appears to limit inline videos to play just once when in lower power mode, even if you try to play the video in response to a user interaction. You can test this to see:

document.querySelector('video').addEventListener('click', e => {
  e.target.play().then(() => alert('played after click')).catch(err => alert(`failed to play after click: ${JSON.stringify(err)}`));
});
<video src='https://media.tenor.com/videos/01faecfbc10705494038b7541e6d8756/mp4' autoplay playsinline></video>

When low power mode is OFF, you can tap the video and it always plays each time (you'll see an alert each time you tap and it plays). However, when low power mode is ON, only your first tap will play the video and show the alert. Subsequent taps do nothing, not even triggering the .catch handler I put on the .play() call.

How can I fix this? Note that even though the autoplay attribute is present on the video, I don't mind that it doesn't autoplay when low power mode is on. I do need it to always play when the video is clicked.

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