9 Commits

Author SHA1 Message Date
Emilien
2b32cdb4f3 fix: use external bg solver 2026-08-03 02:50:51 +02:00
Emilien
2cc3b61cb7 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-08-03 02:50:51 +02:00
Emilien
a213cd1697 fix: cap SABR reloads at 3 to prevent infinite backoff loop on throttled videos 2026-08-03 02:50:51 +02:00
Emilien
0e1c46b207 perf: parallelize Shaka init with network calls, defer scripts, preconnect, fix shaka 5 spinner CSS 2026-08-03 02:50:51 +02:00
Emilien
660dad9dbe fix: drop preferredAudio config (shaka 5 expects non-string type) 2026-08-03 02:50:51 +02:00
Emilien
b25343551d fix: align shaka 5 player config keys (preferredAudio, manifest.disableVideo) 2026-08-03 02:50:51 +02:00
Emilien
bdec1cba12 Re-engineer SABR: port FreeTube sabr: scheme + manifest parser (Shaka 5.1.10), companion-optional watch page, no esm.sh 2026-08-03 02:50:51 +02:00
Emilien
e70981ccb0 chore: filter out xtags
as explained in https://github.com/LuanRT/googlevideo/issues/43#issuecomment-3735272817
2026-08-03 02:50:51 +02:00
Emilien Devos
95c68548d6 chore: very initial poc 2026-08-03 02:50:50 +02:00