You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// #65 pause false-positive: let the producer read AVPlayer's play intent off-main so its backpressure
@@ -472,15 +475,20 @@ extension AetherEngine {
472
475
// Capture the caller's probe budget (#68) before the detach: loadedOptions is @MainActor-isolated and unreachable inside the closure. Only used on the fallback open (probe absent).
/// Cached CDN URL after redirect resolution; skips proxy hop on subsequent chunks.
40
67
/// Auth-expiry statuses (401/403/404/410) against it invalidate and fall back to
41
68
/// the source URL. See AetherEngine#12.
@@ -710,6 +737,7 @@ final class AVIOReader: AVIOProvider, @unchecked Sendable {
710
737
totalRead += n
711
738
unproductiveReconnects =0
712
739
rateLimitStreak =0
740
+
emitNetworkPhase(.flowing) // detour cache served: not stalled (#85)
713
741
detourTrackSequential(at: curPosition, length: n)
714
742
continue
715
743
case.rateLimited(let retryAfter):
@@ -748,6 +776,7 @@ final class AVIOReader: AVIOProvider, @unchecked Sendable {
748
776
trimWindowLocked()
749
777
unproductiveReconnects =0 // real progress
750
778
rateLimitStreak =0 // real progress clears the 429 give-up streak (#71)
779
+
emitNetworkPhase(.flowing) // recovered: source delivering again (#85)
751
780
winCond.broadcast() // window may have shrunk: wake backpressure
752
781
winCond.unlock()
753
782
continue
@@ -779,6 +808,7 @@ final class AVIOReader: AVIOProvider, @unchecked Sendable {
779
808
totalRead += n
780
809
unproductiveReconnects =0
781
810
rateLimitStreak =0
811
+
emitNetworkPhase(.flowing) // detour cache served: not stalled (#85)
782
812
detourTrackSequential(at: curPosition, length: n)
783
813
continue
784
814
case.rateLimited,.miss:
@@ -800,13 +830,15 @@ final class AVIOReader: AVIOProvider, @unchecked Sendable {
800
830
if !signaled {
801
831
ifrecordReconnectAndShouldGiveUp(){
802
832
EngineLog.emit("[AVIOReader] Persistent stall gave up at offset \(frontier) (\(unproductiveReconnects) unproductive)\(isLive ?" [live source lost]":"")", category:.demux)
833
+
emitNetworkPhase(.flowing) // reader is exiting; let state carry the terminal outcome (#85)
0 commit comments