🎥 Make videos programmatically with React
Update NetworkEventManager.ts
Jonny Burger4ecb633427ca
diff --git a/packages/renderer/src/browser/NetworkEventManager.ts b/packages/renderer/src/browser/NetworkEventManager.tsindex a095a6642d..75f52888b1 100644--- a/packages/renderer/src/browser/NetworkEventManager.ts+++ b/packages/renderer/src/browser/NetworkEventManager.ts@@ -17,38 +17,6 @@ type RedirectInfo = {type RedirectInfoList = RedirectInfo[];export class NetworkEventManager {- /*- * There are four possible orders of events:- * A. `_onRequestWillBeSent`- * B. `_onRequestWillBeSent`, `_onRequestPaused`- * C. `_onRequestPaused`, `_onRequestWillBeSent`- * D. `_onRequestPaused`, `_onRequestWillBeSent`, `_onRequestPaused`,- * `_onRequestWillBeSent`, `_onRequestPaused`, `_onRequestPaused`- * (see crbug.com/1196004)- *- * For `_onRequest` we need the event from `_onRequestWillBeSent` and- * optionally the `interceptionId` from `_onRequestPaused`.- *- * If request interception is disabled, call `_onRequest` once per call to- * `_onRequestWillBeSent`.- * If request interception is enabled, call `_onRequest` once per call to- * `_onRequestPaused` (once per `interceptionId`).- *- * Events are stored to allow for subsequent events to call `_onRequest`.- *- * Note that (chains of) redirect requests have the same `requestId` (!) as- * the original request. We have to anticipate series of events like these:- * A. `_onRequestWillBeSent`,- * `_onRequestWillBeSent`, ...- * B. `_onRequestWillBeSent`, `_onRequestPaused`,- * `_onRequestWillBeSent`, `_onRequestPaused`, ...- * C. `_onRequestWillBeSent`, `_onRequestPaused`,- * `_onRequestPaused`, `_onRequestWillBeSent`, ...- * D. `_onRequestPaused`, `_onRequestWillBeSent`,- * `_onRequestPaused`, `_onRequestWillBeSent`, `_onRequestPaused`,- * `_onRequestWillBeSent`, `_onRequestPaused`, `_onRequestPaused`, ...- * (see crbug.com/1196004)- */#requestWillBeSentMap = new Map<NetworkRequestId,Protocol.Network.RequestWillBeSentEvent@@ -61,15 +29,6 @@ export class NetworkEventManager {#httpRequestsMap = new Map<NetworkRequestId, HTTPRequest>();- /*- * The below maps are used to reconcile Network.responseReceivedExtraInfo- * events with their corresponding request. Each response and redirect- * response gets an ExtraInfo event, and we don't know which will come first.- * This means that we have to store a Response or an ExtraInfo for each- * response, and emit the event when we get both of them. In addition, to- * handle redirects, we have to make them Arrays to represent the chain of- * events.- */#responseReceivedExtraInfoMap = new Map<NetworkRequestId,Protocol.Network.ResponseReceivedExtraInfoEvent[]@@ -142,16 +101,6 @@ export class NetworkEventManager {this.#requestWillBeSentMap.delete(networkRequestId);}- getRequestPaused(- networkRequestId: NetworkRequestId- ): Protocol.Fetch.RequestPausedEvent | undefined {- return this.#requestPausedMap.get(networkRequestId);- }-- forgetRequestPaused(networkRequestId: NetworkRequestId): void {- this.#requestPausedMap.delete(networkRequestId);- }-storeRequestPaused(networkRequestId: NetworkRequestId,event: Protocol.Fetch.RequestPausedEvent