From 70337add955238ddc7a7b80900a00dd11be66e40 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 28 Jun 2026 15:21:10 +0800 Subject: [PATCH] fix: remove audioMix pre-install in playIndex - breaks HLS playback Setting audioMix with MTAudioProcessingTap on HLS playerItem before stream is ready blocks the audio pipeline entirely, preventing m3u8 streams from playing at all. Revert to lazy install in startRecording() only. --- Sources/PlayerBridge.swift | 3 --- 1 file changed, 3 deletions(-) diff --git a/Sources/PlayerBridge.swift b/Sources/PlayerBridge.swift index 842a239..5e0fe52 100644 --- a/Sources/PlayerBridge.swift +++ b/Sources/PlayerBridge.swift @@ -186,9 +186,6 @@ final class PlayerBridge: ObservableObject { let output = AVPlayerItemVideoOutput(pixelBufferAttributes: pixelBufferAttributes) playerItem.add(output) videoOutput = output - - // 预装音频 Tap(在播放前设置 audioMix,避免播放中设置导致视频卡顿) - screenRecorder.installAudioTap(on: playerItem) #endif player.replaceCurrentItem(with: playerItem)