Skip to content

armgit / ente

Public Imported from GitHub
0

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

Use type

Manav Rathi4f0bee517e0d
diff --git a/web/apps/photos/src/styles/photoswipe.css b/web/apps/photos/src/styles/photoswipe.css
index 9049b3140c..50f6ff0687 100644
--- a/web/apps/photos/src/styles/photoswipe.css
+++ b/web/apps/photos/src/styles/photoswipe.css
@@ -217,6 +217,7 @@
flex-direction: column;
}
+
/* Hide the controls if they're not associated to a media-controller. */
media-control-bar:not([mediacontroller]) {
display: none;
diff --git a/web/packages/gallery/services/video.ts b/web/packages/gallery/services/video.ts
index 791354ff0f..5bacf0f869 100644
--- a/web/packages/gallery/services/video.ts
+++ b/web/packages/gallery/services/video.ts
@@ -36,10 +36,8 @@ export const hlsPlaylistDataForFile = async (
const playlistFileData = await fetchFileData("vid_preview", file.id);
if (!playlistFileData) return undefined;
- const videoURL = await fetchFilePreviewData("vid_preview", file.id);
- if (!videoURL) return undefined;
-
const {
+ type,
playlist: playlistTemplate,
width,
height,
@@ -52,6 +50,12 @@ export const hlsPlaylistDataForFile = async (
file,
);
+ // A playlist format the current client does not understand.
+ if (type != "hls_video") return undefined;
+
+ const videoURL = await fetchFilePreviewData("vid_preview", file.id);
+ if (!videoURL) return undefined;
+
// [Note: HLS playlist format]
//
// The decrypted playlist is a regular HLS playlist for an encrypted media
@@ -132,11 +136,24 @@ export const hlsPlaylistDataForFile = async (
};
const PlaylistJSON = z.object({
- /** The HLS playlist, as a string. */
+ /**
+ * The type of the playlist.
+ *
+ * The only value we currently understand on this client is "hls_video", but
+ * for future extensibility this might be other values too.
+ */
+ type: z.string(),
+ /**
+ * The HLS playlist, as a string.
+ */
playlist: z.string(),
- /** The width of the video (px). */
+ /**
+ * The width of the video (px).
+ */
width: z.number(),
- /** The height of the video (px). */
+ /**
+ * The height of the video (px).
+ */
height: z.number(),
});