From c8bb8537c82af6d25130bacfbe4f88520c9a8fa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=B2=A9=E5=B2=A9?= Date: Thu, 5 Feb 2026 12:42:12 +0800 Subject: [PATCH] =?UTF-8?q?chore(config):=20=E6=9B=B4=E6=96=B0=20gitignore?= =?UTF-8?q?=20=E5=92=8C=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 Docker、Android、Web 相关忽略项 - 更新 README 项目结构和构建说明 - 添加 Android TV 文档 --- .gitignore | 129 ++++++++++++++++++++++++++++++++++++++++++++++++++--- README.md | 71 +++++++++++++++++++++++++++++ 2 files changed, 195 insertions(+), 5 deletions(-) create mode 100644 README.md diff --git a/.gitignore b/.gitignore index 8eb8ca7..0e7ec0a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,125 @@ +# ================================================ +# System files +# ================================================ .DS_Store -dist-web -node_modules -package-lock.json -pnpm-lock.yaml -desktop/src-tauri/target \ No newline at end of file +Thumbs.db + +# ================================================ +# IDE +# ================================================ +.idea/ +.vscode/settings.json +*.swp +*.swo +*~ + +# ================================================ +# Dependencies +# ================================================ +node_modules/ +.pnpm-store/ + +# ================================================ +# Build outputs +# ================================================ +# UI +ui/dist-web/ +ui/dist/ + +# Web +web/public/ +web/dist/ + +# Desktop +desktop/src-tauri/target/ +desktop/dist/ +desktop/*.log + +# ================================================ +# Android +# ================================================ +android/.gradle/ +android/.idea/ +android/local.properties +android/*.iml +android/app/build/ +android/app/release/ +android/captures/ +android/*.hprof +android/.cxx/ +android/app/src/main/assets/www/ +!android/app/src/main/assets/error.html +!android/app/src/main/assets/test.html + +# ================================================ +# Android TV +# ================================================ +android-tv/.gradle/ +android-tv/.idea/ +android-tv/local.properties +android-tv/*.iml +android-tv/app/build/ +android-tv/app/release/ +android-tv/captures/ +android-tv/*.hprof +android-tv/.cxx/ +android-tv/app/src/main/assets/www/ +!android-tv/app/src/main/assets/error.html +!android-tv/app/src/main/assets/test.html + +# ================================================ +# HarmonyOS +# ================================================ +harmonyos/.idea/ +harmonyos/build/ +harmonyos/entry/build/ + +# ================================================ +# Docker +# ================================================ +docker-compose.override.yml +.env.docker +.env.production +*.pem +*.key + +# ================================================ +# Logs +# ================================================ +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +# ================================================ +# Environment +# ================================================ +.env +.env.local +.env.*.local +.env.development +.env.test + +# ================================================ +# Testing +# ================================================ +coverage/ +.nyc_output/ + +# ================================================ +# Temporary files +# ================================================ +*.tmp +*.temp +.cache/ +*.pid +*.seed +*.pid.lock + +# ================================================ +# Misc +# ================================================ +*.tgz +*.tar.gz diff --git a/README.md b/README.md new file mode 100644 index 0000000..3831993 --- /dev/null +++ b/README.md @@ -0,0 +1,71 @@ +# 📺 IPTV 跨平台应用 + +基于 Web 技术的跨平台 IPTV 播放器,一套代码支持 Windows、Mac、Android、Android TV、HarmonyOS。 + +## 项目结构 + +``` +iptv-app/ +├── ui/ # 🌐 Web 核心代码 (Vue 3) +│ ├── src/ +│ │ ├── components/ # 播放器组件 +│ │ ├── utils/ # M3U 解析等工具 +│ │ └── App.vue # 主应用 +│ ├── public/ # 静态资源 +│ └── dist-web/ # 📦 Web 构建输出(各平台共用) +├── web/ # 网页端,nodejs中间层+docker封装 +├── desktop/ # 🖥️ Tauri 桌面端 (Win/Mac) +├── android/ # 📱 Android WebView 壳 +├── android-tv/ # 📺 Android TV WebView 壳 +└── harmonyos/ # 🔶 HarmonyOS WebView 壳 +``` + +## 技术栈 + +| 平台 | 技术 | 说明 | +|------|------|------| +| UI 核心 | Vue 3 + Vite + hls.js | 一套代码,所有平台共用 | +| Web | Nodejs | 中间层代理,解决跨域问题 | +| Desktop | Tauri (Rust) | 轻量 (~5MB),高性能 | +| Android | WebView + ExoPlayer | 手机/平板 Web 壳 | +| Android TV | WebView + Leanback | TV 专用,支持遥控器导航 | +| HarmonyOS | Web 组件 + Video 组件 | Web 壳 + 原生播放器 | + +## 快速开始 + +### Docker Web(推荐) + +```bash +# 1. 构建 Web UI +cd ui && npm run build + +# 2. 启动 Docker 服务 +cd ../web +docker-compose up -d + +# 访问 http://localhost:3000 +``` + +### Android 构建 + +```bash +# 1. 构建 Web UI +cd ui +npm install +npm run build + +# 2. 构建 Android APK +cd ../android +./build.sh +``` + +APK 输出位置: `android/app/build/outputs/apk/debug/app-debug.apk` + +### Android TV 构建 + +```bash +cd android-tv +./build.sh +``` + +--- \ No newline at end of file