Fixes
This commit is contained in:
parent
e919dfd09d
commit
9de8a3d40a
3 changed files with 7 additions and 16 deletions
|
@ -1,7 +1,7 @@
|
|||
import { FILE_TYPE } from "@/media/file";
|
||||
import log from "@/next/log";
|
||||
import PairedSuccessfullyOverlay from "components/PairedSuccessfullyOverlay";
|
||||
import { PhotoAuditorium } from "components/PhotoAuditorium";
|
||||
import { FILE_TYPE } from "@/media/file";
|
||||
import { useRouter } from "next/router";
|
||||
import { useEffect, useState } from "react";
|
||||
import {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { FILE_TYPE } from "@/media/file";
|
||||
import ComlinkCryptoWorker from "@ente/shared/crypto";
|
||||
import { CustomError } from "@ente/shared/error";
|
||||
import HTTPService from "@ente/shared/network/HTTPService";
|
||||
import { getCastFileURL } from "@ente/shared/network/api";
|
||||
import { FILE_TYPE } from "@/media/file";
|
||||
import { EnteFile } from "types/file";
|
||||
import { generateStreamFromArrayBuffer } from "utils/file";
|
||||
|
||||
|
|
|
@ -105,9 +105,7 @@ export async function extractVideoMetadata(file: File | ElectronFile) {
|
|||
file,
|
||||
`metadata.txt`,
|
||||
);
|
||||
return parseFFmpegExtractedMetadata(
|
||||
new Uint8Array(await metadata.arrayBuffer()),
|
||||
);
|
||||
return parseFFmpegExtractedMetadata(metadata);
|
||||
}
|
||||
|
||||
enum MetadataTags {
|
||||
|
@ -236,9 +234,10 @@ const ffmpegExec2 = async (
|
|||
inputFile: File | ElectronFile,
|
||||
outputFileName: string,
|
||||
timeoutMS: number = 0,
|
||||
): Promise<File | ElectronFile> => {
|
||||
) => {
|
||||
const electron = globalThis.electron;
|
||||
if (electron || false) {
|
||||
throw new Error("WIP");
|
||||
// return electron.ffmpegExec(
|
||||
// command,
|
||||
// /* TODO(MR): ElectronFile changes */
|
||||
|
@ -247,16 +246,8 @@ const ffmpegExec2 = async (
|
|||
// timeoutMS,
|
||||
// );
|
||||
} else {
|
||||
return workerFactory
|
||||
.lazy()
|
||||
.then((worker) =>
|
||||
worker.execute(
|
||||
command,
|
||||
/* TODO(MR): ElectronFile changes */ inputFile as File,
|
||||
outputFileName,
|
||||
timeoutMS,
|
||||
),
|
||||
);
|
||||
/* TODO(MR): ElectronFile changes */
|
||||
return ffmpegExecWeb(command, inputFile as File, timeoutMS);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue