Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MSE queue blocked in some situations #1561

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/mse/main_media_source_interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,20 @@ export class MainSourceBufferInterface implements ISourceBufferInterface {
op.reject(error);
});
this._currentOperations = [];

// A synchronous error probably will not lead to updateend event, so we need to
// go to next queue element manually
//
// FIXME: This here is needed to ensure that we're not left with a
// dangling queue of operations.
// However it can potentially be counter-productive if e.g. the `appendBuffer`
// error was due to a full buffer and if there are pushing operations awaiting in
// the queue.
//
// A better solution might just be to reject all push operations right away here?
// Only for a `QuotaExceededError` (to check MSE)?
// However this is too disruptive for what is now a hotfix
this._performNextOperation();
}
} else {
// TODO merge contiguous removes?
Expand All @@ -486,6 +500,9 @@ export class MainSourceBufferInterface implements ISourceBufferInterface {
op.reject(error);
});
this._currentOperations = [];
// A synchronous error probably will not lead to updateend event, so we need to
// go to next queue element manually
this._performNextOperation();
}
}
}
Expand Down
Loading