refactor: audit fixes — clean up bugs, dead code, and type mismatches
CI / test (pull_request) Successful in 23s

- viewer.js: remove undefined state.segmentsBuffered assignment in BUFFER_RESET
- viewer.js: add missing 'switching' and 'ended' phases to PHASE_ICONS
- index.js: remove redundant Strategy B3 (duplicated B1 video-element walk)
- index.js: filter standard <video> DOM attributes from custom-property scans
  (m3u8DeepProbeFn B1 and scrapeFn Priority 3) to avoid iterating built-in
  properties that can never contain HLS data
- background.js: remove unconditional return true (handlers are synchronous)
  and remove dead error-response for unknown message types
- types.ts: align MediaType union ('direct' | 'hls') with actual runtime
  value used in code ('video' | 'hls')
- package.json: remove hls.js from dependencies (loaded from CDN at runtime,
  never imported as an npm module)
This commit is contained in:
robot committed 2026-08-13 04:59:59 +00:00
1 parent ae8608148d
commit 8e9f7f96f1
5 files changed
+36 -31

No files matched your search

-3
View File
@@ -13,9 +13,6 @@
"test:watch": "vitest",
"check": "tsc --noEmit"
},
"dependencies": {
"hls.js": "^1.5.17"
},
"devDependencies": {
"ajv": "^8.17.1",
"ajv-formats": "^3.0.1",