Make MediaSource.close return void

This commit is contained in:
Vanilagy
2025-06-04 15:39:36 +02:00
parent e45ea24f03
commit 6f020650cc
4 changed files with 11 additions and 11 deletions
+5 -5
View File
@@ -499,7 +499,7 @@ export class Conversion {
this._reportProgress(track.id, packet.timestamp + packet.duration);
}
await source.close();
source.close();
this._synchronizer.closeTrack(track.id);
})());
} else {
@@ -593,7 +593,7 @@ export class Conversion {
sample.close();
}
await source.close();
source.close();
this._synchronizer.closeTrack(track.id);
})());
}
@@ -670,7 +670,7 @@ export class Conversion {
this._reportProgress(track.id, packet.timestamp + packet.duration);
}
await source.close();
source.close();
this._synchronizer.closeTrack(track.id);
})());
} else {
@@ -763,7 +763,7 @@ export class Conversion {
sample.close();
}
await source.close();
source.close();
this._synchronizer.closeTrack(track.id);
})());
}
@@ -822,7 +822,7 @@ export class Conversion {
await resampler.finalize();
await source.close();
source.close();
this._synchronizer.closeTrack(track.id);
})());
+2 -2
View File
@@ -81,7 +81,7 @@ export abstract class MediaSource {
*/
close() {
if (this._closingPromise) {
throw new Error('Source already closed.');
return;
}
const connectedTrack = this._connectedTrack;
@@ -94,7 +94,7 @@ export abstract class MediaSource {
throw new Error('Cannot call close before output has been started.');
}
return this._closingPromise = (async () => {
this._closingPromise = (async () => {
await this._flushAndClose();
this._closed = true;