Skip to content

armgit / ente

Public Imported from GitHub
0

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

Complete video handoff when autoplay is blocked

Anand Baburajan6b9f7c11b37d
diff --git a/web/apps/space/src/components/PostVideoContent.ts b/web/apps/space/src/components/PostVideoContent.ts
index e7ab0110c1..1061510766 100644
--- a/web/apps/space/src/components/PostVideoContent.ts
+++ b/web/apps/space/src/components/PostVideoContent.ts
@@ -144,7 +144,13 @@ export const createSpaceVideoContent = (
if (disposed) return;
const frameReady = video.readyState >= video.HAVE_CURRENT_DATA;
if (poster) poster.hidden = !posterReady || frameReady;
- if (!ready && (posterReady || frameReady || failure)) {
+ if (
+ !ready &&
+ (posterReady ||
+ frameReady ||
+ failure ||
+ (active && autoplayBlocked))
+ ) {
ready = true;
onReady?.();
}
@@ -195,6 +201,7 @@ export const createSpaceVideoContent = (
video.setAttribute("aria-disabled", String(blocked));
video.style.cursor = blocked ? "default" : "pointer";
errorMessage.hidden = !active || !failure;
+ updatePreview();
};
const showPlaying = () => {
hideLoading();