Skip to content

dsh-video-splash

Verified

@nuonuo26/dsh-video-splash · v0.1.0 · MIT

Video splash for DeepSeek Harness: plays a film over the boot card through the web server index injection table, without touching the installed app.

Install

dsh plugin add @nuonuo26/dsh-video-splash

Confirm the layer applied with dsh --profile default --dump-config — see the install guide.

Source

Published to npm without a public repository. Inspect the package contents before installing.

Tags

Creators

Readme

@nuonuo26/dsh-video-splash · 中文说明

给 DeepSeek Harness 的启动画面加视频:启动加载卡(HARNESS + 转圈 + Loading plugins…)出现后,影片盖上播放,应用在下面照常启动。不改安装包, app.asar 一个字节都没动。

English

接入原理

Harness 的 web server 每次响应首页都会经过 index 注入表。本包用两条官方预留的口子:

口子 用途
webserver/index-inject(kind: "script") 随首页送达一小段引导脚本,由它创建覆盖层;React 接管并替换 [data-dsh-boot] 后覆盖层自行移除。
webServer.register({ kind: "prefix", path, handler }) 从本包自己的 assets/ 提供影片与静帧,支持字节范围请求,所以能拖动定位,且首页负载很小(不塞 base64)。

覆盖层由 JS 创建,永远晚于首帧绘制:加载卡照常先出现,影片随后盖上。

路由前缀不能带尾斜杠。 web server 的前缀匹配规则是 pathname === prefix || pathname.startsWith(prefix + "/"),注册 /dsh-video-splash/ 永远匹配不到 /dsh-video-splash/film.mp4,请求会落到 SPA fallback 并 404,影片加载失败、 开屏瞬间消失。本包注册的是不带尾斜杠的 /dsh-video-splash(公开 URL 仍带斜杠)。

安装

在插件页安装 @nuonuo26/dsh-video-splash,或写进 profile:

{
  "dependencies": { "@nuonuo26/dsh-video-splash": "^0.1.0" },
  "dsh": { "profile": { "bundles": ["@nuonuo26/dsh-video-splash"] } }
}

包内自带 cordis.patch.yml,所以只要引用 bundle 即可,它只插入自己的宿主插件, 不关闭任何官方条目。

行为

  • 每次启动一次。标记写在 window.name:窗口的第一个文档会写上它,刷新会保留。 Electron 整个应用进程共用一个渲染会话,若用会话级标记(sessionStorage), 会变成"一个进程只出现一次"。
  • 影片总是完整播完。覆盖层等两个信号:影片结束 且 [data-dsh-boot] 被替换。 启动快也不会切掉片尾;启动慢时品牌静帧一直留在屏幕上直到应用就绪。应用本身从不被 阻塞,一直在下面启动。
  • 结束停在品牌静帧。影片最后约 170 ms 自己淡到纯白,所以覆盖层这时换成静帧, 不会留白屏。
  • 可跳过(可配置):播放期间第一次鼠标/键盘/滚轮/触摸操作即结束开屏。
  • 尊重减少动态偏好:prefers-reduced-motion: reduce 时完全不出现。

配置

键 默认 含义
film deepseek-splash.mp4 assets/ 中作为开屏播放的文件。
still deepseek-splash-poster.webp assets/ 中作为结束静帧的文件。
fadeMs 320 覆盖层淡出时长。
allowSkip true 是否允许首次交互提前结束开屏。

两个文件都从 assets/ 提供;指向该目录之外的名称会返回 404,且只响应 GET/HEAD。

卸载

从 profile 移除该 bundle(或在插件页卸载)后重启即可,其余什么都没改, 官方启动卡原样恢复。

素材

包内影片是 DeepSeek Harness Power Swim 开屏动画。来源与使用范围见 ASSET-NOTICE.md。

已验证

开发工作区里的 node preview/validate-app-plugin.mjs 会检查:包清单与发布字段、 cordis 契约(一条不带尾斜杠的 prefix 路由、按 effect 释放、一行注入、注入文本不含 base64),以及真实 HTTP 下的资源服务——200、HEAD、206(闭区间/开区间/后缀)、416、 未知与未列名 404、编码穿越拒绝、其他方法 405、etag 复用、静帧 MIME。

另外在真实启动的 host 上测过:首页确实带注入、影片对 Range 请求返回 206、 覆盖层完整播放 3.8 秒并在 React 替换启动卡后离开。

未验证:真机启动流程。插件需要重载 profile(重启应用)才生效;启动卡的真实替换时机 决定交接时看到的是片尾还是静帧。