I load my videos through a PHP loop with the link to the videos stored in my database. The videos should launch automatically and play in a loop like gifs. The problem is that the videos load on my PC but not on my mobile. In fact, some load and others don't, and when I refresh, others load and the previous ones don't. It's very random (I have 20 videos)
I've tried forcing them to load with JS but without success or I've done it wrong, I've tried transforming my .mp4 videos into .gif but it doesn't change anything. I've tried using a JS library that creates a custom video player, but the problem persists.
So here's my code if it helps:
<?php foreach ($creations as $index => $creation) { ?>
<div class="mix <?php echo $creation['type']; ?> creations_content open_button-modal"?>">
<?php $fileExtension = strtolower(pathinfo($creation['gif'], PATHINFO_EXTENSION));
<div class="video-creations">
<video autoplay="autoplay" loop="true" muted playsinline defaultmuted>
<source src="./../assets/img/creations/<?php echo $creation['gif']; ?>" type="video/mp4"/></video></div>
<?php } ?>