From e11be9a20a531d5b442d8233edb25e2d329a68bf Mon Sep 17 00:00:00 2001 From: robot Date: Wed, 12 Aug 2026 23:51:32 +0000 Subject: [PATCH] fix: HLS playback tracking and detection fallback for sandboxed iframes Viewer fixes (6): - FRAG_LOADING: only set buffering phase when video is actually stalled (paused or readyState < HAVE_FUTURE_DATA), prevents overlay flicker - FRAG_BUFFERED: allow playing transition from any phase except error, require readyState >= 3 and video not paused - Add FRAG_DECRYPTED, FRAG_PARSING_INIT_SEGMENT, FRAG_PARSING_USERDATA event tracking for full fragment pipeline visibility - BUFFER_RESET: also reset segmentsBuffered counter (was missing) - LEVEL_SWITCHED: set phase to 'switching' for accurate UI feedback - Fatal network errors: track in segmentsFailed counter - Add ENDLIST event handler for stream completion detection Detection fixes: - Add filterManifests(): prefer .m3u8 manifest URLs over .ts segments, reconstruct manifest URL from segment paths when needed - Add fallback in scanVideos(): when scrapeFn returns no visible