Add @mediabunny/ac3 extension package

This commit is contained in:
Vanilagy
2026-02-12 18:31:59 +01:00
parent e3aa7108f5
commit a97200f3f0
46 changed files with 2083 additions and 71 deletions
+12 -3
View File
@@ -146,7 +146,10 @@ const onMessage = (data: { id: number; command: WorkerCommand }) => {
command.data.sampleRate,
command.data.bitrate,
);
result = { success: true };
result = {
type: command.type,
success: true,
};
}; break;
case 'encode': {
@@ -154,13 +157,19 @@ const onMessage = (data: { id: number; command: WorkerCommand }) => {
command.data.audioData,
command.data.numberOfFrames,
);
result = { encodedData };
result = {
type: command.type,
encodedData,
};
transferables.push(encodedData);
}; break;
case 'flush': {
const flushedData = flush();
result = { flushedData };
result = {
type: command.type,
flushedData,
};
transferables.push(flushedData);
}; break;
}