Hi All,
I have setup my vue template so when a user clicks the image it then loads the youtube iframe and then auto-plays the video. I did this because all of the Vue youtube plugins were set up so that a user would have to click the image and then click again to play the video.
The problem I am having is that on mobile OS it doesn't autoplay when the user clicks the image. Works on desktop. Here is my code:
Unfortunately, there have been a lot of restrictions with autoplaying videos for years now (at least 7+ years, which was the first time I tried making a YouTube video autoplay). One thing I'm sure is that a lot of browsers will deny autoplaying (to avoid anoying jumpscares or "where is this sound coming from?" moments) if the sound isn't muted and from what I can see in your sample code, you do not explicitly mute the video.
There are also known limitations on mobile (especially Apple devices), because autoplaying videos cause unsolicited downloads and data usage without the user's agreement.
There are multiple "hacks" available if you Google your issue, but I can 100% guarantee you that none of them will work on every devices. So if you're fine with having a certain percentage of working autoplay behavior, you can try these outs (namely using the YouTube API instead of an iframe).