debug 1
This commit is contained in:
parent
3d51c91d09
commit
83351f41f8
2 changed files with 10 additions and 8 deletions
|
@ -13,8 +13,8 @@ interface SlideViewProps {
|
|||
*/
|
||||
export const SlideView: React.FC<SlideViewProps> = ({ url }) => {
|
||||
return (
|
||||
<Container style={{ backgroundImage: `url(${url})` }}>
|
||||
<img src={url} decoding="sync" alt="" />
|
||||
<Container>
|
||||
<img src={url} alt="" />
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
|
@ -23,11 +23,13 @@ const Container = styled("div")`
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
/*
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-blend-mode: multiply;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
*/
|
||||
|
||||
/* 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,
|
||||
* not a functional requirement.
|
||||
*/
|
||||
transition: all 2s;
|
||||
/* transition: all 2s; */
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
|
|
|
@ -51,7 +51,7 @@ import {
|
|||
* This variable is lazily updated when we enter {@link renderableImageURLs}. It
|
||||
* 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
|
||||
|
@ -119,7 +119,7 @@ export const imageURLGenerator = async function* (castData: CastData) {
|
|||
*/
|
||||
let consecutiveFailures = 0;
|
||||
|
||||
isChromecast = window.navigator.userAgent.includes("CrKey");
|
||||
// isChromecast = window.navigator.userAgent.includes("CrKey");
|
||||
|
||||
while (true) {
|
||||
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,
|
||||
// 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);
|
||||
|
||||
|
@ -353,7 +353,7 @@ const downloadFile = async (castToken: string, file: EnteFile) => {
|
|||
if (!isImageOrLivePhoto(file))
|
||||
throw new Error("Can only cast images and live photos");
|
||||
|
||||
const shouldUseThumbnail = isChromecast;
|
||||
const shouldUseThumbnail = true;
|
||||
|
||||
const url = shouldUseThumbnail
|
||||
? getCastThumbnailURL(file.id)
|
||||
|
|
Loading…
Add table
Reference in a new issue