iOS playsinline attribute for video tags
Prevent videos from automatically full-screening on autoplay by using the iOS 10+ playsinline attribute.
This commit is contained in:
parent
12a1adc270
commit
8ed489c264
|
@ -661,7 +661,7 @@
|
||||||
<div class="column is-one-quarter is-clipped">
|
<div class="column is-one-quarter is-clipped">
|
||||||
<!-- GIF video? -->
|
<!-- GIF video? -->
|
||||||
{{if HasSuffix $Body.Photo.Filename ".mp4"}}
|
{{if HasSuffix $Body.Photo.Filename ".mp4"}}
|
||||||
<video loop controls controlsList="nodownload"
|
<video loop controls controlsList="nodownload" playsinline
|
||||||
{{if $Body.Photo.AltText}}title="{{$Body.Photo.AltText}}"{{end}}
|
{{if $Body.Photo.AltText}}title="{{$Body.Photo.AltText}}"{{end}}
|
||||||
{{if BlurExplicit $Body.Photo}}class="blurred-explicit"
|
{{if BlurExplicit $Body.Photo}}class="blurred-explicit"
|
||||||
{{else if (not (eq ($Root.CurrentUser.GetProfileField "autoplay_gif") "false"))}}autoplay
|
{{else if (not (eq ($Root.CurrentUser.GetProfileField "autoplay_gif") "false"))}}autoplay
|
||||||
|
|
|
@ -213,7 +213,7 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
<!-- GIF video? -->
|
<!-- GIF video? -->
|
||||||
{{if HasSuffix .Filename ".mp4"}}
|
{{if HasSuffix .Filename ".mp4"}}
|
||||||
<video autoplay loop controls controlsList="nodownload">
|
<video autoplay loop controls controlsList="nodownload" playsinline>
|
||||||
<source src="{{PhotoURL .Filename}}" type="video/mp4">
|
<source src="{{PhotoURL .Filename}}" type="video/mp4">
|
||||||
</video>
|
</video>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<div class="image block">
|
<div class="image block">
|
||||||
<!-- GIF video? -->
|
<!-- GIF video? -->
|
||||||
{{if HasSuffix .Photo.Filename ".mp4"}}
|
{{if HasSuffix .Photo.Filename ".mp4"}}
|
||||||
<video autoplay loop controls controlsList="nodownload">
|
<video autoplay loop controls controlsList="nodownload" playsinline>
|
||||||
<source src="{{PhotoURL .Photo.Filename}}" type="video/mp4">
|
<source src="{{PhotoURL .Photo.Filename}}" type="video/mp4">
|
||||||
</video>
|
</video>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
|
@ -562,7 +562,7 @@
|
||||||
<div class="card-image has-text-centered is-clipped">
|
<div class="card-image has-text-centered is-clipped">
|
||||||
<!-- GIF video? -->
|
<!-- GIF video? -->
|
||||||
{{if HasSuffix .Filename ".mp4"}}
|
{{if HasSuffix .Filename ".mp4"}}
|
||||||
<video loop controls controlsList="nodownload"
|
<video loop controls controlsList="nodownload" playsinline
|
||||||
{{if .AltText}}title="{{.AltText}}"{{end}}
|
{{if .AltText}}title="{{.AltText}}"{{end}}
|
||||||
{{if BlurExplicit .}}class="blurred-explicit"
|
{{if BlurExplicit .}}class="blurred-explicit"
|
||||||
{{else if (not (eq ($Root.CurrentUser.GetProfileField "autoplay_gif") "false"))}}autoplay
|
{{else if (not (eq ($Root.CurrentUser.GetProfileField "autoplay_gif") "false"))}}autoplay
|
||||||
|
@ -689,7 +689,7 @@
|
||||||
<div class="card-image has-text-centered is-clipped">
|
<div class="card-image has-text-centered is-clipped">
|
||||||
<!-- GIF video? -->
|
<!-- GIF video? -->
|
||||||
{{if HasSuffix .Filename ".mp4"}}
|
{{if HasSuffix .Filename ".mp4"}}
|
||||||
<video loop controls controlsList="nodownload"
|
<video loop controls controlsList="nodownload" playsinline
|
||||||
{{if .AltText}}title="{{.AltText}}"{{end}}
|
{{if .AltText}}title="{{.AltText}}"{{end}}
|
||||||
{{if BlurExplicit .}}class="blurred-explicit"
|
{{if BlurExplicit .}}class="blurred-explicit"
|
||||||
{{else if (not (eq ($Root.CurrentUser.GetProfileField "autoplay_gif") "false"))}}autoplay
|
{{else if (not (eq ($Root.CurrentUser.GetProfileField "autoplay_gif") "false"))}}autoplay
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
<div class="card-image has-text-centered is-clipped">
|
<div class="card-image has-text-centered is-clipped">
|
||||||
<!-- GIF video? -->
|
<!-- GIF video? -->
|
||||||
{{if HasSuffix .Photo.Filename ".mp4"}}
|
{{if HasSuffix .Photo.Filename ".mp4"}}
|
||||||
<video loop controls controlsList="nodownload"
|
<video loop controls controlsList="nodownload" playsinline
|
||||||
{{if .Photo.AltText}}title="{{.Photo.AltText}}"{{end}}
|
{{if .Photo.AltText}}title="{{.Photo.AltText}}"{{end}}
|
||||||
{{if BlurExplicit .Photo}}class="blurred-explicit"
|
{{if BlurExplicit .Photo}}class="blurred-explicit"
|
||||||
{{else if (not (eq ($Root.CurrentUser.GetProfileField "autoplay_gif") "false"))}}autoplay
|
{{else if (not (eq ($Root.CurrentUser.GetProfileField "autoplay_gif") "false"))}}autoplay
|
||||||
|
|
|
@ -184,7 +184,7 @@
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<figure id="editphoto-preview" class="image block">
|
<figure id="editphoto-preview" class="image block">
|
||||||
{{if HasSuffix .EditPhoto.Filename ".mp4"}}
|
{{if HasSuffix .EditPhoto.Filename ".mp4"}}
|
||||||
<video autoplay loop controls controlsList="nodownload">
|
<video autoplay loop controls controlsList="nodownload" playsinline>
|
||||||
<source src="{{PhotoURL .EditPhoto.Filename}}" type="video/mp4">
|
<source src="{{PhotoURL .EditPhoto.Filename}}" type="video/mp4">
|
||||||
</video>
|
</video>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user