8 Commits

Author SHA1 Message Date
Emilien
105a69d9ea feat(sabr): fetch player response via Onesie (WEB client)
Replace the plain /youtubei/v1/player request (made through the proxy,
and therefore bound to the proxy's egress IP) with an encrypted Onesie
request using the WEB client. Onesie is proxied by YouTube's "trusted
bandaid", so the returned player response - and the server_abr_streaming_url
inside it - is not tied to our egress IP. Media is still pulled over SABR
(sabr_scheme_plugin.js); only how the player response is obtained changes.

- sabr_onesie.js: new module, window.fetchOnesiePlayerResponse(). Builds the
  WEB player request, encrypts it (OnesieInnertubeRequest + OnesieRequest),
  POSTs to the onesie endpoint through /proxy, parses ONESIE_HEADER/ONESIE_DATA
  UMP parts, gunzips/decrypts, returns the raw player response JSON. Adapted
  from googlevideo/examples/onesie-request and invidious-secret-companion's
  WEB-client variant.
- sabr_helpers.js: add decryptResponse() (AES-CTR + HMAC verify), companion to
  the existing encryptRequest().
- sabr_loader.js: expose window.YT so a VideoInfo can be built from the raw
  onesie player response.
- sabr_player.js: in loadVideo(), fetch the player response via Onesie and wrap
  it in new YT.VideoInfo(...); fall back to innertube.getInfo() on failure.
- player.ecr: load sabr_onesie.js before sabr_player.js.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 17:50:41 +02:00
Emilien
9fbe812899 fix: cap SABR reloads at 3 to prevent infinite backoff loop on throttled videos 2026-06-28 16:29:50 +02:00
Emilien
cae8432a0e perf: parallelize Shaka init with network calls, defer scripts, preconnect, fix shaka 5 spinner CSS 2026-06-28 15:29:36 +02:00
Emilien
cae4b8eb2d fix: drop preferredAudio config (shaka 5 expects non-string type) 2026-06-28 14:51:23 +02:00
Emilien
f8ecc01fab fix: align shaka 5 player config keys (preferredAudio, manifest.disableVideo) 2026-06-28 14:45:21 +02:00
Emilien
6ba2fe79f8 Re-engineer SABR: port FreeTube sabr: scheme + manifest parser (Shaka 5.1.10), companion-optional watch page, no esm.sh 2026-06-28 14:35:33 +02:00
Emilien
b731020352 chore: filter out xtags
as explained in https://github.com/LuanRT/googlevideo/issues/43#issuecomment-3735272817
2026-06-28 13:28:39 +02:00
Emilien Devos
8727e881d9 chore: very initial poc 2026-06-28 13:28:39 +02:00