Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

How to add muted and playsinline attributes to video?

Started by Luca5 8 years ago · 4 replies · 864 views
8 years ago

I have a site in which I would like some videos to behave as GIFs. For these videos to be properly handled on iOS and in Chrome I need to add the following attributes to the video tag:

  • autoplay
  • loop
  • muted
  • playsinline

The first 2 tags seem to be supported in grav, but I can't find out how to add the muted and playsinline tags. Is there a way to add these too?

8 years ago

Thanks.

Indeed, I did some more digging and noticed in VideoMedium.php that the tags were not supported. Thought it might be a good enhancement so logged an enhancement request.

8 years ago

Won't be a difficult PR to code yourself if you are comfortable with PHP. 🙂 I will if you don't.

👍 1
8 years ago

I've created a pull request. My first one, yay 🙌 Hope I did it right...

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
3 101 9 hours ago
Support · by Anna, 3 days ago
2 98 1 day ago
Support · by Justin Young, 1 day ago
1 66 1 day ago
Support · by Duc , 1 week ago
2 101 6 days ago
Support · by Colin Hume, 1 week ago
2 94 6 days ago