[ui] add playsInline to every image/video elem (#6259)

(cherry picked from commit 5e34df7b7b)
This commit is contained in:
feederbox826
2025-11-11 22:09:14 -05:00
committed by WithoutPants
parent cbb1c04fd5
commit 0fc55d15fa
6 changed files with 6 additions and 0 deletions

View File

@@ -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}

View File

@@ -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={

View File

@@ -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}

View File

@@ -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}

View File

@@ -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}

View File

@@ -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 ?? ""