Living room image is AI-generated. TV image: Starship Flight 5 liftoff, photo by Steve Jurvetson, CC BY 2.0.
Watch videos and live broadcasts from X (x.com) on your Android TV. The official X app on Android TV is gone and casting from the browser does not work, so x-cast adds a Cast button to every video on x.com in Chrome and plays it on your TV with a small companion app. Made with rocket launches in mind: SpaceX streams on X, full screen, on the big screen.
Status: alpha. Tested on an NVIDIA SHIELD TV (Android 11) with Chrome on desktop. Other Android TV / Google TV devices (Android 8.0 or newer) should work but are untested. Live broadcasts are supported but have had little real-world testing so far. Feedback and issues are welcome.
- Chrome (or another Chromium browser that can load unpacked extensions) on a desktop or laptop.
- An Android TV or Google TV device with Android 8.0 or newer, on the same home network as the computer.
- Chrome extension (
extension/): puts a standard Cast icon in the control bar of every X video, next to the full screen button. A click opens a Cast to menu with every TV on your network that runs the x-cast app. - The X player plays from a temporary
blob:URL. The extension therefore watches the real stream URLs the tab requests (video.twimg.comfor videos,*.pscp.tvfor broadcasts), links them to the right video, checks whether the stream is live, and sends the URL, title and current position to the TV. - TV app (
tv-app/, packageio.github.aaamoeder.xcast): a background service listens on port 8790 and starts when the TV boots. On a cast it wakes the TV (also from the screensaver), brings the player (Media3 / ExoPlayer) to the front and plays the stream directly from X. - Remote control on the TV: the video starts without controls. Left and right skip back and forward (5, 10, 15 or 30 seconds, set in the extension options) with a short time bar. Any other key shows the controls with the title. Back first hides the controls, a second Back closes the player.
video.twimg.com refuses (HTTP 403) any Referer other than x.com or twitter.com. The default Chromecast receiver runs on gstatic.com and always sends that referrer, so regular X videos fail with LOAD_FAILED. The x-cast TV app fetches the stream itself with Referer: https://x.com/.
The TV app is not in the Play Store, so you install the APK yourself ("sideloading"). Pick one of the two ways below. Menu names can differ a little between TV brands and Android versions.
- Install a sideloading helper from the Play Store on your TV, for example Downloader (by AFTVnews) or Send Files to TV.
- Allow that helper to install apps: Settings > Apps > Security & restrictions > Unknown sources, then turn it on for the helper.
- Download
x-cast-tv-<version>.apkfrom Releases with the helper (Downloader: enter the download link of the APK) and install it. - Allow x-cast to come to the front while another app is open: Settings > Apps > Special app access > Display over other apps, then turn on x-cast. Without this permission a cast only works while the x-cast app is open on the TV. If your TV does not show this setting, use the adb command from option B for this step.
You need adb and Network debugging (or USB debugging) enabled on the TV (Settings > Device Preferences > About: press Build seven times to unlock Developer options).
adb connect <tv-ip>:5555
adb install x-cast-tv-<version>.apk
adb shell appops set io.github.aaamoeder.xcast SYSTEM_ALERT_WINDOW allowThe last command grants the Display over other apps permission.
Open x-cast once on the TV. It starts the service and shows the address of the TV. After that it starts by itself on every boot, within about a minute after the TV is up.
- Download
x-cast-extension-<version>.zipfrom Releases and unzip it. - Open
chrome://extensions, enable Developer mode, click Load unpacked and select the unzipped folder. - Open a video on x.com, click the Cast icon and pick your TV.
A browser extension cannot discover devices the way Chromecast does. x-cast asks every address of the common home networks (192.168.0.x, 192.168.1.x, 192.168.2.x, 192.168.178.x, 10.0.0.x, 10.0.1.x) for the app. If your TV is on another network, open the extension options (right-click the x-cast icon > Options, or Details > Extension options in chrome://extensions) and enter the address that the TV app shows. Several TVs can be separated with a comma. The options also set the skip step for the remote.
- TV app: install the newer APK over the old one, the same way as above. The permission stays.
- Extension: replace the contents of the unzipped folder with the new version (keep the same folder, so your options stay) and click the reload icon of x-cast in
chrome://extensions.
- "No TV with the x-cast app found": check that the TV is on and on the same network as the computer, and that x-cast has been opened once on the TV. Right after the TV boots, wait about a minute. If it still is not found, enter the TV address in the extension options.
- The cast only works while the x-cast app is open on the TV: the Display over other apps permission is missing (see Install, step 4 or option B).
- No Cast icon on a video: reload the x.com tab after installing or updating the extension.
The TV app accepts commands from any device on your local network, like Chromecast: anyone on the same network can make the TV play a video or stop it. Use it only on a trusted home network, not on a shared or guest network.
GET /info:{"app":"x-cast","version":"...","device":"...","name":"..."}POST /play: JSON{url, title, subtitle, hls, live, position, seekStep}POST /stop: stops the playerGET /status: what is playing now
- Extension: plain JavaScript, no build step. Load
extension/unpacked. - TV app:
cd tv-app && ./gradlew :app:assembleRelease(needs the Android SDK; setsdk.dirintv-app/local.propertiesorANDROID_HOME). Release signing readsXCAST_STORE_FILE,XCAST_STORE_PASSWORD,XCAST_KEY_ALIASandXCAST_KEY_PASSWORDfrom~/.gradle/gradle.properties. Without them the release APK is unsigned;assembleDebugworks without any setup.
The extension and the TV app have their own version (see CHANGELOG.md) and their own tags: extension-vX.Y.Z and tv-app-vX.Y.Z.
x-cast is an independent project. It is not affiliated with, endorsed by or sponsored by X Corp., SpaceX or Google. "X" is a trademark of X Corp.; "Chromecast" and "Google Cast" are trademarks of Google LLC. x-cast only plays streams that X already serves to your browser; respect X's terms of service and the rights of the content owners.
Copyright (C) 2026 aaamoeder
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See LICENSE.
Uses Media3 (Apache-2.0) and NanoHTTPD (BSD-3-Clause).
The header image (docs/header.jpg) is not covered by the GPL: it contains a photo by Steve Jurvetson under CC BY 2.0, shown on an AI-generated background.
