Reputation: 73
I'm trying to do a simple video with autoplay on our homepage (http://froy.com). Nothing fancy. Everything works smoothly in Firefox and even IE.
However, the autoplay does not activate on Chrome. I have tried in incognito with no extensions and issue persists. Weird part is, trying the code out on jsfiddle works! Additionally, I see similar video tag used at other websites working as well.
In fact, I went through bit by bit adding different parts of the entire homepage's code to jsfiddle (html, css, javascript) to try to isolate the issue - no luck. I'm at a loss and any help would be appreciated.
Below is the code:
<video preload="auto" autoplay loop muted width="100%" height="auto" style="margin-top:-25px" >
<source src="https://cdn.shopify.com/s/files/1/0220/3498/files/Video_Slider_1.mp4" type="video/mp4">
<source src="https://cdn.shopify.com/s/files/1/0220/3498/files/Video_Slider_1.webm" type="video/webm">
</video>
Does this have something to do with my javascript? If so, why is jsfiddle not picking this up when I include scripts in it?
Upvotes: 1
Views: 9223
Reputation: 1042
I am using the same code which you are using, just the video is served from my server, and everything is working fine.
<video preload="auto" autoplay loop muted width="100%" height="auto" style="margin-top:-25px" >
<source src="http://www.example.com/clip.mp4" type="video/mp4">
<source src="http://www.example.com/clip.webm" type="video/webm">
</video>
Google Chrome Version: Version 38.0.2125.111 m
Upvotes: 2