1

There´s a weird issue where the video doesn´t autoplay for Apple devices and only plays when scrolling and stops after a few frames, where as it works perfectly on Windows and Android devices. All the devices where tested with a Chrome browser.

I´m using this line of code for my video to autoplay on deploy and it works on all devices except Apple devices, even with a Chrome browser.

<video class="logo-video animated fadeInUp" loop autoplay muted oncanplay="this.play()" onloadedmetadata="this.muted = true">
<source src="../../../assets/videos/log.mp4">
</video>

I´ve been searching for other ways for autoplay to work on deploy but this is the only solution I have on Angular. The video has no audio track and is muted anyways, which shouldn´t be the problem.

Fede R
  • 11
  • 3

1 Answers1

0

Safari has recently started preventing videos with audio tracks from auto-playing by default. You might want to look at this to get around this issue:

https://stackoverflow.com/a/50170196/10317969

Nishu Goel
  • 11
  • 4
  • This solution helped with Android and Windows devices but apparently the autoplay problem persists for Apple devices even with Chrome browsers. My video only plays when I scroll the site and stops after a second. – Fede R Dec 17 '19 at 20:09
  • Could you try adding this piece of code after the closing video tag? `````` If this doesn't work too, have a look at these requirements for webkit-based browsers: [link](https://webkit.org/blog/6784/new-video-policies-for-ios) – Nishu Goel Dec 17 '19 at 20:31