https://github.com/Kyagara/rt
Twitch and Youtube frontend app using Tauri and SvelteKit. Save users, watch streams and videos, block ads, view chat with emote support.
https://github.com/Kyagara/rt
adblock app desktop frontend javascript proxy rust svelte sveltekit tailwindcss tauri twitch typescript vidstack youtube
Last synced: 17 days ago
JSON representation
Twitch and Youtube frontend app using Tauri and SvelteKit. Save users, watch streams and videos, block ads, view chat with emote support.
- Host: GitHub
- URL: https://github.com/Kyagara/rt
- Owner: Kyagara
- License: apache-2.0
- Created: 2025-03-03T14:38:01.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-03-27T17:05:56.000Z (18 days ago)
- Last Synced: 2025-03-27T18:23:11.362Z (18 days ago)
- Topics: adblock, app, desktop, frontend, javascript, proxy, rust, svelte, sveltekit, tailwindcss, tauri, twitch, typescript, vidstack, youtube
- Language: Rust
- Homepage:
- Size: 2.23 MB
- Stars: 21
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- starred - Kyagara/rt - Twitch and Youtube frontend app using Tauri and SvelteKit. Save users, watch streams and videos with no ads, view chat with emote support. (Rust)
README
# RT (name pending)
A Twitch and YouTube frontend written in Rust using Tauri and SvelteKit.
![]()
![]()
> Very old screenshots.
## Features
- Add users to your stream and video feeds.
- Watch content in any of the available resolutions.
- View Twitch chat with 7tv and BetterTTV emotes.
- Ad blocking.
- Open videos or streams directly in the app using `rt:://` URLs.## Download
> All installers (`exe`, `deb`, `rpm`) are provided in a small zip file.
[Quick download.](https://nightly.link/Kyagara/rt/workflows/build.yaml/main/bundles.zip)
Github Actions builds are available [here](https://github.com/Kyagara/rt/actions).
## About
Tested on Windows and Ubuntu. Not tested on macOS as I don't have access to a macOS machine, if you manage to build and test it, please let me know and I will work on fixing issues and adding it to the build bundles.
### Redirects
On launch, a custom protocol handler is registered for `rt://` URLs, this allows you to open videos or streams directly in the app.
If the app is not running, it will be started with the URL as an argument, if it is running, the URL will be opened in a new window.
`YouTube`:
- `rt://yt/dQw4w9WgXcQ`
- `rt://youtube/dQw4w9WgXcQ`
- `rt://www.youtube.com/watch?v=dQw4w9WgXcQ`
- `rt://youtu.be/dQw4w9WgXcQ``Twitch`:
- `rt://tw/zfg1`
- `rt://twitch/zfg1`
- `rt://www.twitch.tv/zfg1`If using extensions like [LibRedirect](https://github.com/libredirect/browser_extension), you can set a frontend for YouTube like Invidious and set the instance URL to `rt://yt`. The same can be done for Twitch, you can set the frontend to SafeTwitch and set the instance URL to `rt://tw`.
### Paths
To store users, feeds and emotes, SQLite is used with [sqlx](https://crates.io/crates/sqlx).
Data (databases, window state, etc):
- Windows: `%AppData%/com.rt.app`
- Linux: `~/.config/com.rt.app`Logs:
- Windows: `%LocalAppData%/com.rt.app/logs`
- Linux: `$XDG_DATA_HOME/com.rt.app/logs` or `$HOME/.local/share/com.rt.app/logs`### Frontends
`YouTube`:
Using the excellent [RustyPipe](https://crates.io/crates/rustypipe) library to interact with YouTube.
The feed uses the faster YouTube's rss feed to retrieve videos to avoid rate limits, this sadly does not contain video duration.
The player uses Vidstack's YouTube [provider](https://vidstack.io/docs/player/api/providers/youtube/) to play videos via embeds, this has the drawbacks of not being able to play videos that disallows embedding and not being able to select a video quality.
`Twitch`:
The player uses a custom [hls.js](https://github.com/video-dev/hls.js/) loader that communicates with the backend to modify the streams m3u8 manifests, this is what allows for ad blocking as the backend can detect ads and switch to a backup stream until ads are over, this was inspired on [TwitchAdSolutions](https://github.com/pixeltris/TwitchAdSolutions) method of switching streams.
The backend uses a PersistedQuery for the feed and a custom query to the Twitch API to retrieve user data and stream playback.
## TODO
- Update screenshots.
- Add information about the content somewhere in the watch page.
- Maybe cache users/emotes/feeds in the AppState, also maybe return them when possible in the same request instead of emitting an update event.
- More logging and better errors.
- Maybe make a custom player layout using tailwind.
- YouTube:
- Maybe move from youtube embed to using RustyPipe's botguard and retrieve video URLs using it.
- Add YouTube channel page with video search.
- Allow downloading videos and thumbnails.
- Subscribe to channel from watch page.
- Search for videos in the feed.
- Twitch:
- It seems there are issues with the `avif` format in emotes in Linux, maybe use `webp` or `png` instead.
- Put the seek bar at the end when joining a stream, currently it is some seconds behind when first joining.
- Add global Twitch emotes.