fix: add fixed ms instead of percentage

This commit is contained in:
2026-01-15 19:20:37 -03:00
parent 5bc4cd02ec
commit 893511ee11
+2 -2
View File
@@ -11,7 +11,7 @@ import { PassThrough, Readable } from 'stream';
import prism from 'prism-media';
const DURATION_MARGIN_PCT = 0.25;
const DURATION_EXTRA_MS = 500;
export class StreamQueue {
private queue: Readable[] = [];
@@ -195,7 +195,7 @@ export class MixedStream {
transcoder.on('end', () => {
const durationMs =
(totalBytes / 192000) * 1000 * (1 + DURATION_MARGIN_PCT);
((totalBytes / 192000) * 1000) + DURATION_EXTRA_MS;
setTimeout(() => {
cleanup();