Add HLS live mode

This commit is contained in:
Vanilagy
2026-03-31 14:13:00 +02:00
parent 6b677291cd
commit b06e407d65
13 changed files with 812 additions and 401 deletions
+3 -3
View File
@@ -92,13 +92,13 @@ A progress of `1` doesn't indicate the conversion has finished; the conversion i
Tracking conversion progress can slightly affect performance as it requires knowledge of the input file's total duration. This is usually negligible but should be avoided when using append-only input sources such as [`ReadableStreamSource`](./reading-media-files#readablestreamsource).
:::
If you want to monitor the output size of the conversion (in bytes), simply use the `onwrite` callback on your `Target`:
If you want to monitor the output size of the conversion (in bytes), simply use the `write` event on your `Target`:
```ts
let currentFileSize = 0;
output.target.onwrite = (start, end) => {
const stopListening = output.target.on('write', ({ start, end }) => {
currentFileSize = Math.max(currentFileSize, end);
};
});
```
### Canceling a conversion