Skip to content

Commit 5e34df7

Browse files
authored
[ui] add playsInline to every image/video elem (#6259)
1 parent 678b3de commit 5e34df7

File tree

6 files changed

+6
-0
lines changed

6 files changed

+6
-0
lines changed

ui/v2.5/src/components/Images/ImageCard.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ export const ImageCard: React.FC<IImageCardProps> = (
169169
<ImagePreview
170170
loop={video}
171171
autoPlay={video}
172+
playsInline={video}
172173
className="image-card-preview-image"
173174
alt={props.image.title ?? ""}
174175
src={source}

ui/v2.5/src/components/Images/ImageDetails/Image.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ const ImagePage: React.FC<IProps> = ({ image }) => {
370370
<ImageView
371371
loop={image.visual_files[0].__typename == "VideoFile"}
372372
autoPlay={image.visual_files[0].__typename == "VideoFile"}
373+
playsInline={image.visual_files[0].__typename == "VideoFile"}
373374
controls={image.visual_files[0].__typename == "VideoFile"}
374375
className="m-sm-auto no-gutter image-image"
375376
style={

ui/v2.5/src/components/Images/ImageWallItem.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export const ImageWallItem: React.FC<RenderImageProps & IExtraProps> = (
3939
<ImagePreview
4040
loop={video}
4141
muted={video}
42+
playsInline={video}
4243
autoPlay={video}
4344
key={props.photo.key}
4445
style={imgStyle}

ui/v2.5/src/components/Scenes/SceneMarkerWallPanel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ export const MarkerWallItem: React.FC<
9696
loop={video}
9797
muted={!video || !playSound || !active}
9898
autoPlay={video}
99+
playsInline={video}
99100
key={props.photo.key}
100101
src={props.photo.src}
101102
width={width}

ui/v2.5/src/components/Scenes/SceneWallPanel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export const SceneWallItem: React.FC<
8989
loop={video}
9090
muted={!video || !playSound || !active}
9191
autoPlay={video}
92+
playsInline={video}
9293
key={props.photo.key}
9394
src={props.photo.src}
9495
width={width}

ui/v2.5/src/hooks/Lightbox/Lightbox.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ export const LightboxComponent: React.FC<IProps> = ({
455455
React.createElement(image.paths.preview != "" ? "video" : "img", {
456456
loop: image.paths.preview != "",
457457
autoPlay: image.paths.preview != "",
458+
playsInline: image.paths.preview != "",
458459
src:
459460
image.paths.preview != ""
460461
? image.paths.preview ?? ""

0 commit comments

Comments
 (0)