Re: Autoplaying video on a responsive site
Yes, welcome to TG Dave.
... with a placeholder that contains an iFrame with a YouTube video autoplaying ...
I wouldn't recommend this at all, especially on a mobile variant. Your visitors will not be happy with you hoggining their preciuos data download allotment! Give them the option to view but don't autoplay.
If the home page loads on a pc browser with the YouTube sound setting unmuted, when the user clicks the mute button on the embedded YouTube area, the sound continues to be heard. I assume this is because the video is also playing in the iFrame code for the mobile version of the webpage although if I narrow the browser window to switch to the mobile version, the video reloads and starts afresh.
There is only one version of your website. Dependant on the visitors viewing device the correct html version is delivered to them. That's to say there isn't a desktop, laptop, tablet & mobile versions. Just one website delivered via html dependant on their viewing platform.
How are you getting the YouTube video to autoplay? I notice in the source code you have:
<iframe width="448" height="252" src="https://www.youtube.com/embed/gx_NVTxs_UQ?rel=0&autoplay=1&loop=1&playlist=gx_NV Txs_UQ" frameborder="0" allowfullscreen></iframe>
Try avoiding the autoplay using:
<iframe width="480" height="270" src="https://www.youtube.com/embed/gx_NVTxs_UQ" frameborder="0" allowfullscreen></iframe>
Egg
Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host
Bookmarks