# Vyla Ecosystem - Complete Full Documentation Digest # Source: https://vyla.cc # Generated for AI/LLM context extraction and offline research. # Timestamp: 2026-11-14T20:30:00Z # # This file consolidates all documentation guides, API references, architecture specifications, # and troubleshooting workflows across the Vyla Ecosystem into a single readable document. ================================================================================ FILE: start-here/introduction.md ================================================================================ # Vyla Entertainment

A community-built, decentralized media ecosystem and developer platform focused on privacy, user sovereignty, and self-hosted streaming infrastructure.

The Vyla Ecosystem across Desktop, Android, and Android TV devices ## What is Vyla? **Vyla** is an open-source, modular media ecosystem built on a simple foundation: **users and developers should have absolute sovereignty over their media experience.** Unlike centralized streaming platforms that lock users into closed walled gardens, proprietary codecs, and telemetry tracking, Vyla separates the entire media stack into distinct, reusable layers: 1. **Client Frontends**: Native applications for Desktop (Windows, macOS, Linux), Mobile (Android), and Television (Android TV / Google TV). 2. **Scraper & Resolver SDK**: A high-performance Node.js scraping engine (`@vyla-entertainment/sdk`) aggregating over 60 distributed upstream providers with automatic jitter buffering and HLS playback verification. 3. **Stream API Gateway**: A self-hostable HTTP and Server-Sent Events (SSE) microservice proxy delivering low-latency progressive playback manifests, subtitle tracks, and media downloads. :::callout-note **Core Policy**: Vyla does not host, upload, store, or distribute video files or copyrighted media. The ecosystem provides client applications and self-hosted scraping tools that resolve publicly accessible links on demand. ::: --- ## Ecosystem Architecture at a Glance The Vyla Ecosystem is designed around modularity. Each component functions autonomously or seamlessly interconnects with other components: | Layer | Components | Core Capabilities | | :--- | :--- | :--- | | **User Interfaces** | **Vyla Home**, **Vyla Go**, **Vyla TV** | Desktop Tauri v2 with embedded sidecar, Android mobile client with WebGL shaders, and native Android TV (Jetpack Compose + ExoPlayer). | | **Distribution Gateway** | **Stream API** | Node.js cluster gateway, SSE progressive source emitter, M3U8 playlist & key rewriting proxy, and 120-byte fake-image obfuscation stripper. | | **Resolver Engine** | **Vyla SDK** (`@vyla-entertainment/sdk`) | 60+ modular source scrapers, two-phase stream verification (`verifyStream` / `verifyPlayable`), manga TLS-fingerprinted extraction, and subtitle normalization. | --- ## The Vyla Component Matrix | Component | Platform / Tech Stack | Primary Responsibility | Documentation | | :--- | :--- | :--- | :--- | | **Vyla Home** | Tauri v2, Node.js Sidecar, Rust | Full desktop control center, automatic updates, Discord RPC | [Vyla Home Guide](/products/home) | | **Vyla Go** | Tauri v2 Mobile, WebGL Shaders | Android mobile runtime, automated payload download, background playback | [Vyla Go Guide](/products/go) | | **Vyla TV** | Kotlin, Jetpack Compose, ExoPlayer | 10-foot Leanback television UI, D-pad navigation, 4K/HDR streaming | [Vyla TV Guide](/products/tv) | | **Stream API** | Node.js, Cluster Workers, SSE | Self-hosted HTTP streaming gateway, M3U8 proxy, segment stripper | [Stream API Overview](/stream-api/overview) | | **Vyla SDK** | Node.js (ESM), TLS Client, Cheerio | Multi-provider video resolver, subtitle extractor, manga engine | [SDK Overview](/sdk) | | **Custom Player** | HLS.js, Video.js, HTML5 | Custom web and native playback integration layer | [Build a Player](/products/player) | --- ## Core Principles - **Zero Centralized Telemetry**: Vyla frontends never require mandatory tracking, user account creation, or proprietary telemetry services. - **Failover by Design**: Video resolution queries multiple providers concurrently with randomized jitter. If one upstream host goes down or throttles, the client seamlessly shifts to the next viable candidate. - **Progressive Delivery**: Stream API delivers media metadata instantly, followed by source candidates streamed over Server-Sent Events (SSE) as each scraper resolves. Players start playback within 3 to 8 seconds without waiting for the slowest source. - **Local Sovereignty**: Every part of Vyla can be self-hosted locally on your laptop, home server, NAS, or virtual private server (VPS). --- ## Where to Begin Select your path based on your role: :::code-group - **On Desktop (Windows, macOS, Linux)?** Download and run [Vyla Home](/products/home). - **On Android Phone or Tablet?** Install the native [Vyla Go APK](/products/go). - **On Android TV, Google TV, or Fire TV?** Install the [Vyla TV APK](/products/tv). - **Need help with setup?** Read the [Troubleshooting Guide](/resources/troubleshooting). - **Embedding scrapers in a Node.js project?** Check out the [SDK Quickstart](/sdk/vyla-sdk/quickstart) and [Complete API Reference](/sdk/vyla-sdk/reference). - **Want to author a new provider?** Follow the [Contributing a Source Guide](/sdk/vyla-sdk/contributing). - **Integrating Manga discovery?** Read the [Manga SDK Documentation](/sdk/vyla-sdk/manga). - **Connecting a web or mobile player?** Read [Paths & Playback Events](/stream-api/reference/paths) and the [Client Integration Guide](/guides/integrations). - **Building fallback strategies?** Study the [Error Handling Guide](/guides/error-handling). - **Self-hosting the streaming gateway?** Read the [Self-Hosting Guide](/stream-api/deployment/self-hosting). --- ## Legal Notice & DMCA Compliance Vyla is self-hosted software intended for personal educational and development use. All stream resolution and scraper logic interacts with publicly available web sources. Rights holders can review our takedown policies in the [DMCA Policy](/misc/project/dmca). ================================================================================ FILE: start-here/architecture.md ================================================================================ # Architecture & System Design

Deep architectural breakdown of the Vyla Ecosystem: component boundaries, communication protocols, video delivery pipelines, and failover topologies.

## High-Level Architecture The Vyla architecture cleanly separates **presentation**, **gateway mediation**, and **content resolution**. This decoupling ensures that any individual layer can be replaced, scaled, or run independently. | Architecture Tier | Components | Protocols & Interfaces | Core Responsibilities | | :--- | :--- | :--- | :--- | | **Presentation Tier** | Vyla Home, Vyla Go, Vyla TV, Third-Party Web Players | SSE (HTTP/1.1), REST (JSON), HLS / DASH | Render user interface, manage local state, execute video playback via HLS.js or ExoPlayer Media3. | | **Gateway Tier** | Stream API (`server.js`) | Node.js Cluster IPC, HTTP/REST, SSE, Reverse Proxy | Expose public endpoints, manage 1,500-entry in-memory cache, rewrite M3U8 playlists & AES keys, strip 120-byte obfuscation masks. | | **Resolver Tier** | Vyla SDK (`@vyla-entertainment/sdk`) | Direct ESM function calls, HTTP/HTTPS scrapers | Scrape 60+ upstream providers concurrently, enforce random jitter delays, run two-phase stream validation. | | **Upstream Hosts** | Public Third-Party CDNs & Video Hosts | Encrypted TLS/HTTPS, M3U8, MP4 | Deliver raw media segments and video assets. | --- ## Component Boundaries & Responsibilities ### 1. Vyla Home (Desktop) - **Runtime Environment**: Built on [Tauri v2](https://v2.tauri.app/) using Rust and an embedded Node.js sidecar service. - **IPC Protocol**: Communicates with the sidecar process via standard input/output (`stdin`/`stdout`) passing JSON-RPC messages. - **Responsibilities**: - Manages application lifecycle, window management, and native system tray. - Automatically checks, verifies cryptographic signatures (`update-signing.pem`), and extracts delta updates from GitLab releases. - Houses the local `ServiceManager` and `Patcher` for offline and local service fallback. - Dispatches Discord Rich Presence activity updates (`discord-rpc.js`). - Persists configuration and cache to platform-specific AppData locations. ### 2. Vyla Go (Mobile) - **Runtime Environment**: Tauri v2 for Android (`tauri-android`) targeting ARM64 (`aarch64`) and x86_64 architectures. - **Responsibilities**: - Touch-optimized interface utilizing WebGL hardware shaders and glassmorphism styling. - Automated resource management: fetches, unpacks, and hot-patches runtime assets directly from remote releases without requiring full APK reinstallations for minor script updates. - Background playback coordination and media notification integration. ### 3. Vyla TV (Leanback) - **Runtime Environment**: Native Android application written in Kotlin utilizing Jetpack Compose and Google's [ExoPlayer (Media3)](https://developer.android.com/media/media3/exoplayer). - **Responsibilities**: - Strictly optimized for D-pad remote controls, 10-foot viewing distances, and Android TV / Google TV operating systems. - Native HLS stream parsing, hardware-accelerated 4K/HDR decoding, playback speed manipulation, audio track selection, and subtitle overlay. - Local client storage for user favorites, watch progress resume, and TMDB catalog browsing. ### 4. Stream API (Gateway) - **Runtime Environment**: Node.js microservice utilizing the native `cluster` module for multi-core process forking. - **Responsibilities**: - Acts as an HTTP/SSE bridge for clients that cannot run the Node.js SDK directly (e.g. mobile apps, TV apps, browser frontends). - Emits real-time playback events (`meta`, `source`, `done`) over Server-Sent Events. - Proxies HLS media streams (`/api?url=...`), automatically rewriting playlist chunk URIs and AES encryption key endpoints to bypass browser CORS and network restrictions. - Strips obfuscation masks (e.g. 120-byte fake PNG/JPEG headers used by ByteDance/TikTok-based content delivery networks). - Caches verified results for 5 minutes (TTL = 300,000 ms) in a shared inter-process memory map. ### 5. Vyla SDK (`@vyla-entertainment/sdk`) - **Runtime Environment**: Pure ES Module Node.js library. - **Responsibilities**: - Houses the core provider scraping modules (60+ scrapers in `src/sources/`). - Implements jitter scheduling, retry backoff, and custom header injection (`User-Agent`, `Referer`, `Origin`). - Performs two-phase verification on resolved candidate URLs. - Houses the Manga resolver engine leveraging `node-tls-client` to bypass TLS fingerprint blocking on `atsu.moe`. --- ## Playback Data Flow: Step-by-Step Understanding how a media stream is discovered, verified, and played: 1. **Client Establishes SSE Connection** The viewer selects a title (e.g., TMDB ID `155`), and the client initiates an HTTP Server-Sent Events handshake: ```http GET /movie?id=155 HTTP/1.1 Host: api.vyla.cc Accept: text/event-stream ``` 2. **Stream API Emits Initial Metadata** Stream API validates the identifier, queries TMDB for metadata and artwork, queries subtitle providers, and immediately delivers a `meta` event: ```json data: {"type": "meta", "meta": {"title": "The Dark Knight", "year": 2008}, "subtitles": [{"lang": "English", "url": "..."}]} ``` 3. **SDK Initiates Concurrent Provider Queries** The SDK filters active provider scrapers from configuration, applies randomized per-source jitter (0–500 ms) to avoid burst-rate triggers, and initiates upstream HTTP scraping requests concurrently. 4. **Two-Phase Stream Verification** - **Phase A (`verifyStream`)**: Executes an HTTP `HEAD` or range `GET` request against candidate stream URLs. Responses with status $\ge 400$ are discarded immediately. - **Phase B (`verifyPlayable`)**: Downloads and parses the master HLS manifest (`#EXT-X-STREAM-INF`), validates chunk resolution, and tests segment availability. 5. **Progressive Source Delivery** As each provider scraper completes two-phase verification, Stream API immediately pushes a `source` event over the active SSE stream: ```json data: {"type": "source", "source": "vidlink", "url": "https://api.vyla.cc/api?url=...", "quality": "1080p", "type": "hls"} ``` 6. **Instant Client Playback** The client media player (ExoPlayer, HLS.js, or AVPlayer) immediately begins playback upon receiving the first valid source event (typically within 3–8 seconds). Subsequent incoming sources are enqueued into a client-side fallback list. 7. **Stream Completion** Once all configured source scrapers have either returned verified streams or reached their timeout thresholds (typically 15–25 seconds), Stream API emits the completion event and closes the connection: ```json data: {"type": "done", "total": 4} ``` --- ## The HLS Proxy & De-Obfuscation Mechanics Many upstream streaming hosts employ strict CORS restrictions, IP-bound tokens, or binary header obfuscation. Vyla resolves this transparently: ### Playlist & Key Rewriting When a stream URL is proxied through `/api?url=&=1`, the gateway: 1. Requests the upstream playlist with provider-mandated `Referer` and `Origin` headers. 2. Intercepts `#EXT-X-KEY:METHOD=AES-128,URI="..."` and rewrites the key URI to route through the proxy. 3. Rewrites all chunk lines (`.ts` / `.m4s`) so that browser audio/video fetch calls pass through the proxy with valid `Access-Control-Allow-Origin: *` headers. ### Byte-Mask Stripping Certain modern providers mask `.ts` video chunks as fake image files (`image/png`, `image/jpeg`, `letsgocdn`, or TikTok CDN formats) by prepending a 120-byte image header before the MPEG-TS sync byte (`0x47`): ``` [ 120-byte Fake PNG Header (0x89 0x50 0x4E 0x47...) ] + [ MPEG-TS Payload (0x47...) ] ``` When Stream API detects these signatures via regular expressions (`TIKTOK_REGEX`, `STRIP_REGEX`), it slices off the first 120 bytes: ```javascript const stripped = (full[0] === 0x89 || full[0] === 0xFF || full[0] === 0x00) ? full.subarray(120) : full; ``` The resulting clean MPEG-TS stream is delivered to players with `Content-Type: video/MP2T`, enabling seamless playback across all platforms. --- ## Deployment Topologies Choose the deployment architecture that fits your infrastructure: | Topology | Components Used | Best For | Security & Networking | | :--- | :--- | :--- | :--- | | **All-in-One Desktop** | Vyla Home | Casual users wanting local playback on a single PC | Fully local, runs on localhost, zero open ports | | **Living Room TV** | Vyla TV + Hosted Stream API | Smart TVs, Chromecast, NVIDIA Shield | TV connects over LAN/WAN to a secure Stream API gateway | | **Private Family Server** | Stream API on VPS/NAS | Multi-device households streaming across phones, PCs, and TVs | Run behind Nginx/Caddy with TLS, enable API key protection | | **Custom Platform** | SDK in Node.js backend | Developers building bespoke streaming web applications | Complete control over DB, auth, caching, and playback logic | ================================================================================ FILE: concepts/providers.md ================================================================================ # Provider Architecture & Mechanics

How Vyla SDK sources are structured, scheduled, verified, proxied, and cached across the ecosystem.

## Overview At the heart of the Vyla ecosystem is the **Provider Layer**. Rather than relying on a single upstream video host, Vyla SDK aggregates over 60 independent, community-maintained scraping resolvers. Each provider operates with distinct upstream mechanics, domain rotations, rate-limiting policies, and security defenses. This document explains how Vyla orchestrates these disparate sources into a unified, high-reliability streaming pipeline. --- ## Provider Configuration Interface In `@vyla-entertainment/sdk`, each provider is declared in `src/config.js` via the `SourceConfig` interface: ```typescript export interface SourceConfig { key: string; // Unique source identifier (e.g. "vidlink", "vixsrc") label: string; // Human-readable display label sourceFile: string; // Scraper module filename in src/sources/ proxyParam: string; // Query parameter used for HLS proxy routing timeout: number; // Total milliseconds allowed before source abort sourcesTimeout?: number; // Secondary timeout for multi-server extraction jitter: number; // Maximum randomized startup delay in ms retries: number; // Number of automatic retry attempts on error multiUrl: boolean; // Returns multiple stream candidate URLs if true skipProxy?: boolean; // If true, returns direct upstream URLs without proxy skipVerify?: boolean; // If true, bypasses verification checks verifyHeaders?: boolean; // Injects custom headers into verification probes disabled?: boolean; // If true, provider is completely excluded cdnHeaders?: { // Custom headers injected for specific CDN patterns pattern: RegExp; headers: { Referer: string; Origin: string; }; }[]; } ``` --- ## The Query Pipeline When a client requests a title (`getStream()` in SDK or `/movie` / `/tv` in Stream API), the engine executes the following pipeline: | Pipeline Stage | Operation | Purpose & Verification | | :--- | :--- | :--- | | **1. Source Filtering** | `SOURCES.filter(!disabled)` | Excludes disabled scrapers and selects active providers based on configuration. | | **2. Jitter Staggering** | Sleep between `0` and `cfg.jitter` ms | Disperses outbound connection spikes across time to prevent DDoS protection triggers. | | **3. Concurrent Scraping** | Parallel async scraper execution | Scrapers parse HTML/JSON endpoints using customized `User-Agent`, `Referer`, and `Origin` headers. | | **4. Two-Phase Verification** | `verifyStream()` then `verifyPlayable()` | Phase 1 validates HTTP status ($< 400$ via HEAD). Phase 2 parses HLS manifests and verifies segment availability. Dead streams are discarded. | | **5. Proxy URL Rewriting** | Encodes target URL into `/api?url=...` | Adds proxy flags, sets required playback headers, and prepares segment de-obfuscation. | | **6. Progressive Emission** | Pushes SSE `source` event | Delivers playable stream candidates to the client player immediately without waiting for slower providers. | --- ## Jitter Staggering & Rate-Limit Defense If a client triggers 60 scrapers instantaneously, your client IP address could send hundreds of simultaneous HTTP requests in the same millisecond, triggering upstream Cloudflare or DDoS rate limits. To mitigate this, Vyla introduces **per-source jitter**: ```javascript const jitterDelay = Math.floor(Math.random() * (cfg.jitter || 400)); await new Promise(resolve => setTimeout(resolve, jitterDelay)); ``` By staggering outbound requests across a 100ms–800ms window, upstream hosts perceive natural traffic patterns, dramatically reducing HTTP 429 (Too Many Requests) errors. --- ## Two-Phase Playback Verification Many streaming extractors successfully return a URL, only for that URL to return an HTTP 403 Forbidden, an empty manifest, or a dead video chunk. To protect players from stalling, Vyla validates every candidate through two independent verification stages before emitting it: ### Phase 1: `verifyStream()` - Dispatches a lightweight HTTP `HEAD` request to the upstream target URL. - Enforces custom `User-Agent`, `Referer`, and `Origin` headers. - Requires HTTP status code `< 400` within 4,000 milliseconds. ### Phase 2: `verifyPlayable()` - Fetches the initial playlist bytes through the local proxy. - Validates the presence of the `#EXTM3U` header tag. - Checks for stream definitions: - If a Master Playlist: ensures valid `#EXT-X-STREAM-INF` entries exist. - If a Media Playlist: ensures valid `#EXTINF` duration tags and playable segment URIs exist. - Attempts a test read on the first media segment or key URI. - Only candidates that pass both phases are deemed **verified**. --- ## The Universal HLS Proxy & Byte-Mask Stripper Modern streaming hosts often protect their video segments by adding CORS restrictions, token signatures, or binary header masking. Stream API handles this transparently: ### 1. M3U8 Playlist Rewriting When an HLS stream is proxied, Stream API fetches the upstream playlist and rewrites every internal URI: - **AES-128 Key URIs**: `#EXT-X-KEY:METHOD=AES-128,URI="/api?url=&=1"` - **Video Chunks**: Segment URIs are rewritten to route back through the `/api` proxy endpoint. - **CORS Headers**: Returned with `Access-Control-Allow-Origin: *` and `Access-Control-Allow-Headers: *`. ### 2. Segment Byte-Mask Stripping Certain major CDNs mask MPEG-TS chunks by prepending a 120-byte fake image header (`image/png`, `image/jpeg`, TikTok CDN, or `letsgocdn` signatures) so firewalls treat them as images. When Stream API proxies these segments, it inspects the leading bytes and automatically strips the 120-byte image wrapper: ```javascript const needsStrip = searchParams.has('tt') || STRIP_REGEX.test(cleanUrl); if (needsStrip && (chunk[0] === 0x89 || chunk[0] === 0xFF || chunk[0] === 0x00)) { return chunk.subarray(120); // Strips fake header, leaving clean MPEG-TS } ``` --- ## Inter-Process Caching Verified stream results are cached in-memory with a **5-minute Time-To-Live (TTL)**: - **Cache Key**: `source_key + tmdb_id + season + episode` - In multi-core cluster deployments, cache entries are coordinated across workers via inter-process communication (IPC) messages (`cache:get`, `cache:hit`, `cache:set`). - Automatic prune routines run every 30 seconds to evict expired items and enforce maximum cache limits (default: 1,500 entries). ================================================================================ FILE: products/home.md ================================================================================ # Vyla Home (Desktop)

The native desktop control center and player runtime for Windows, macOS, and Linux built on Tauri v2 and an embedded Node.js sidecar.

Vyla Home desktop application preview displaying streaming interface ## Overview **Vyla Home** is the flagship desktop application of the Vyla ecosystem. Engineered for performance and privacy, Vyla Home packages the entire Vyla streaming runtime into a lightweight native shell using **Tauri v2** and an embedded Node.js sidecar process. Instead of running heavy web browsers with excessive RAM overhead, Vyla Home leverages system-native WebViews (WebView2 on Windows, WebKit on macOS/Linux), ensuring instant boot times, hardware-accelerated video decoding, and tiny background resource footprints. --- ## Downloads Official binary releases are published directly to the [Vyla Home GitLab Releases](https://gitlab.com/vyla-entertainment/home/-/releases): | Platform | Package Format | Architecture | Download Link | | :--- | :--- | :--- | :--- | | **Windows** | Setup Installer (`.exe`) / Portable | x86_64 (64-bit) | [Download for Windows (.exe)](https://gitlab.com/vyla-entertainment/home/-/releases) | | **macOS** | Disk Image (`.dmg`) | Universal (Apple Silicon & Intel) | [Download for macOS (.dmg)](https://gitlab.com/vyla-entertainment/home/-/releases) | | **Linux** | Source Build / Flatpak (in progress) | x86_64, aarch64 | [Build from Source](#linux-build-guide) | :::callout-info When launching Vyla Home for the first time, the application will automatically perform a self-check, initialize local caches, and establish secure RPC connections. ::: --- ## Architectural Implementation Vyla Home operates via a dual-process architecture: | Process Layer | Tech Stack | Responsibilities & Capabilities | | :--- | :--- | :--- | | **Tauri Main Process** | Rust | Manages native OS window lifecycle, system tray icons, native menus, and hosts the secure WebView renderer. | | **Inter-Process Channel** | Stdio IPC | Bi-directional JSON-RPC stream communicating over standard input and standard output (`stdin` / `stdout`). | | **Node.js Sidecar Process** | Node.js (`main.js`) | Orchestrates `ServiceManager` for local/remote fallback, verifies update cryptographic signatures via `UpdateClient`, manages Discord Rich Presence, and handles local cached data. | ### File Locations & Directory Structure Vyla Home stores its configuration, cryptographic keys, cached catalogs, and logs in standard operating system directories: | OS | Default Storage Path | | :--- | :--- | | **Windows** | `%APPDATA%\vyla-home\vyla-home-files\` | | **macOS** | `~/Library/Application Support/vyla-home/vyla-home-files/` | | **Linux** | `~/.local/share/vyla-home/vyla-home-files/` | ### Diagnostics & Logs If you encounter runtime issues, inspect the sidecar debug log: - **Windows**: `%APPDATA%\vyla-home\vyla-home-files\logs\node-debug.log` - **macOS/Linux**: `/logs/node-debug.log` --- ## Windows Troubleshooting: WebView2 Runtime On Windows systems, Vyla Home utilizes Microsoft's Evergreen WebView2 runtime. If your installation encounters a `WebView2 runtime initialization error`: 1. Ensure the Microsoft Edge WebView2 Evergreen Runtime is installed from [Microsoft's official site](https://developer.microsoft.com/en-us/microsoft-edge/webview2/). 2. For portable or standalone deployments, verify that `WebView2Loader.dll` exists in the `bin/` directory adjacent to the binary: ```bash vyla-home\bin\WebView2Loader.dll ``` --- ## Linux Build Guide To build and run Vyla Home natively on Linux distributions (such as Fedora, Ubuntu, Debian, or Arch): ### 1. Install System Dependencies :::code-group ```bash sudo dnf install -y \ webkit2gtk4.1-devel curl wget openssl-devel \ libappindicator-gtk3-devel librsvg2-devel \ gcc gcc-c++ make automake autoconf nodejs npm ``` ```bash sudo apt-get update && sudo apt-get install -y \ libwebkit2gtk-4.1-dev build-essential curl wget \ libssl-dev libayatana-appindicator3-dev librsvg2-dev \ nodejs npm ``` ```bash sudo pacman -Syu --needed \ webkit2gtk-4.1 base-devel curl wget openssl \ libappindicator-gtk3 librsvg nodejs npm ``` ::: ### 2. Install Rust Toolchain ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source "$HOME/.cargo/env" ``` ### 3. Clone and Build ```bash # Clone the repository git clone https://gitlab.com/vyla-entertainment/home.git vyla-home cd vyla-home # Install Node dependencies npm install # Package runtime payload npm run build:payload # Launch in developer mode npm run dev # Or compile production binary npm run build ``` --- ## Developer Workflows The Vyla Home repository includes specialized scripts for continuous development and release management: ```bash # Start the full application in development mode with hot reload npm run dev # Package the local application payload into update-payload.zip npm run build:payload # Test the UI shell with a simulated test harness npm run dev -- -- --env VYLA_TEST_UI=1 # Compile and package a full production installer release npm run release:full ``` ### Resolving File Locks (OS Error 32) If a hung process locks the binary during development on Windows: ```powershell Stop-Process -Name "vyla-home", "node", "cargo" -Force -ErrorAction SilentlyContinue ``` ================================================================================ FILE: products/go.md ================================================================================ # Vyla Go (Android Mobile)

The native Android mobile client for the Vyla ecosystem, combining hardware-accelerated shaders, automated runtime management, and mobile streaming.

Vyla Go mobile streaming application interface ## Overview **Vyla Go** brings the power of the Vyla media ecosystem directly to Android smartphones and tablets. Built using **Tauri v2 Mobile**, Vyla Go delivers a fluid, responsive touch experience backed by native hardware acceleration and custom WebGL shaders. Designed for mobile reliability on varying cellular and Wi-Fi networks, Vyla Go automatically coordinates local resource extraction, service fallbacks, and remote update fetching without requiring constant manual APK re-installations. --- ## Downloads Official APK packages are published on the [Vyla Go GitLab Releases](https://gitlab.com/vyla-entertainment/go/-/releases): | Package | Target Architectures | Compatibility | Download Link | | :--- | :--- | :--- | :--- | | **Universal APK** | `arm64-v8a`, `armeabi-v7a`, `x86_64` | Android 7.0+ (API 24+) | [Download Universal APK](https://gitlab.com/vyla-entertainment/go/-/releases) | | **ARM64 APK** | `aarch64` | Modern 64-bit Android Devices | [Download ARM64 APK](https://gitlab.com/vyla-entertainment/go/-/releases) | --- ## Key Features - **Tauri v2 Mobile Architecture**: Native Rust-backed Android application layer with secure Chromium WebView rendering. - **Hardware-Accelerated WebGL Shaders**: Real-time dynamic glassmorphism, responsive ambient backdrops, and fluid gesture navigation. - **Automated Resource Management**: Downloads and unpacks core service updates directly from official release channels, keeping scraper definitions up to date. - **Low-Latency Mobile Playback**: Supports HLS and direct stream resolution with adaptive mobile bitrate handling. --- ## Building from Source ### Prerequisites Before compiling Vyla Go, ensure your development environment has: - **Node.js**: v20 or newer - **Rust & Cargo**: Latest stable toolchain - **Android Studio**: Android SDK & NDK (v29+) - **Cross-Compilation Targets**: ```bash rustup target add aarch64-linux-android x86_64-linux-android ``` ### Build Commands ```bash # 1. Install project dependencies npm install # 2. Package the runtime update payload npm run build:payload # 3. Compile the release APKs npm run build:apk ``` The compiled release packages are output to: ``` src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk ``` --- ## Developer & Debugging Guide (ADB) The Vyla Go repository provides complete ADB integration for debugging, log collection, and direct device installation: ### Streaming Device Logs Monitor the application logs in real time via ADB: ```powershell # Stream live application logs tagged VylaGo & "$env:LOCALAPPDATA\Android\Sdk\platform-tools\adb.exe" logcat -s VylaGo # Clear the log buffer and stream fresh output & "$env:LOCALAPPDATA\Android\Sdk\platform-tools\adb.exe" logcat -c & "$env:LOCALAPPDATA\Android\Sdk\platform-tools\adb.exe" logcat -s VylaGo ``` ### Crash Diagnostics Inspect unhandled exceptions, native SIGSEGV errors, and runtime failures: ```powershell & "$env:LOCALAPPDATA\Android\Sdk\platform-tools\adb.exe" logcat -d | Select-String "VylaGo|AndroidRuntime|FATAL" ``` ### Direct Device Installation Install your newly built APK directly to a connected USB or Wi-Fi debug device: ```powershell & "$env:LOCALAPPDATA\Android\Sdk\platform-tools\adb.exe" install -r "src-tauri\gen\android\app\build\outputs\apk\universal\release\app-universal-release.apk" ``` ### Resetting App State To completely terminate and purge cached app state: ```powershell & "$env:LOCALAPPDATA\Android\Sdk\platform-tools\adb.exe" shell am force-stop com.vyla.go & "$env:LOCALAPPDATA\Android\Sdk\platform-tools\adb.exe" shell pm clear com.vyla.go ``` ### Fixing Emulator DNS Timeouts When running Android emulators that fail to reach remote release endpoints: ```powershell & "$env:LOCALAPPDATA\Android\Sdk\platform-tools\adb.exe" shell settings put global private_dns_mode off ``` ================================================================================ FILE: products/tv.md ================================================================================ # Vyla TV (Android TV)

The native 10-foot Leanback streaming experience for Android TV and Google TV, built with Jetpack Compose and ExoPlayer.

Vyla TV application Leanback interface on television display ## Overview **Vyla TV** is the living-room client in the Vyla ecosystem. Built entirely as a native Android application using modern **Jetpack Compose for TV** and Google's high-performance **ExoPlayer (Media3)** engine, Vyla TV brings the decentralized media experience to large displays. Every interface component in Vyla TV is designed specifically for remote control navigation, ensuring seamless D-pad focus management, rapid title browsing, and cinema-grade playback. --- ## Downloads Official TV APK builds are published to the [Vyla TV GitLab Releases](https://gitlab.com/vyla-entertainment/TV/-/releases): | Platform | Format | Recommended Target Devices | Download Link | | :--- | :--- | :--- | :--- | | **Android TV / Google TV** | `.apk` | Sony Bravia, Chromecast with Google TV, NVIDIA Shield TV, Xiaomi Mi Box | [Download Vyla TV APK](https://gitlab.com/vyla-entertainment/TV/-/releases) | | **Amazon Fire TV** | `.apk` | Fire TV Stick 4K / Max, Fire TV Cube | [Download Vyla TV APK](https://gitlab.com/vyla-entertainment/TV/-/releases) | --- ## TV Experience & Features - **D-Pad Directional Navigation**: Engineered from the ground up for directional remotes. No mouse pointers, virtual cursors, or awkward touch adaptations. - **ExoPlayer Media3 Engine**: Hardware-accelerated video decoding with direct support for adaptive HLS (m3u8), MP4, and MKV streams. - **Playback Control Matrix**: - Variable playback speeds (0.5x, 0.75x, 1.0x, 1.25x, 1.5x, 2.0x). - Multi-track subtitle selector with custom sync adjustment and font sizing. - Multi-stream source switcher to toggle between upstream providers without leaving the player. - **Catalog & Library**: - TMDB catalog integration with detailed cast, plot synopses, and genre filters. - "Watch Later" watchlist and persistent "Favorites" library stored locally on device. - Instant resume tracking with automatic timestamp memory. --- ## Sideloading on Android TV / Fire TV If your device does not have a direct browser installer: 1. Install **Downloader by AFTVnews** from the Google Play Store or Amazon Appstore. 2. In your TV's settings, navigate to **Settings > System > Developer Options** (or **Device & Software > Developer Options**) and enable **Install Unknown Apps** for Downloader. 3. Open Downloader and enter the direct APK URL from our releases: ```bash https://gitlab.com/vyla-entertainment/TV/-/releases ``` 4. Download the latest `.apk` and select **Install**. --- ## Building from Source ### Prerequisites - Node.js 20+ - Java Development Kit (JDK 17 or JDK 21) - Android SDK with Android TV API 26+ ### Build Steps ```bash # Clone the repository git clone https://gitlab.com/vyla-entertainment/TV.git vyla-tv cd vyla-tv # Install JavaScript asset bundling tools npm install # Build JS resolver bundle and compile debug APK via Gradle npm run dev ``` The resulting package will be generated at: ``` android/app/build/outputs/apk/debug/vyla.apk ``` ### Developing in Android Studio To inspect Kotlin source code or UI composables directly: 1. Launch Android Studio. 2. Choose **Open an Existing Project** and select the `android/` subfolder inside the TV repository. 3. Allow Gradle to sync and build targets. ================================================================================ FILE: products/player.md ================================================================================ # Building a Custom Player

Architectural principles, format handling, and engineering guidelines for building resilient video players backed by Vyla infrastructure.

## Overview In the Vyla ecosystem, you are never locked into an official frontend. Vyla provides the discovery, resolution, and proxy layers; your application owns the player experience. Whether you are building a custom web portal, desktop client, or mobile app, this guide covers the core engineering patterns required for a robust player. --- ## Integration Boundaries Choose your integration point based on your architecture: | Architecture | Integration Point | Data Flow | Best For | | :--- | :--- | :--- | :--- | | **Node.js Backend** | **Vyla SDK Directly** | `sdk.getStream()` in-process | Applications with full backend control, custom authentication, and server-side session tracking. | | **Browser / Mobile** | **Stream API Gateway** | SSE `/movie` or `/tv` over HTTP | Web applications, smart TV frontends, or lightweight mobile clients requiring an HTTP/SSE source feed. | --- ## Playback Formats: HLS vs Direct Video Resolved candidate streams come in two primary container types: 1. **HLS Streams (`type: "hls"`)**: - Master M3U8 playlists containing multiple bitrate/resolution variants. - Proxied through Stream API (`/api?url=...`), which automatically rewrites chunk URLs and AES-128 encryption key URIs. - Requires native HLS support (Safari on macOS/iOS) or a JavaScript HLS MSE library such as [HLS.js](https://github.com/video-dev/hls.js/) in modern browsers. 2. **Direct Media Files (`type: "mp4"`)**: - Progressive MP4 or MKV streams. - Proxied with HTTP Range header forwarding (`206 Partial Content`), allowing smooth scrubbing and seeking. - Directly assignable to the HTML5 `