or permission errors.
The reason is that browsers in recent years changed their policies to prevent autoplay video because they think users don't want it (that's correct in most cases).
What we can do to solve this issue?
playsinlineattributes to your
- If you need sound, you should put an unmute button beside the video, then in onClick callback, get video element and set
Pro Tip! If you have multiple videos on your page and only a single unmute button, then make sure to unmute all videos in the click callback of that button, otherwise, iOS won't let you unmute video before playing it on demand.
That's it, happy autoplaying!