Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Inline playback of live photos on mobile browsers

Manav Rathi33ee599f3c4b
diff --git a/web/packages/gallery/components/viewer/photoswipe.ts b/web/packages/gallery/components/viewer/photoswipe.ts
index b7ad7509bb..043ac21462 100644
--- a/web/packages/gallery/components/viewer/photoswipe.ts
+++ b/web/packages/gallery/components/viewer/photoswipe.ts
@@ -1159,8 +1159,10 @@ const hlsVideoControlsHTML = () => `
</media-control-bar>
`;
+// playsinline will play the video inline on mobile browsers (where the default
+// is to open a full screen player).
const livePhotoVideoHTML = (videoURL: string) => `
-<video loop muted oncontextmenu="return false;">
+<video loop muted playsinline oncontextmenu="return false;">
<source src="${videoURL}" />
</video>
`;