3

I'm using Rails video_tag to render a video as so:

= video_tag("SMR_video.mp4", :controls => false, :autobuffer => true, :autoplay => true, :loop => true, :id => "hero-video")

This results in the following, the video doesn't loop:

<video autobuffer="autobuffer" autoplay="autoplay" id="hero-video" loop="loop" src="/assets/SMR_video.mp4"></video>

Where am I going wrong here?

Thanks

cupcakekid
  • 233
  • 3
  • 13

1 Answers1

1

It looks like you can just use <video loop>. I'm not sure how to generate this with haml, but if it works in html you are closer to finding the problem.

https://stackoverflow.com/a/10415231/4018167


If this does not work, play with your page in different browsers. If you are using an old browser, it might work with the depricated <video loop='true'>

Community
  • 1
  • 1
Max Wofford
  • 253
  • 3
  • 13