diff --git a/css/player-base.js b/css/player-base.js index a02cfb18..2297c256 100644 --- a/css/player-base.js +++ b/css/player-base.js @@ -1,14 +1,51 @@ // in the beginning.... god made mrrprpmnaynayaynaynayanyuwuuuwmauwnwanwaumawp :p var _yt_player = videojs; -// Self-healing DASH player (Video.js + videojs-contrib-dash + dash.js) -// - Uses window.mpdurl (string) as MPD URL - // - Probes 1080p → 720p → 480p with ABR OFF; picks the first stable one -// - Then enables ABR with soft bounds (≥~430p floor if available, ≤1080p cap) -// - Health watchdog detects stalls / non-advancing time and retries invisibly -// - Error handler flips to ABR + quiet source refresh, keeps playback position -// - Offline/online bridge: waits for connectivity, then heals itself -// - Always rewinds to 0 once after initial probing (avoids “starts at 5–7s”) +/** + * Self-Healing DASH Player for Video.js + * -------------------------------------------------------------- + * Drop-in controller for MPEG-DASH playback + * with Video.js + videojs-contrib-dash (dash.js underneath). + * + * WHAT THIS SCRIPT DOES + * - Loads MPD from `window.mpdurl` and starts from 0s (fixes “starts at 5–7s”). + * - Probes quality in order: 1080p → 720p → 480p with ABR OFF, then + * re-enables ABR with soft bounds (floor ≈ 430p if available, cap 1080p). + * - Monitors health; if playback stops advancing, it silently refreshes + * the same MPD and resumes from the saved time (exponential backoff). + * - On player/demux/network hiccups it flips back to full ABR for safety. + * + * CORS / NETWORK HARDENING + * - Forces cookie-less segment/MPD requests (withCredentials=false per type). + * - Disables CMCD headers (or uses query mode) to avoid preflights. + * - Request interceptor strips non-essential custom headers on non-license + * calls. The