diff --git a/src/core/main/common/FreezeResolver.ts b/src/core/main/common/FreezeResolver.ts index d400b110c6..a430cedb4b 100644 --- a/src/core/main/common/FreezeResolver.ts +++ b/src/core/main/common/FreezeResolver.ts @@ -306,6 +306,14 @@ export default class FreezeResolver { } else if (rebuffering !== null) { freezingTs = rebuffering.timestamp; } + + log.info( + "FR: Freeze detected", + freezingTs, + now - (freezingTs ?? now), + observation.position.isAwaitingFuturePosition(), + ); + if ( freezingTs !== null && !observation.position.isAwaitingFuturePosition() && @@ -315,6 +323,7 @@ export default class FreezeResolver { timestamp: now, position: freezingPosition + UNFREEZING_DELTA_POSITION, }; + log.debug("FR: trying to flush to un-freeze"); this._decipherabilityFreezeStartingTimestamp = null; this._ignoreFreezeUntil = now + 6000; @@ -330,6 +339,7 @@ export default class FreezeResolver { } if (this._decipherabilityFreezeStartingTimestamp === null) { + log.debug("FR: Start of a potential decipherability freeze detected"); this._decipherabilityFreezeStartingTimestamp = now; } const rebufferingForTooLong = @@ -340,6 +350,10 @@ export default class FreezeResolver { (rebufferingForTooLong || frozenForTooLong) && getMonotonicTimeStamp() - this._decipherabilityFreezeStartingTimestamp > 4000 ) { + log.debug( + "FR: Investigating long potential decipherability freeze", + this._decipherabilityFreezeStartingTimestamp, + ); let hasOnlyDecipherableSegments = true; let isClear = true; for (const ttype of ["audio", "video"] as const) { diff --git a/src/core/main/worker/worker_main.ts b/src/core/main/worker/worker_main.ts index cff072fc55..b8fe22e9fb 100644 --- a/src/core/main/worker/worker_main.ts +++ b/src/core/main/worker/worker_main.ts @@ -146,6 +146,7 @@ export default function initializeWorkerMain() { currentLoadedContentTaskCanceller.signal.register(() => { currentContentObservationRef.finish(); }); + log.debug("WP: Loading new pepared content."); loadOrReloadPreparedContent( msg.value, contentPreparer, @@ -478,6 +479,7 @@ function loadOrReloadPreparedContent( playbackObservationRef: IReadOnlySharedReference, parentCancelSignal: CancellationSignal, ) { + log.debug("WP: Loading prepared content"); const currentLoadCanceller = new TaskCanceller(); currentLoadCanceller.linkToSignal(parentCancelSignal); @@ -908,8 +910,15 @@ function loadOrReloadPreparedContent( if (currentLoadCanceller !== null) { currentLoadCanceller.cancel(); } + log.debug( + "WP: Reloading MediaSource", + payload.timeOffset, + payload.minimumPosition, + payload.maximumPosition, + ); contentPreparer.reloadMediaSource(payload).then( () => { + log.info("WP: MediaSource Reloaded, loading..."); loadOrReloadPreparedContent( { initialTime: newInitialTime,