mirror of
https://github.com/KuekHaoYang/KVideo.git
synced 2026-05-06 22:15:06 +08:00
KVideo Apple TV App
A lightweight tvOS WebView wrapper for KVideo.
Requirements
- macOS with Xcode 15+
- Apple Developer account (free is fine for personal device sideloading)
Setup
- Open Xcode → File → New → Project
- Select tvOS → App, click Next
- Set:
- Product Name:
KVideoTV - Interface: SwiftUI
- Language: Swift
- Product Name:
- Choose a save location, click Create
- Replace the generated
KVideoTVApp.swiftwith the one in this directory - Replace the generated
ContentView.swiftwith the one in this directory - In
ContentView.swift, changekvideoURLto your deployed KVideo instance URL:let kvideoURL = "https://your-kvideo-instance.com" - Set deployment target to tvOS 16.0 or later
- Connect your Apple TV (or use the tvOS Simulator)
- Build and run (Cmd+R)
How it works
- The app is a fullscreen
WKWebViewthat loads your KVideo URL - On page load, it injects
tv-modeCSS class to activate TV-optimized styles - The Apple TV remote's swipe gestures map to scroll, and click maps to tap/focus
- Back navigation uses
allowsBackForwardNavigationGestures
Notes
- Apple TV apps cannot be published to the App Store if they're just web wrappers
- This is intended for personal sideloading only
- For AirPlay: you can also just AirPlay from iPhone/iPad/Mac without needing this app