web/queue: add remuxing progress & general improvements

and a bunch of other stuff:
- size and percentage in queue
- indeterminate progress bar
- if libav wasm freezes, the worker kill itself
- cleaner states
- cleaner props
This commit is contained in:
wukko
2025-01-25 01:25:53 +06:00
parent c4c47bdc27
commit 44a99bdb3a
12 changed files with 117 additions and 53 deletions

View File

@@ -51,13 +51,13 @@ export function itemDone(id: string, workerId: string, file: File) {
checkTasks();
}
export function itemRunning(id: string, step: number) {
export function itemRunning(id: string, workerId: string) {
update(queueData => {
if (queueData[id]) {
queueData[id] = {
...queueData[id],
state: "running",
currentStep: step,
runningWorker: workerId,
}
}
return queueData;
@@ -68,6 +68,10 @@ export function itemRunning(id: string, step: number) {
export function removeItem(id: string) {
update(queueData => {
for (const worker in queueData[id].pipeline) {
removeWorkerFromQueue(queueData[id].pipeline[worker].workerId);
}
delete queueData[id];
return queueData;
});