$ account HydeYYHH
Litube is an advanced Android WebView wrapper for YouTube, providing ad-free playback, native video/audio downloading, background play, Picture-in-Picture (PiP), SponsorBlock integration, and a customizable extension system. It uses a hybrid architecture where YouTube's mobile site is rendered in a WebView via `YoutubeFragment`, while video playback is handled natively using AndroidX Media3 (ExoPlayer) with custom `YoutubeHttpDataSource` for streaming. The app includes a full-featured download manager (multi-threaded chunked downloads, audio/video merging with MP4Parser), a queue system, a mini-player, and gesture controls. It reverse-engineers YouTube's streaming protocols using the NewPipe Extractor and generates PoTokens through a WebView-based mechanism to bypass bot detection. The application is structured as a single-module Gradle project with Dagger Hilt for dependency injection, MMKV for key-value storage, and Gson for serialization. It has extensive JavaScript injection (`init.js`) to manipulate the YouTube DOM for features like hiding Shorts, displaying dislikes, and injecting a custom settings page. While primarily an application, it includes data extraction components (stream catalog, delivery analysis) that could be considered a research layer for understanding YouTube's streaming infrastructure.