Don't try HEIC conversion when running on Chromecast
It crashed the 2nd gen device when we tried...
This commit is contained in:
parent
b30df1d083
commit
ff51114aa1
1 changed files with 7 additions and 4 deletions
|
@ -316,19 +316,22 @@ const renderableImageBlob = async (castToken: string, file: EnteFile) => {
|
|||
if (!mimeType)
|
||||
throw new Error(`Could not detect MIME type for file ${fileName}`);
|
||||
|
||||
if (mimeType == "image/heif" || mimeType == "image/heic") {
|
||||
blob = await heicToJPEG(blob);
|
||||
if (!isChromecast()) {
|
||||
if (mimeType == "image/heif" || mimeType == "image/heic") {
|
||||
blob = await heicToJPEG(blob);
|
||||
}
|
||||
}
|
||||
|
||||
return new Blob([blob], { type: mimeType });
|
||||
};
|
||||
|
||||
const downloadFile = async (castToken: string, file: EnteFile) => {
|
||||
const fileName = file.metadata.title;
|
||||
|
||||
if (!isImageOrLivePhoto(file))
|
||||
throw new Error("Can only cast images and live photos");
|
||||
|
||||
// TODO(MR):
|
||||
const shouldUseThumbnail = false;
|
||||
const shouldUseThumbnail = isChromecast() && isHEICExtension(fileName);
|
||||
|
||||
const url = shouldUseThumbnail
|
||||
? getCastThumbnailURL(file.id)
|
||||
|
|
Loading…
Add table
Reference in a new issue