ruby - Looping HTML5 video with Rails and HAML video_tag -
this question has answer here:
i'm using rails video_tag render video so:
= video_tag("smr_video.mp4", :controls => false, :autobuffer => true, :autoplay => true, :loop => true, :id => "hero-video")
this results in following, video doesn't loop:
<video autobuffer="autobuffer" autoplay="autoplay" id="hero-video" loop="loop" src="/assets/smr_video.mp4"></video>
where going wrong here?
thanks
it looks can use <video loop>
. i'm not sure how generate haml, if works in html closer finding problem.
https://stackoverflow.com/a/10415231/4018167
if not work, play page in different browsers. if using old browser, might work depricated <video loop='true'>
Comments
Post a Comment