mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
[ui] add playsInline to every image/video elem (#6259)
(cherry picked from commit 5e34df7b7b)
This commit is contained in:
committed by
WithoutPants
parent
cbb1c04fd5
commit
0fc55d15fa
@@ -169,6 +169,7 @@ export const ImageCard: React.FC<IImageCardProps> = (
|
|||||||
<ImagePreview
|
<ImagePreview
|
||||||
loop={video}
|
loop={video}
|
||||||
autoPlay={video}
|
autoPlay={video}
|
||||||
|
playsInline={video}
|
||||||
className="image-card-preview-image"
|
className="image-card-preview-image"
|
||||||
alt={props.image.title ?? ""}
|
alt={props.image.title ?? ""}
|
||||||
src={source}
|
src={source}
|
||||||
|
|||||||
@@ -370,6 +370,7 @@ const ImagePage: React.FC<IProps> = ({ image }) => {
|
|||||||
<ImageView
|
<ImageView
|
||||||
loop={image.visual_files[0].__typename == "VideoFile"}
|
loop={image.visual_files[0].__typename == "VideoFile"}
|
||||||
autoPlay={image.visual_files[0].__typename == "VideoFile"}
|
autoPlay={image.visual_files[0].__typename == "VideoFile"}
|
||||||
|
playsInline={image.visual_files[0].__typename == "VideoFile"}
|
||||||
controls={image.visual_files[0].__typename == "VideoFile"}
|
controls={image.visual_files[0].__typename == "VideoFile"}
|
||||||
className="m-sm-auto no-gutter image-image"
|
className="m-sm-auto no-gutter image-image"
|
||||||
style={
|
style={
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ export const ImageWallItem: React.FC<RenderImageProps & IExtraProps> = (
|
|||||||
<ImagePreview
|
<ImagePreview
|
||||||
loop={video}
|
loop={video}
|
||||||
muted={video}
|
muted={video}
|
||||||
|
playsInline={video}
|
||||||
autoPlay={video}
|
autoPlay={video}
|
||||||
key={props.photo.key}
|
key={props.photo.key}
|
||||||
style={imgStyle}
|
style={imgStyle}
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ export const MarkerWallItem: React.FC<
|
|||||||
loop={video}
|
loop={video}
|
||||||
muted={!video || !playSound || !active}
|
muted={!video || !playSound || !active}
|
||||||
autoPlay={video}
|
autoPlay={video}
|
||||||
|
playsInline={video}
|
||||||
key={props.photo.key}
|
key={props.photo.key}
|
||||||
src={props.photo.src}
|
src={props.photo.src}
|
||||||
width={width}
|
width={width}
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ export const SceneWallItem: React.FC<
|
|||||||
loop={video}
|
loop={video}
|
||||||
muted={!video || !playSound || !active}
|
muted={!video || !playSound || !active}
|
||||||
autoPlay={video}
|
autoPlay={video}
|
||||||
|
playsInline={video}
|
||||||
key={props.photo.key}
|
key={props.photo.key}
|
||||||
src={props.photo.src}
|
src={props.photo.src}
|
||||||
width={width}
|
width={width}
|
||||||
|
|||||||
@@ -455,6 +455,7 @@ export const LightboxComponent: React.FC<IProps> = ({
|
|||||||
React.createElement(image.paths.preview != "" ? "video" : "img", {
|
React.createElement(image.paths.preview != "" ? "video" : "img", {
|
||||||
loop: image.paths.preview != "",
|
loop: image.paths.preview != "",
|
||||||
autoPlay: image.paths.preview != "",
|
autoPlay: image.paths.preview != "",
|
||||||
|
playsInline: image.paths.preview != "",
|
||||||
src:
|
src:
|
||||||
image.paths.preview != ""
|
image.paths.preview != ""
|
||||||
? image.paths.preview ?? ""
|
? image.paths.preview ?? ""
|
||||||
|
|||||||
Reference in New Issue
Block a user