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
+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;