Skip to content

Commit

Permalink
Add delay to break performance tests
Browse files Browse the repository at this point in the history
This reverts commit 4591ca2.
  • Loading branch information
peaBerberian committed Jan 20, 2025
1 parent fa5c596 commit ee7a733
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main_thread/init/media_source_content_initializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import isNullOrUndefined from "../../utils/is_null_or_undefined";
import noop from "../../utils/noop";
import objectAssign from "../../utils/object_assign";
import type { IReadOnlySharedReference } from "../../utils/reference";
import sleep from "../../utils/sleep";
import type { ISyncOrAsyncValue } from "../../utils/sync_or_async";
import SyncOrAsync from "../../utils/sync_or_async";
import type { CancellationSignal } from "../../utils/task_canceller";
Expand Down Expand Up @@ -205,6 +206,10 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
);

this._setupInitialMediaSourceAndDecryption(mediaElement)
.then(async (initResult) => {
await sleep(200);
return initResult;
})
.then((initResult) =>
this._onInitialMediaSourceReady(
mediaElement,
Expand Down

0 comments on commit ee7a733

Please sign in to comment.