From ff5860d3c7b3578772f3688acb0d099daccc08b4 Mon Sep 17 00:00:00 2001 From: Developer Date: Fri, 20 Mar 2026 12:03:24 +0800 Subject: [PATCH] chore: prepare project for open source release - Remove internal planning docs (CLAUDE.md, docs/, feature.md, livePlan.md) from git tracking - Add .gitignore rules to prevent re-tracking internal files - Add README.md (Chinese) and README.en.md (English) with screenshots, features, quick start - Add LICENSE (MIT) - Add CONTRIBUTING.md with dev setup, commit conventions, PR guide - Add CHANGELOG.md for v1.0.0 - Add .github/ issue templates (bug report, feature request) and PR template - Add public/ screenshots (p1-p6) --- .github/ISSUE_TEMPLATE/bug_report.yml | 68 ++ .github/ISSUE_TEMPLATE/feature_request.yml | 41 ++ .github/PULL_REQUEST_TEMPLATE.md | 30 + .gitignore | 6 + CHANGELOG.md | 50 ++ CLAUDE.md | 226 ------- CONTRIBUTING.md | 96 +++ LICENSE | 21 + README.en.md | 184 +++++ README.md | 184 +++++ docs/bilibili-live-danmaku-research.md | 218 ------ docs/superpowers/bug.md | 196 ------ .../plans/2026-03-10-dash-1080p.md | 276 -------- .../plans/2026-03-10-player-ui-redesign.md | 627 ------------------ .../plans/2026-03-11-big-video-card.md | 462 ------------- .../specs/2026-03-10-player-ui-redesign.md | 90 --- .../specs/2026-03-11-big-video-card-design.md | 118 ---- feature.md | 154 ----- livePlan.md | 106 --- public/p1.jpg | Bin 0 -> 240482 bytes public/p2.jpg | Bin 0 -> 201800 bytes public/p3.jpg | Bin 0 -> 165602 bytes public/p4.jpg | Bin 0 -> 136055 bytes public/p5.jpg | Bin 0 -> 254726 bytes public/p6.jpg | Bin 0 -> 155243 bytes 25 files changed, 680 insertions(+), 2473 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 CHANGELOG.md delete mode 100644 CLAUDE.md create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 README.en.md create mode 100644 README.md delete mode 100644 docs/bilibili-live-danmaku-research.md delete mode 100644 docs/superpowers/bug.md delete mode 100644 docs/superpowers/plans/2026-03-10-dash-1080p.md delete mode 100644 docs/superpowers/plans/2026-03-10-player-ui-redesign.md delete mode 100644 docs/superpowers/plans/2026-03-11-big-video-card.md delete mode 100644 docs/superpowers/specs/2026-03-10-player-ui-redesign.md delete mode 100644 docs/superpowers/specs/2026-03-11-big-video-card-design.md delete mode 100644 feature.md delete mode 100644 livePlan.md create mode 100644 public/p1.jpg create mode 100644 public/p2.jpg create mode 100644 public/p3.jpg create mode 100644 public/p4.jpg create mode 100644 public/p5.jpg create mode 100644 public/p6.jpg diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..34811e2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,68 @@ +name: Bug 报告 +description: 报告一个 Bug +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + 感谢你提交 Bug 报告!请尽量填写完整信息,帮助我们更快定位问题。 + + - type: dropdown + id: platform + attributes: + label: 运行平台 + options: + - Android(Dev Build) + - Android(Expo Go) + - iOS(Dev Build) + - iOS(Expo Go) + - Web + validations: + required: true + + - type: dropdown + id: category + attributes: + label: 问题分类 + options: + - 视频播放 + - 直播 + - 弹幕 + - 登录 / 账号 + - 下载 + - UI / 界面 + - 其他 + validations: + required: true + + - type: textarea + id: description + attributes: + label: 问题描述 + placeholder: 请描述你遇到的问题... + validations: + required: true + + - type: textarea + id: steps + attributes: + label: 复现步骤 + placeholder: | + 1. 打开 App + 2. 点击 ... + 3. 发现 ... + validations: + required: true + + - type: textarea + id: expected + attributes: + label: 期望行为 + placeholder: 你期望发生什么? + + - type: textarea + id: logs + attributes: + label: 错误日志 / 截图 + description: 如有控制台报错或截图,请粘贴在此 + render: shell diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..e7c235d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,41 @@ +name: 功能建议 +description: 建议一个新功能或改进 +labels: ["enhancement"] +body: + - type: markdown + attributes: + value: | + 感谢你的建议!在提交前请先搜索现有 Issue,避免重复。 + + - type: textarea + id: problem + attributes: + label: 需求背景 + placeholder: 这个功能解决了什么问题?目前的痛点是什么? + validations: + required: true + + - type: textarea + id: solution + attributes: + label: 建议方案 + placeholder: 你期望的功能是怎样的? + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: 替代方案 + placeholder: 你是否考虑过其他方案? + + - type: dropdown + id: contribute + attributes: + label: 是否愿意提交 PR? + options: + - 是,我愿意实现这个功能 + - 否,希望维护者实现 + - 不确定 + validations: + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..771d440 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,30 @@ +## 改动说明 + +> 简要描述本次 PR 做了什么 + +## 改动类型 + +- [ ] Bug 修复 +- [ ] 新功能 +- [ ] 重构(不改变功能) +- [ ] 文档更新 +- [ ] 其他: + +## 关联 Issue + +> 关闭 #(Issue 编号) + +## 测试平台 + +- [ ] Android(Dev Build) +- [ ] Android(Expo Go) +- [ ] iOS +- [ ] Web + +## 截图 / 录屏(如适用) + +## 注意事项 + +- [ ] 代码中无硬编码账号信息(SESSDATA、uid 等) +- [ ] Commit 信息符合 Conventional Commits 规范 +- [ ] 已在本地测试通过 diff --git a/.gitignore b/.gitignore index 9a3e113..f12aac3 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,9 @@ yarn-error.* # git worktrees .worktrees/ + +# Internal AI instructions & planning docs +CLAUDE.md +docs/ +feature.md +livePlan.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..ca6a62e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,50 @@ +# Changelog + +所有重要更新都记录在此文件中。 +格式参考 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/)。 + +--- + +## [1.0.0] — 2026-03-20 + +### 首个正式版本 + +#### 视频播放 +- DASH 完整播放:Bilibili DASH 接口 → `buildDashMpdUri()` 生成本地 MPD → ExoPlayer 原生解码 +- 支持多清晰度切换(360P / 480P / 720P / 1080P / 1080P+ / 4K) +- BigVideoCard 首页内联 DASH 静音自动播放,支持水平手势快进、进度条/缓冲条 +- 全局迷你播放器(MiniPlayer),切换页面后底部浮层续播 +- WebView 降级方案(NativeVideoPlayer),兼容 Expo Go 环境 + +#### 直播 +- 直播 Tab 顶部显示关注主播在线状态 +- 双列直播卡片网格 + 横向分区筛选 +- 热门列表中穿插直播推荐卡片 +- LivePlayer 支持 HLS 多画质切换 +- 直播弹幕 WebSocket 实时接收,舰长标记 + 礼物计数 + +#### 弹幕系统 +- 视频弹幕:XML 全量拉取 + 时间轴同步 drip 渲染 +- DanmakuOverlay 飘屏覆盖层(5 车道滚动) +- DanmakuList 支持实时直播模式(保留最近 500 条) + +#### 搜索 & 内容 +- 视频关键词搜索 + 分页加载 +- 视频详情:简介 / 评论 / 弹幕 三 Tab +- 推荐视频流(无限滚动) +- 评论列表(热评 / 最新排序切换) + +#### 账号 & 设置 +- 扫码登录(二维码 + 2s 轮询 + SESSDATA 自动提取) +- 登录态持久化(AsyncStorage) +- 封面图清晰度设置(高清 / 普通,节省流量) + +#### 下载 & 分享 +- 多清晰度视频后台下载 +- 下载管理页(播放、删除已下载视频) +- 局域网 HTTP 服务器,生成 QR 码分享,同 Wi-Fi 设备扫码直接播放 + +#### 跨平台 +- Android、iOS、Web 三端支持 +- Expo Go 扫码快速运行(UI 预览模式) +- Dev Build 完整功能(DASH 原生播放) diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 6b59bc9..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,226 +0,0 @@ -# reactBilibiliApp — 项目架构与技术要点 - -## 项目概述 -仿 B 站 React Native 客户端,使用 Expo SDK 55 + expo-router,调用 Bilibili 官方 Web API 获取热门视频、直播、视频详情、弹幕、评论、搜索及扫码登录。 - -## 技术栈 -| 层 | 技术 | -|---|---| -| 框架 | React Native 0.83 + Expo SDK 55 | -| 路由 | expo-router v4(文件系统路由,Stack 导航) | -| 状态管理 | Zustand | -| 网络请求 | Axios | -| 本地存储 | @react-native-async-storage/async-storage | -| 视频播放(详情页/直播) | react-native-video(DASH/HLS/MP4)| -| 视频播放(首页 BigCard) | react-native-video(DASH MPD,内联自动播放) | -| 视频播放(WebView 降级) | react-native-webview(NativeVideoPlayer) | -| 页面滑动 | react-native-pager-view(首页热门/直播 Tab) | -| 图标 | @expo/vector-icons(Ionicons) | - -## 目录结构 -``` -app/ - _layout.tsx # 根布局:Stack 导航 + 启动时恢复登录态/下载列表/设置 - # 全局挂载 - index.tsx # 首页:PagerView 切换热门/直播;绝对定位悬浮导航栏 - video/ - _layout.tsx # Stack 导航(无头部) - [bvid].tsx # 视频详情页(播放 + 简介/评论/弹幕 三 Tab + 推荐视频 + 下载) - live/ - _layout.tsx # Stack 导航(无头部) - [roomId].tsx # 直播详情页(HLS/FLV 播放 + 简介/弹幕 Tab) - search.tsx # 搜索页(关键词搜索视频) - downloads.tsx # 下载管理页(已下载视频列表) - settings.tsx # 设置页(封面图清晰度 + 退出登录) - -components/ - VideoCard.tsx # 双列视频卡片(封面、标题、UP主、播放量);读 settingsStore 决定图片质量 - BigVideoCard.tsx # 全宽视频卡片(首页热门精选),内联 react-native-video 自动播放, - # 支持静音/取消静音、水平滑动快进、进度条/缓冲条 - LiveCard.tsx # 直播房间卡片(封面、主播、在线人数、直播状态脉冲点) - LivePulse.tsx # 直播红点动画组件 - VideoPlayer.tsx # 视频播放器入口:web →