Search code examples
htmlcssiosvideo

HTML - Loading video is too slow for iOS


I have this block of code within HTML which plays a local video automatically whenever the website is opened. The video loads & plays very quickly (in less than a second) for Android/Mac/Windows in all browsers but when it comes to iOS (safari or chrome) it takes about 3 minutes to load the video - the video is about 30MB - 30 seconds long. Is there something I can do to fix this for iOS? Thanks a lot!

<video class="video" autoplay loop muted playsinline controls>
 <source src="./img/new video.mp4" type="video/mp4" />
</video>

Solution

  • I found my problem. I cleaned up my code - especially my CSS files - Realized that I still had an animated background that wasn't being used (forgot to delete it) - and once that was removed, everything loads & plays very quickly now.