Skip to content

armgit / ente

Public Imported from GitHub
0

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

cap

Manav Rathi09b4025f11d4
diff --git a/web/apps/photos/src/styles/photoswipe.css b/web/apps/photos/src/styles/photoswipe.css
index cdc709c6d7..680e7e033b 100644
--- a/web/apps/photos/src/styles/photoswipe.css
+++ b/web/apps/photos/src/styles/photoswipe.css
@@ -307,3 +307,11 @@ media-settings-menu {
*/
z-index: 1;
}
+
+/* Hide the caption when hovering over the video controls since they occupy
+ similar real estate */
+body:has(media-control-bar:hover) {
+ & .pswp-ente .pswp__caption {
+ display: none;
+ }
+}
diff --git a/web/packages/gallery/components/viewer/photoswipe.ts b/web/packages/gallery/components/viewer/photoswipe.ts
index f471457a46..bb99646a0c 100644
--- a/web/packages/gallery/components/viewer/photoswipe.ts
+++ b/web/packages/gallery/components/viewer/photoswipe.ts
@@ -1000,7 +1000,11 @@ export class FileViewerPhotoSwipe {
const handleNextSlide = () => pswp.next();
const handleSeekBackOrPreviousSlide = () => {
- const vid = videoVideoEl;
+ // TODO(HLS): Behind temporary flag
+ // const vid = videoVideoEl;
+ const vid = process.env.NEXT_PUBLIC_ENTE_WIP_VIDEO_STREAMING
+ ? videoVideoEl
+ : undefined;
if (vid) {
vid.currentTime = Math.max(vid.currentTime - 5, 0);
} else {
@@ -1009,7 +1013,11 @@ export class FileViewerPhotoSwipe {
};
const handleSeekForwardOrNextSlide = () => {
- const vid = videoVideoEl;
+ // TODO(HLS): Behind temporary flag
+ // const vid = videoVideoEl;
+ const vid = process.env.NEXT_PUBLIC_ENTE_WIP_VIDEO_STREAMING
+ ? videoVideoEl
+ : undefined;
if (vid) {
vid.currentTime = vid.currentTime + 5;
} else {
@@ -1237,7 +1245,6 @@ const videoHTML = (url: string, disableDownload: boolean) => `
// import "media-chrome";
// import "media-chrome/menu";
//
-// TODO(HLS): Update code above that searches for the video element
const hlsVideoHTML = (url: string, mediaControllerID: string) => `
<media-controller id="${mediaControllerID}" nohotkeys>
<hls-video playsinline slot="media" src="${url}"></hls-video>