Closed big5am closed 3 years ago
I'd like to reproduce the wrong behaviour. Please post your repo and a link.
Hey @martignoni
Sorry, It's a private repo, unfortunately.
Forked change here: https://github.com/big5am/hugo-video
Here's the shortcode I'm using
{{< video autoplay="true" loop="true" src="videoname" muted="true" controls="false" playsinline="true" width="300px"}}
Sorry, It's a private repo, unfortunately.
I'm afraid it's not possible to fix something I (or others) cannot reproduce as a bug: video play correctly on iOS (see e.g. https://moodlebox.net/en/help/root-certificate-install-macos/, source code: https://github.com/moodlebox/moodlebox.net/tree/master/content/en/help/install-certificate-macos).
Please try to publish a minimal working (buggy) example, so that we can confirm there's indeed something to fix.
Video plays on iOS yes, but autoplay doesn't work. i.e. where video loads and plays automatically when the website loads.
I'll do my best to whip up an example asap.
It's a known requirement for autoplaying vids on iOS (sucks i know)
https://developer.apple.com/documentation/webkit/delivering_video_content_for_safari
Thanks for the ref. I'll fix this soon.
I'll go for adding playsinline
by default, as it has no real drawbacks.
I fixed this by adding the playsinline attribute to the video.html file:
{{ if eq (.Get "playsinline") "true" }}playsinline {{ end }}