seal 中文文档 下载 App

Kotlin + Jetpack Compose — Seal 的 MAD 架构与依赖链

MAD 架构是什么

Seal 的 README 里有一行:

MAD: UI and logic written with pure Kotlin. Single activity, no fragments, only composable destinations.

MAD 是 Google 推荐的现代安卓应用架构(Modern Android Development),核心原则就是用 Jetpack Compose 构建 UI、用 Kotlin 写全部逻辑、用 Compose Navigation 做路由。Seal 是这个架构的典型践行者:

这意味着 Seal 的 UI 代码量比传统 View 系统小很多,状态管理更直接(Compose 的 StateHoisting),主题/色板统一(Material You 动态取色天然适配)。

youtubedl-android 桥接

Seal 自己不实现视频解析——这个工作完全交给 yt-dlp(Python)。安卓上运行 Python 需要 Python 解释器,youtubedl-android 就是帮你把这一切打包好的库:

  1. 把 CPython 解释器编译成安卓 native binary(arm64-v8a、armeabi-v7a、x86_64、x86)
  2. 把 yt-dlp 源码和 Python 第三方依赖(mutagen、pycryptodomex 等)打包进 assets
  3. 提供 Kotlin API 供应用代码调用 Python 函数

Seal 的 Kotlin UI → youtubedl-android Kotlin API → Python 解释器 → yt-dlp 脚本 → 返回解析结果 → Seal UI 渲染格式列表,这就是数据流经的完整链。

ffmpeg 依赖

Seal 里 ffmpeg 也作为 native binary 打包:

其他依赖

继续到 GPLv3 开源协议 了解 Seal 的授权条款和品牌名限制,或跳到 GitHub 仓库 参与社区。