so, i have this code:
<video id="video-collection" loop playsinline autoplay muted data-desktop-vid="./img/yearcolor-page/section_first-video.mp4" data-mobile-vid="./img/yearcolor-page/video.mp4"></video>
as you can see autoplay and muted attributes are set, but on safari iOS 15.5 video still doesn’t autoplay and has this button. i also tested it on iOS 14.8 and all works fine. any idea how can i fix it on iOS 15.5?
update
the problem was in low power mode. now i have another question: is it even possible to force video autoplay with low power mode on?
if not i need at least make play button which safari adds work, because now i doesn’t do anything.
2
Answers
in case somebody also doesn't know how to solve this problem, i found a solution on this site: https://shaktisinghcheema.com/how-to-autoplay-video-on-mobile-devices-on-low-power-mode/
Instead of the video tag, try using the object tag to embed the video. Sometimes, this can help with autoplay on Safari. Here’s an example:
OR, you can use JavaScript: As a last resort, you can use JavaScript to trigger the video playback after a user interaction event. For example:
Hope it will help.