Skip to content

Commit

Permalink
LP resume
Browse files Browse the repository at this point in the history
  • Loading branch information
mnvr committed Feb 17, 2025
1 parent 36e7dae commit 0e3708f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 0 additions & 2 deletions web/packages/gallery/components/viewer/data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ export class FileViewerDataSource {
case FileType.video: {
const sourceURLs =
await downloadManager.renderableSourceURLs(file);
// const disableDownload = !!this.opts.disableDownload;
// update({ html: videoHTML(sourceURLs.url, disableDownload) });
// TODO(PS):
update({ videoURL: sourceURLs.url as string });
break;
Expand Down
9 changes: 9 additions & 0 deletions web/packages/gallery/components/viewer/photoswipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,15 @@ export class FileViewerPhotoSwipe {
video?.pause();
});

pswp.on("contentActivate", (e) => {
// Undo the effect of a previous "contentDeactivate".
if (e.content?.slide.data?.livePhotoVideoURL) {
e.content?.slide?.container
?.getElementsByTagName("video")[0]
?.play();
}
});

// The user did some action within the file viewer to close it.
pswp.on("close", () => {
// Clear intervals.
Expand Down

0 comments on commit 0e3708f

Please sign in to comment.