Manav Rathi 1 рік тому
батько
коміт
83351f41f8

+ 5 - 3
web/apps/cast/src/components/Slide.tsx

@@ -13,8 +13,8 @@ interface SlideViewProps {
  */
  */
 export const SlideView: React.FC<SlideViewProps> = ({ url }) => {
 export const SlideView: React.FC<SlideViewProps> = ({ url }) => {
     return (
     return (
-        <Container style={{ backgroundImage: `url(${url})` }}>
-            <img src={url} decoding="sync" alt="" />
+        <Container>
+            <img src={url} alt="" />
         </Container>
         </Container>
     );
     );
 };
 };
@@ -23,11 +23,13 @@ const Container = styled("div")`
     width: 100%;
     width: 100%;
     height: 100%;
     height: 100%;
 
 
+    /*
     background-size: cover;
     background-size: cover;
     background-position: center;
     background-position: center;
     background-repeat: no-repeat;
     background-repeat: no-repeat;
     background-blend-mode: multiply;
     background-blend-mode: multiply;
     background-color: rgba(0, 0, 0, 0.5);
     background-color: rgba(0, 0, 0, 0.5);
+    */
 
 
     /* Smooth out the transition a bit.
     /* Smooth out the transition a bit.
      *
      *
@@ -43,7 +45,7 @@ const Container = styled("div")`
      * Does not work in Firefox, but that's fine, this is only a slight tweak,
      * Does not work in Firefox, but that's fine, this is only a slight tweak,
      * not a functional requirement.
      * not a functional requirement.
      */
      */
-    transition: all 2s;
+    /* transition: all 2s; */
 
 
     img {
     img {
         width: 100%;
         width: 100%;

+ 5 - 5
web/apps/cast/src/services/render.ts

@@ -51,7 +51,7 @@ import {
  * This variable is lazily updated when we enter {@link renderableImageURLs}. It
  * This variable is lazily updated when we enter {@link renderableImageURLs}. It
  * is kept at the top level to avoid passing it around.
  * is kept at the top level to avoid passing it around.
  */
  */
-let isChromecast = false;
+// let isChromecast = false;
 
 
 /**
 /**
  * If we're using HEIC conversion, then this variable caches the comlink web
  * If we're using HEIC conversion, then this variable caches the comlink web
@@ -119,7 +119,7 @@ export const imageURLGenerator = async function* (castData: CastData) {
      */
      */
     let consecutiveFailures = 0;
     let consecutiveFailures = 0;
 
 
-    isChromecast = window.navigator.userAgent.includes("CrKey");
+    // isChromecast = window.navigator.userAgent.includes("CrKey");
 
 
     while (true) {
     while (true) {
         const encryptedFiles = shuffled(
         const encryptedFiles = shuffled(
@@ -166,8 +166,8 @@ export const imageURLGenerator = async function* (castData: CastData) {
             //
             //
             // The last to last element is the one that was shown prior to that,
             // The last to last element is the one that was shown prior to that,
             // and now can be safely revoked.
             // and now can be safely revoked.
-            if (previousURLs.length > 1)
-                URL.revokeObjectURL(previousURLs.shift());
+            // if (previousURLs.length > 1)
+                // URL.revokeObjectURL(previousURLs.shift());
 
 
             previousURLs.push(url);
             previousURLs.push(url);
 
 
@@ -353,7 +353,7 @@ const downloadFile = async (castToken: string, file: EnteFile) => {
     if (!isImageOrLivePhoto(file))
     if (!isImageOrLivePhoto(file))
         throw new Error("Can only cast images and live photos");
         throw new Error("Can only cast images and live photos");
 
 
-    const shouldUseThumbnail = isChromecast;
+    const shouldUseThumbnail = true;
 
 
     const url = shouldUseThumbnail
     const url = shouldUseThumbnail
         ? getCastThumbnailURL(file.id)
         ? getCastThumbnailURL(file.id)