mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-09 08:43:49 +02:00
Make MediaSource.close return void
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user