gmorris1242
gmorris1242

Reputation: 1

Why won't my background video play on mobile? (Rails app)

I have a fullscreen background video that plays at the top of the page when it loads. It works fine on desktop but when I try it on mobile I get the play button with a line through it.

I tried moving the video to a server and when I go to the video url directly it works on my phone. Just not showing up in the app.

%section.first
    .video
      = video_tag 'reel.mp4', autoplay: true, loop: true, controls: false, muted: true

I'm using rails and testing on an iphone.

Upvotes: 0

Views: 484

Answers (1)

gmorris1242
gmorris1242

Reputation: 1

Figured it out. I had to add

playsinline: true

Upvotes: 0

Related Questions