mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-01 04:43:51 +02:00
Add AppendOnlyStreamSource, adjust examples to use it
This commit is contained in:
+2
-6
@@ -16,8 +16,9 @@ export class Writer {
|
||||
|
||||
private pos = 0;
|
||||
|
||||
constructor(target: Target) {
|
||||
constructor(target: Target, isMonotonic: boolean) {
|
||||
this.target = target;
|
||||
target._setMonotonicity(isMonotonic);
|
||||
}
|
||||
|
||||
start() {
|
||||
@@ -26,11 +27,6 @@ export class Writer {
|
||||
this.started = true;
|
||||
}
|
||||
|
||||
ensureMonotonicity() {
|
||||
this.target._ensureMonotonicity = true;
|
||||
// Note that this currently is without effect for RangedTarget. But, should be fine since its use is rare
|
||||
}
|
||||
|
||||
/** Writes the given data to the target, at the current position. */
|
||||
write(data: Uint8Array) {
|
||||
assert(this.started && !this.finalized);
|
||||
|
||||
Reference in New Issue
Block a user