Skip to content

armgit / ente

Public Imported from GitHub
0

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

Take 2

Manav Rathi5d6cc892f372
diff --git a/web/packages/new/photos/components/FileViewerPhotoSwipe.ts b/web/packages/new/photos/components/FileViewerPhotoSwipe.ts
index e1d8bf7f5c..38d1202cb5 100644
--- a/web/packages/new/photos/components/FileViewerPhotoSwipe.ts
+++ b/web/packages/new/photos/components/FileViewerPhotoSwipe.ts
@@ -182,14 +182,26 @@ export class FileViewerPhotoSwipe {
return itemData ?? {};
});
pswp.on("contentLoad", (e) => {
- console.log(e);
+ console.log("contentLoad", e);
if (e.content.data.videoURL) {
const holderEl = e.content.slide.holderElement;
const vid = document.createElement("h1");
- vid.innerText = "Test";
+ vid.innerText = "Test 1";
holderEl.appendChild(vid);
}
});
+ pswp.on("contentAppend", (e) => {
+ const containerEl = e.content.slide.container;
+ console.log("contentAppend", containerEl);
+ if (e.content.data.videoURL) {
+ const vid = document.createElement("div");
+ vid.innerHTML = livePhotoVideoHTML(e.content.data.videoURL);
+ // vid.innerText = "Test 2";
+ containerEl.appendChild(vid);
+ vid.style =
+ "position: absolute; left: 0; right: 0; width: 50%; height: 50%; background-color: blue; z-index: 100;";
+ }
+ });
pswp.on("close", () => {
// The user did some action within the file viewer to close it. Let
// our parent know that we have been closed.