fixed syntax issues

This commit is contained in:
2026-11-14 19:05:02 -08:00
parent 2cec85a8f3
commit 36b2b33ecc
29 changed files with 842 additions and 977 deletions

View File

@@ -2,105 +2,83 @@
<p class="page-description">The native Android mobile client for the Vyla ecosystem, combining hardware-accelerated shaders, automated runtime management, and mobile streaming.</p>
<img class="vyla-banner" src="/src/assets/images/android/site_preview.webp" alt="Vyla Go mobile streaming application interface" loading="lazy" decoding="async" fetchpriority="low" />
<img class="vyla-banner" src="/src/assets/images/android/site_preview.webp" alt="Vyla Go mobile application" loading="lazy" decoding="async" fetchpriority="low" />
## 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.
**Vyla Go** brings the Vyla media ecosystem to Android phones and tablets. Built with **Tauri v2 Mobile**, Vyla Go delivers a responsive touch interface with WebGL hardware shaders and background playback support.
---
## Downloads
Official APK packages are published on the [Vyla Go GitLab Releases](https://gitlab.com/vyla-entertainment/go/-/releases):
Official APKs are available on [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) |
- **[Universal APK](https://gitlab.com/vyla-entertainment/go/-/releases)**: Supports `arm64-v8a`, `armeabi-v7a`, and `x86_64` on Android 7.0+ (API 24+).
- **[ARM64 APK](https://gitlab.com/vyla-entertainment/go/-/releases)**: Optimized for modern 64-bit Android devices.
---
## 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.
- **Tauri v2 Mobile**: Native Rust Android layer with secure Chromium WebView rendering.
- **WebGL Hardware Shaders**: Dynamic backdrops and smooth gesture animations.
- **Automated Resource Updates**: Fetches and applies runtime payload updates directly from release channels without requiring full APK reinstalls for minor script updates.
- **Low-Latency Streaming**: Adaptive mobile bitrate switching with background audio playback.
---
## 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**:
- Node.js 20+
- Rust & Cargo
- Android Studio with Android SDK & NDK (API 29+)
Add 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:
Output APK location:
```
src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk
```
---
## Developer & Debugging Guide (ADB)
## Debugging with 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:
### Stream Logs
```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
Clear and re-stream:
```powershell
& "$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:
### Install to Connected 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:
### Reset 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
```

View File

@@ -2,75 +2,51 @@
<p class="page-description">The native desktop control center and player runtime for Windows, macOS, and Linux built on Tauri v2 and an embedded Node.js sidecar.</p>
<img class="vyla-banner" src="/src/assets/images/desktop/site_preview.webp" alt="Vyla Home desktop application preview displaying streaming interface" loading="lazy" decoding="async" fetchpriority="low" />
<img class="vyla-banner" src="/src/assets/images/desktop/site_preview.webp" alt="Vyla Home desktop application preview" loading="lazy" decoding="async" fetchpriority="low" />
## 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.
**Vyla Home** is the desktop client for the Vyla ecosystem. Built with **Tauri v2** and an embedded Node.js sidecar process, Vyla Home uses native system WebViews (WebView2 on Windows, WebKit on macOS/Linux) for fast startups and hardware-accelerated video decoding with minimal memory usage.
---
## Downloads
Official binary releases are published directly to the [Vyla Home GitLab Releases](https://gitlab.com/vyla-entertainment/home/-/releases):
Binary packages are available on [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.
:::
- **Windows**: [Download Setup Installer / Portable (.exe)](https://gitlab.com/vyla-entertainment/home/-/releases) (x86_64)
- **macOS**: [Download Disk Image (.dmg)](https://gitlab.com/vyla-entertainment/home/-/releases) (Universal: Apple Silicon & Intel)
- **Linux**: Build from source using the steps below.
---
## Architectural Implementation
## Architecture
Vyla Home operates via a dual-process architecture:
- **Tauri Main Process (Rust)**: Manages window state, system tray icons, native menus, and hosts the WebView.
- **Stdio IPC**: Bi-directional JSON-RPC stream passing messages between Rust and the Node.js sidecar over `stdin` and `stdout`.
- **Node.js Sidecar**: Runs `ServiceManager` for local/remote failover, verifies update signatures via `UpdateClient`, manages Discord Rich Presence, and caches local media metadata.
| 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. |
### Storage Locations
- **Windows**: `%APPDATA%\vyla-home\vyla-home-files\`
- **macOS**: `~/Library/Application Support/vyla-home/vyla-home-files/`
- **Linux**: `~/.local/share/vyla-home/vyla-home-files/`
### 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:
### Sidecar Logs
- **Windows**: `%APPDATA%\vyla-home\vyla-home-files\logs\node-debug.log`
- **macOS/Linux**: `<AppDataDir>/logs/node-debug.log`
---
## Windows Troubleshooting: WebView2 Runtime
## Windows Troubleshooting
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
```
If you encounter a `WebView2 runtime initialization error`:
1. Install the Microsoft Edge WebView2 Evergreen Runtime from Microsoft.
2. For portable installs, confirm `WebView2Loader.dll` is present in the `bin/` directory adjacent to the executable.
---
## 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
@@ -106,20 +82,11 @@ 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
```
@@ -127,30 +94,14 @@ 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
```
```bash
# Package the local application payload into update-payload.zip
npm run build:payload
```
```bash
# Test the UI shell with a simulated test harness
npm run dev -- -- --env VYLA_TEST_UI=1
```
```bash
# 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:
If a hung process locks the binary during Windows development:
```powershell
Stop-Process -Name "vyla-home", "node", "cargo" -Force -ErrorAction SilentlyContinue
```

View File

@@ -1,71 +1,38 @@
# Building a Custom Player
<p class="page-description">Architectural principles, format handling, and engineering guidelines for building resilient video players backed by Vyla infrastructure.</p>
<p class="page-description">Architectural principles, format handling, and engineering guidelines for building video players backed by Vyla infrastructure.</p>
## 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.
Vyla handles discovery, scraping, and proxying; your app owns the player. Whether building a web player, desktop shell, or mobile UI, this guide outlines the core playback patterns.
---
## Integration Boundaries
## Integration Paths
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. |
- **Node.js Backends**: Use the Vyla SDK directly in-process via `sdk.getStream()`. Ideal for custom authentication and server-side tracking.
- **Web / Mobile / TV**: Connect to the Stream API gateway via HTTP/SSE (`/movie` or `/tv`). Ideal for frontend players requiring a live streaming feed.
---
## Playback Formats: HLS vs Direct Video
## Playback Formats
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 `<video>` element `src` attribute.
- **HLS Streams (`type: "hls"`)**: Adaptive master playlists (`.m3u8`). Proxied via Stream API (`/api?url=...`), which rewrites chunk URIs and AES encryption keys with permissive CORS headers. Handled via HLS.js or native Safari.
- **Direct Video (`type: "mp4"`)**: Direct MP4 or MKV files. Proxied with HTTP Range forwarding (`206 Partial Content`) for scrubbing.
---
## Resilient Player Architecture
## Player Guidelines
Upstream streaming hosts are dynamic: network latencies fluctuate, upstream proxies fail, and geo-restrictions vary. A production-ready Vyla player must adhere to five design rules:
### 1. Start on the First Candidate
Never wait for all providers to finish. Stream API emits verified sources over Server-Sent Events (SSE). The moment the first `source` event arrives (typically within 3 to 8 seconds):
- Initialize your player immediately.
- Store any subsequent incoming `source` events in a priority fallback array.
### 2. Maintain a Fallback Priority Array
If the active stream stalls, encounters an unrecoverable network error, or buffer-underruns:
- Catch the error event (e.g. `Hls.Events.ERROR` with fatal flag).
- Pop the next candidate from your fallback queue.
- Re-attach the media source without disrupting the user's viewing session.
### 3. Decouple Subtitles from Video Playback
Subtitles are retrieved independently from the video stream. Never block initial video buffering waiting for subtitle tracks to download. Load the video stream immediately and inject subtitle tracks (`<track kind="subtitles">`) asynchronously once resolved.
### 4. Implement a Client-Side Timeout
Always set a client-side watchdog timer (typically 15 to 20 seconds). If no viable candidate emits a valid video stream before the timer expires, render an informative empty state allowing the user to retry or switch servers.
### 5. Clean Up on Title Switch
When a viewer selects a new movie or episode:
- Call `eventSource.close()` on the active SSE connection.
- Invoke `hls.destroy()` or `video.removeAttribute('src')`.
- Clear pending retry timers and abort in-flight fetch requests.
1. **Start on First Source**: Begin playback as soon as the first `source` event arrives (3–8s). Queue later events as fallbacks.
2. **Auto-Failover**: If the current stream fails, catch fatal playback errors and immediately switch to the next queued source.
3. **Async Subtitles**: Fetch subtitles in the background without blocking video buffering.
4. **Watchdog Timer**: If no working source resolves within 15–20s, show an empty state with a retry option.
5. **Clean Teardown**: When switching media, close the SSE connection and destroy the HLS instance before opening a new stream.
---
## Reference Implementation: Minimal Web Player
Below is a complete, copyable implementation using native HTML5 and HLS.js:
## Minimal Web Player Example
```html
<!DOCTYPE html>
@@ -84,7 +51,7 @@ Below is a complete, copyable implementation using native HTML5 and HLS.js:
<div id="status" class="status">Connecting to Stream API...</div>
<script>
const API_BASE = "https://your-stream-api.example.com";
const API_BASE = "https://api.vyla.cc";
const TMDB_ID = 155;
const video = document.getElementById("vyla-video");
@@ -137,7 +104,6 @@ Below is a complete, copyable implementation using native HTML5 and HLS.js:
hlsInstance.on(Hls.Events.ERROR, (event, errorData) => {
if (errorData.fatal) {
console.warn("HLS fatal error encountered. Switching to fallback candidate...");
hlsInstance.destroy();
isPlaying = false;
if (fallbackSources.length > 0) playCandidate(fallbackSources.shift());
@@ -167,11 +133,3 @@ Below is a complete, copyable implementation using native HTML5 and HLS.js:
</body>
</html>
```
---
### Next Steps
- Explore the complete [Client Integration Guide](/guides/integrations) for React, Vue, and ExoPlayer examples.
- Review error classification in the [Error Handling Guide](/guides/error-handling).
- Review the SSE event protocol in [Paths & Playback Events](/stream-api/reference/paths).

View File

@@ -2,54 +2,41 @@
<p class="page-description">The native 10-foot Leanback streaming experience for Android TV and Google TV, built with Jetpack Compose and ExoPlayer.</p>
<img class="vyla-banner" src="/src/assets/images/android-tv/site-preview.webp" alt="Vyla TV application Leanback interface on television display" loading="lazy" decoding="async" fetchpriority="low" />
<img class="vyla-banner" src="/src/assets/images/android-tv/site-preview.webp" alt="Vyla TV application Leanback interface" loading="lazy" decoding="async" fetchpriority="low" />
## 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.
**Vyla TV** is the living-room client in the Vyla ecosystem. Built as a native Android app using **Jetpack Compose for TV** and Google's **ExoPlayer (Media3)** engine, Vyla TV brings streaming to televisions and smart boxes with directional remote navigation.
---
## Downloads
Official TV APK builds are published to the [Vyla TV GitLab Releases](https://gitlab.com/vyla-entertainment/TV/-/releases):
Official TV APK builds are published on [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) |
- **[Vyla TV APK for Android TV / Google TV](https://gitlab.com/vyla-entertainment/TV/-/releases)**: Compatible with Sony Bravia, Chromecast with Google TV, NVIDIA Shield TV, and Xiaomi Mi Box.
- **[Vyla TV APK for Fire TV](https://gitlab.com/vyla-entertainment/TV/-/releases)**: Compatible with Fire TV Stick 4K / Max and Fire TV Cube.
---
## TV Experience & Features
## 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.
- **D-Pad Navigation**: Optimized exclusively for remote controls with focus management.
- **ExoPlayer Media3**: Hardware-accelerated decoding for HLS (`.m3u8`), MP4, and MKV streams up to 4K/HDR.
- **Playback Controls**: Variable playback speeds (0.5x to 2.0x), multi-track subtitle selector with sync offsets, and in-player source switching.
- **Local Library**: TMDB catalog integration, Watch Later watchlist, and automatic resume playback timestamps.
---
## Sideloading on Android TV / Fire TV
If your device does not have a direct browser installer:
## Sideloading via Downloader
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
2. In TV settings, navigate to Developer Options and enable **Install Unknown Apps** for Downloader.
3. Open Downloader and enter the release link:
```
https://gitlab.com/vyla-entertainment/TV/-/releases
```
4. Download the latest `.apk` and select **Install**.
4. Download the latest `.apk` and click **Install**.
---
@@ -57,30 +44,21 @@ https://gitlab.com/vyla-entertainment/TV/-/releases
### Prerequisites
- Node.js 20+
- Java Development Kit (JDK 17 or JDK 21)
- 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:
Output APK location:
```
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.
### Android Studio
Open the `android/` subfolder in Android Studio to inspect Kotlin source code and Jetpack Compose layouts.