EmbedCast is an Android TV application for video casting and playback. Cast videos from a Linux host to your Android TV device with full remote control via WebSocket.
TODO: Add a demo GIF or screenshot of the application
| Platform | Download | Instructions |
|---|---|---|
| Android TV | Latest Release | Download APK → Install on TV |
| Linux CLI | Latest Release | Extract → Run ./cli-tool |
| Web GUI | Latest Release | Extract → Run ./web-gui |
- 🎥 Video Casting - Cast videos from Linux host to Android TV
- 🎮 Remote Control - Full playback control via WebSocket
- ⏯️ Playback Controls - Play, pause, seek, stop, quality selection
- 📺 Android TV Optimized - Built with Leanback for TV experience
- 🔄 Auto-Reconnect - Automatic WebSocket reconnection on disconnect
- 💾 Resume Playback - Save and restore video positions
- 🎨 Animated Splash - Custom animated splash screen with logo
- 📡 Real-time Status - Live video status synchronization
- Features
- Architecture
- Tech Stack
- Project Structure
- Getting Started
- Usage
- API Reference
- Contributing
- Changelog
- Roadmap
- License
┌─────────────────┐ WebSocket (8080) ┌─────────────────┐
│ │◄────────────────────────►│ │
│ Linux Host │ │ Android TV │
│ (CLI/Web GUI) │ JSON Protocol │ (EmbedCast) │
│ │ │ │
└─────────────────┘ └─────────────────┘
| Action | Description | Parameters |
|---|---|---|
load |
Load video URL | url: string |
play |
Play/Pause toggle | - |
pause |
Pause video | - |
stop |
Stop and reset | - |
seek |
Seek to position | seconds: int |
quality |
Change video quality | value: string |
reload |
Force reload (new token) | - |
| Component | Technology |
|---|---|
| Language | Kotlin |
| Min SDK | 24 (Android 7.0) |
| Target SDK | 34 (Android 14) |
| UI Framework | Android TV Leanback |
| Video Player | JWPlayer (WebView) |
| Networking | Java-WebSocket 1.5.4 |
| Media | AndroidX Media 1.7.0 |
| Component | Technology |
|---|---|
| CLI Tool | .NET 10.0 (C#) |
| Web GUI | ASP.NET Core 10.0 |
| Update Server | Python 3 |
embedCast/
├── embedCast-tv/ # Android TV Application
│ ├── app/
│ │ ├── build.gradle.kts
│ │ └── src/main/
│ │ ├── java/com/tvremote/control/
│ │ │ ├── MainActivity.kt
│ │ │ ├── SplashActivity.kt
│ │ │ ├── VideoPlayerManager.kt
│ │ │ ├── WebSocketManager.kt
│ │ │ └── PreferencesManager.kt
│ │ ├── res/
│ │ └── AndroidManifest.xml
│ └── gradle/
├── embedCast-host/ # Linux Host Controller
│ ├── cli-tool/ # Command-line interface
│ ├── web-gui/ # Web-based GUI
│ └── userscripts/ # Browser userscripts
├── experimental/ # Work in Progress
├── docs/ # Documentation
├── assets/ # Static assets
├── AGENTS.md # AI Assistant Guide
├── LICENSE # MIT License
└── README.md
| Tool | Version | Purpose |
|---|---|---|
| Android Studio | Hedgehog (2024.1)+ | Android development |
| JDK | 17+ | Java compilation |
| Android SDK | API 34 | Android platform |
| .NET SDK | 10.0+ | Host tools |
| Python | 3.10+ | Update server |
# 1. Clone the repository
git clone https://github.com/MoriNo23/embedCast.git
cd embedCast
# 2. Android TV
cd embedCast-tv
echo "sdk.dir=/path/to/your/Android/Sdk" > local.properties
./gradlew assembleDebug
# 3. Install on device
./gradlew installDebug
# 4. Host tools (optional)
cd ../embedCast-host/cli-tool
dotnet build --configuration ReleaseThe Android TV app automatically starts a WebSocket server on port 8080 when launched.
// Server starts automatically in MainActivity
webSocketManager.startServer { json ->
handleCommand(json)
}# CLI tool
./cli-tool load "https://example.com/video.mp4"
./cli-tool play
./cli-tool pause
# Python example
import websocket
ws = websocket.WebSocket()
ws.connect("ws://TV_IP:8080")
ws.send('{"action": "play"}')Request:
{
"action": "load|play|pause|stop|seek|quality|reload",
"url": "https://...",
"seconds": 10,
"value": "1"
}Response:
{
"type": "status",
"currentTime": 120.5,
"duration": 3600.0,
"paused": false
}Contributions are welcome! Please read our Code of Conduct first.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes with clear messages
- Push to the branch
- Open a Pull Request
- Follow Kotlin Coding Conventions
- Keep
MainActivity.ktunder 500 lines - Use
PackageInfoCompatfor version checks - Test WebSocket compatibility after changes
All notable changes are documented in CHANGELOG.md.
- Android TV application for video casting
- WebSocket-based remote control
- Linux CLI and Web GUI tools
- Resume playback functionality
- Auto-reconnect feature
- Adaptive icons for Android 8.0+
- CI/CD pipeline with GitHub Actions
- Multi-device casting support
- Video playlist management
- Subtitle support
- Chromecast compatibility
- iOS companion app
This project is licensed under the MIT License - see the LICENSE file for details.
If you discover a security vulnerability, please report it via:
- GitHub Issues (for non-critical issues)
- Email (for critical vulnerabilities) - contact via GitHub profile
Please read our Code of Conduct before contributing.
⭐ Star this repo if you find it useful!
