Skip to content
Back to search

dsh-video-skin

DSH 视频皮肤:聊天背景 + 有声开机动画 + 界面内透明度调节

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/something11235--dsh-video-skin/badge.svg)](/listings/something11235--dsh-video-skin)

HTML

<a href="/listings/something11235--dsh-video-skin"><img src="/api/listings/something11235--dsh-video-skin/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

**设置 → 插件 → 添加插件**,把下面这一行贴进输入框,点「安装」,然后**完全退出并重新打开 DSH**:

github:Something11235/dsh-video-skin#main

> 桌面版(Electron)的索引注入表是**宿主启动时收集一次**的快照,所以装完必须**完全重启 DSH** > 才会生效(刷新页面不够)。卸载:`dsh plugin --profile <你的 profile> remove dsh-video-skin`, > 或者用仓库里的 `scripts/uninstall.ps1`。

装好之后:右下角会出现一个半透明小圆钮,点开就是**透明度滑块**(调完刷新还在,不用重启); 启动时会先播放开机动画,**点一下画面**就跳过。

English: install `github:Something11235/dsh-video-skin#main` from **Settings → Plugins → Add plugin**, then **fully quit and relaunch DSH**. A small pill appears in the bottom-right corner for the transparency sliders; click anywhere during the boot animation to skip it.

---

A **video skin** for DSH: one clip becomes a looping, silent **video backdrop** behind the whole Web UI, and a second clip becomes a **boot animation** — **played with sound**, **played through to its end**, then fading into the app, and **skippable with a click**.

- Boot animation: full-window clip **with audio**, a progress bar driven by the kernel's real activation progress, and a permanent “click to skip” pill. The clip **finishes first** (`ended`), then the overlay fades out over a **fixed** `fadeMs`; the volume fades with it instead of being cut off. > Earlier builds cross-dissolved over the clip's tail and used the *actual remaining time* as the fade > duration — when the app became ready late that left only 100–200 ms, which read as a **hard cut**. > Default is now `exitMode: 'end'`; `exitMode: 'tail'` restores the crossfade (still with a fixed fade). - Backdrop: silent, looping, `object-fit: cover`, with the app's surface tokens made translucent — **the picture is clearly visible** and the text stays readable. - A **transparency slider in the UI** (bottom-right pill): two sliders, three presets, and a live body-text contrast readout; changes apply on refresh with no DSH restart. - **Zero dependencies.** The host half imports only `node:` builtins; the browser half is one inline script. Nothing in the built artifact has an `import` — which is also why a plain `github:` install works with **no build step and no `prepare` script**.

> 中文完整说明(安装、调参、控件用法、机制约束、排错、自检)见 [README.zh.md](README.zh.md)。

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 238 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # dsh-video-skin
  2. [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com)
  3. **DSH 视频皮肤**:一段短片循环铺成整个界面的**聊天背景**(无声、透明度界面里就能调),
  4. 另一段做**有声的开机动画**(片尾交叉溶解进界面、**点击画面随时跳过**)。**零依赖**。
  5. ## 安装(Install)
  6. **设置 → 插件 → 添加插件**,把下面这一行贴进输入框,点「安装」,然后**完全退出并重新打开 DSH**:
  7. ```
  8. dsh-video-skin@0.1.6
  9. ```
  10. - Prebuilt on npm (current latest `0.1.6`); `dsh-video-skin` without a version follows latest.
  11. - From source: `github:Something11235/dsh-video-skin#main`
  12. > 桌面版(Electron)的索引注入表是**宿主启动时收集一次**的快照,所以装完必须**完全重启 DSH**
  13. > 才会生效(刷新页面不够)。卸载:`dsh plugin --profile <你的 profile> remove dsh-video-skin`,
  14. > 或者用仓库里的 `scripts/uninstall.ps1`。
  15. 装好之后:右下角会出现一个半透明小圆钮,点开就是**透明度滑块**(调完刷新还在,不用重启);
  16. 启动时会先播放开机动画,**点一下画面**就跳过。
  17. English: install `github:Something11235/dsh-video-skin#main` from **Settings → Plugins → Add plugin**,
  18. then **fully quit and relaunch DSH**. A small pill appears in the bottom-right corner for the
  19. transparency sliders; click anywhere during the boot animation to skip it.
  20. ---
  21. A **video skin** for DSH: one clip becomes a looping, silent **video backdrop** behind the whole Web UI,
  22. and a second clip becomes a **boot animation** — **played with sound**, **played through to its end**,
  23. then fading into the app, and **skippable with a click**.
  24. - Boot animation: full-window clip **with audio**, a progress bar driven by the kernel's real activation
  25. progress, and a permanent “click to skip” pill. The clip **finishes first** (`ended`), then the overlay
  26. fades out over a **fixed** `fadeMs`; the volume fades with it instead of being cut off.
  27. > Earlier builds cross-dissolved over the clip's tail and used the *actual remaining time* as the fade
  28. > duration — when the app became ready late that left only 100–200 ms, which read as a **hard cut**.
  29. > Default is now `exitMode: 'end'`; `exitMode: 'tail'` restores the crossfade (still with a fixed fade).
  30. - Backdrop: silent, looping, `object-fit: cover`, with the **canvas and sidebar** surface tokens made
  31. translucent — **the picture is clearly visible** and the text stays readable.
  32. **Raised surfaces stay opaque**: the kernel paints dialogs, popovers, menus, cards and the settings
  33. view with `--dsw-alias-bg-layer-1/2/3` (`_dialog_* { background: var(--dsw-alias-bg-layer-2) }`), so
  34. those tokens are deliberately **left untouched** — otherwise the scrolling text behind a dialog shows
  35. through it and neither layer is readable.
  36. - **Light-theme hint (default `theme.mode: 'ask'`).** The asset is dark (`YAVG ≈ 0.25`), so a readable
  37. light theme needs a 0.6 white surface and the video washes out — most people never find the theme
  38. toggle. After the page loads the plugin asks once whether to switch to dark; nothing changes unless
  39. you click. `auto` switches by itself, `off` disables it. The write goes through the kernel's settings
  40. service (`ctx.settings.update('ui-theme', …)`, never by editing the profile YAML) — **never during
  41. activation**, which is what broke desktop startup in 0.1.3 (see §"Startup safety").
  42. - **A settings page too** (Settings → 视频皮肤): status summary, background-ownership toggle, the three
  43. opacity sliders, and per-asset on/off. It is a small **client half** (`client.js`, `__ModuleLoader__`
  44. lazy CJS, no build step) registered into the client `settings.section` slot; all data goes through the
  45. host routes the plugin already owns. `scripts/verify-settings.mjs` covers it and reports `SKIP` on a
  46. not-logged-in profile (where DSH exposes no Settings entry at all).
  47. - **Plays nice with wallpaper plugins.** If another plugin marks `body[data-we-wallpaper]` (the public
  48. convention from dsh-wallpaper-engine, issue #4), the skin **yields by default**: no backdrop layer,
  49. no `data-dsvs` token overrides, so the wallpaper shows through; the boot animation is untouched and
  50. the background comes back automatically when the wallpaper is cleared. Flip to 「始终接管」
  51. (`background.mode: "own"`) to take over regardless. We also expose a read-only
  52. `html[data-dsvs-background="on"]` marker so other plugins can yield in turn.
  53. - **Your media, your rules.** The panel has one row per asset: turn the boot animation off and keep
  54. the background (or the other way round), or hit 更换… to upload your own mp4/webm/ogv (≤ 96 MiB).
  55. Uploads land in `$DSH_HOME/dsh-video-skin-media/` with a content-hash filename, so a replaced file
  56. can never be served from cache; 默认 restores the bundled asset. Background changes apply live,
  57. boot changes after a DSH restart (the boot overlay comes from a startup snapshot). Config accepts
  58. either a package-relative or an absolute `file`. Verified by `scripts/verify-media.mjs` (15 assertions).
  59. - **Startup safety.** 0.1.3 called `settings.update()` while the plugin was still activating; that write
  60. rewrites the profile patch document, and the desktop welcome window aborts startup if its first RPC
  61. (`settings.describe`) is not 2xx, without retrying (`app.asar/lib/main.js:8903/13018`). 0.1.4 touches
  62. no settings during activation at all, and `tests/host.test.mjs` asserts it (`apply()` must not call
  63. `ctx.get`, and may only `inject(['webServer'])`). See `scripts/verify-theme.mjs` (17 assertions).
  64. - A **transparency panel in the UI** (bottom-right pill): three sliders — canvas, video scrim, and
  65. **raised surfaces** (dialogs/settings) — plus three presets and a live body-text contrast readout.
  66. The surface slider defaults to **100% (kernel-native opaque)**; dial it down for a frosted look.
  67. Changes persist and apply on refresh with no DSH restart.
  68. - **Zero dependencies.** The host half imports only `node:` builtins; the browser half is one inline
  69. script. Nothing in the built artifact has an `import` — which is also why a plain `github:` install
  70. works with **no build step and no `prepare` script**.
  71. > 中文完整说明(安装、调参、控件用法、机制约束、排错、自检)见 [README.zh.md](README.zh.md)。
  72. ## Screenshots (captured on this machine by `scripts/verify-browser.mjs`)
  73. | | |
  74. | --- | --- |
  75. | ![boot animation](docs/e2e-1-boot.png) | ![light theme backdrop](docs/e2e-2-app.png) |
  76. | Boot animation: clip fills the window (with sound), real boot progress bar, permanent "click to skip" pill | Light theme: backdrop fills the window, body-text contrast p5 = **7.90** |
  77. | ![dark theme backdrop](docs/e2e-3-dark.png) | ![settings, light](docs/e2e-5-settings-light.png) |
  78. | Dark theme: video clearly visible, body-text contrast p5 = **6.86**, median 16.06 (AA needs 4.5) | Settings view (light): opaque panel — the chat behind does not bleed in |
  79. ![settings, dark](docs/e2e-6-settings-dark.png)
  80. Settings view in dark theme. That layer used to be `layer-2` at alpha 0.36 (the worst case) and let the
  81. chat text show straight through the dialog; it now keeps the kernel's native opaque colour.
  82. ## Sound
  83. The desktop shell sets no `webPreferences.autoplayPolicy`, so Electron's default
  84. (`no-user-gesture-required`) applies: an unmuted `play()` succeeds and the boot animation starts with
  85. sound. A plain browser (`dsh web` in Chrome) blocks unmuted autoplay by default; the runtime then
  86. **falls back to muted playback** (never trapping you on a dead screen) and shows a **separate** sound
  87. button in the bottom-left — clicking it turns sound on without skipping, so the two intents never
  88. collide. Set `boot.sound: false` for a silent boot.
  89. ## Transparency
  90. `surface` (dark theme) and `surfaceLight` (light theme) are the two knobs that trade picture strength
  91. against readability; `veil` / `veilLight` are the scrims over the video. They are deliberately different
  92. per theme: text is light in dark mode and dark in light mode, and this asset is dark (`YAVG ≈ 0.25`), so
  93. an equally thin *white* surface drops dark text below 3:1. Measured in a real browser:
  94. | `surface` | `surfaceLight` | dark min / p5 / median | light min / p5 / median |
  95. | --- | --- | --- | --- |
  96. | **0.2** | **0.6** | **2.49 / 6.81 / 16.05** | **7.74 / 7.91 / 8.72** |
  97. | 0.2 | 0.4 | 2.52 / 6.85 / 16.06 | 4.34 / 4.52 / 5.37 |
  98. | 0.05 | 0.6 | 1.53 / 4.89 / 15.24 | 7.38 / 7.56 / 8.37 |
  99. | 0 | 0.55 | 1.22 / 4.14 / 14.71 | 5.87 / 6.06 / 6.90 |
  100. p5 (the 95% of frame area) is the meaningful readability number; `--sweep` prints this table live.
  101. ## Tuning it in the UI
  102. A small half-transparent pill sits in the bottom-right corner. Clicking it opens a panel with two
  103. sliders (panel opacity / video scrim), three presets, a **live body-text contrast readout** measured from
  104. the current video frame, and a reset button.
  105. - Dragging applies immediately; releasing writes to `$DSH_HOME/dsh-video-skin.json` through a
  106. `POST`/`DELETE /dsh-video-skin/override` route. Only those four knobs are written; everything else in
  107. the file is preserved. A **refresh** picks the values up (no DSH restart), and the file stays
  108. hand-editable.
  109. - A file rather than `localStorage`: the desktop page is served from the `dsh-app://` scheme, where Web
  110. Storage availability is not guaranteed.
  111. - If the write fails (read-only home), the panel says so — it does not pretend to have saved.
  112. - `Esc` or a click outside closes the panel; `Alt+B` toggles it; `background.controls: false` removes it.
  113. - The pill sits at `z-index: 900`, **below** the kernel's `Modal` overlay (1000) on purpose: a modal
  114. should cover everything, and a wallpaper control must not steal its clicks.
  115. ---
  116. ## Install
  117. ```powershell
  118. powershell -ExecutionPolicy Bypass -File scripts\install.ps1 # writes profile package.json + bundles
  119. powershell -ExecutionPolicy Bypass -File scripts\uninstall.ps1 # removes both again
  120. ```
  121. **A full restart of DSH is required.** The desktop (Electron) shell serves a static `index.html` and
  122. collects the index-injection table **once at host startup**, with no refresh path; `tapIndex` never
  123. applies there. So a newly installed plugin's injection rows only reach the page on the next launch.
  124. ## Configure
  125. Defaults work as shipped. To tune, write either file (the second wins):
  126. - `<plugin>/video-skin.config.json`
  127. - `%USERPROFILE%\.dsh\dsh-video-skin.json`
  128. Changes apply on page refresh. On the desktop shell the boot-animation fields are baked into the
  129. startup snapshot, so those need a restart.
  130. ```json
  131. {
  132. "boot": { "enabled": true, "fadeMs": 1000, "exitMode": "end", "skipFadeMs": 320, "holdMs": 18000, "hint": "点击画面跳过" },
  133. "background": { "enabled": true, "veil": 0.32, "surface": 0.5, "delayMs": 1200, "playbackRate": 1 }
  134. }
  135. ```
  136. `veil` (scrim over the video) and `surface` (opacity of the app's `--dsw-alias-*` surfaces) are the two
  137. knobs that trade picture strength against text readability.
  138. ## How it is wired
  139. ```
  140. Host half
  141. ├─ ctx.on('webserver/index-inject', table => table.push(styleRow, scriptRow)) ← first thing in apply()
  142. └─ ctx.inject(['webServer'], …) → /dsh-video-skin/{boot.mp4,background.mp4,config.json}
  143. with Range / ETag / 206 / 416 / HEAD
  144. ```
  145. Three constraints that must not be broken (each one was paid for):
  146. 1. **Never `kind:'script-src'`.** The desktop interpreter `await`s external script rows and a rejection
  147. kills `__DSH_BOOT_READY__`, i.e. the whole app fails to start. An inline `kind:'script'` row cannot fail.
  148. 2. **Register the injection listener synchronously in `apply()`.** An object-level `inject` delays `apply`
  149. past the host's one-shot collection, and the row then never lands.
  150. 3. **Keep the overlay on `document.body`, never inside `#root`.** The kernel hydrates `#root`'s existing
  151. boot DOM (`:scope > [data-dsh-boot]`); inserting a node there breaks hydration.
  152. The backdrop is a `position: fixed; z-index: -1` first child of `body`, so nothing in the app needs a
  153. `z-index` and no pointer interaction is blocked.
  154. ## Verify
  155. ```powershell
  156. node scripts/check-syntax.mjs
  157. node --test "tests/**/*.test.mjs"
  158. node scripts/verify-all.mjs
  159. ```
  160. `tests/runtime.test.mjs` runs the injected script inside a stub DOM with a virtual clock and asserts the
  161. real timing properties (the clip plays to `ended` before the fade; the fade span is always the configured
  162. `fadeMs`, never the remaining time; a click uses
  163. `skipFadeMs`; **unmuted is tried first and muted is the fallback**; the sound button toggles sound
  164. without skipping; the volume fades to 0 with the picture; unknown duration / no first frame / media
  165. error (retried once) / a never-ready kernel each have an upper bound that never truncates the clip).
  166. `tests/host.test.mjs` drives the real `apply()`
  167. against a real HTTP server for the Range, `ETag`, `304`, `416` and cache-header contracts.
  168. Two more suites need a live target:
  169. ```powershell
  170. # 81 assertions (Electron-equivalent autoplay) / 66 (plain browser) in a real headless Chromium over CDP:
  171. # --autoplay allow (Electron-equivalent): unmuted playback, no sound button,
  172. # webkitAudioDecodedByteCount > 0 (the audio track really decodes)
  173. # --autoplay block (plain browser) : muted fallback, sound button visible, a real mouse click on it
  174. # does NOT skip and does unmute
  175. # Plus: overlay covers the viewport, a click at the viewport centre really skips, the fade removes the
  176. # node, the backdrop layer is body's first child at z-index:-1, the --dsw-alias-* tokens really
  177. # *resolve* to translucent colours, the backdrop video really decodes, and the app really mounted.
  178. # It also samples the video frame into a canvas and reports measured WCAG contrast for body text
  179. # (this machine: dark p5 6.86 / median 16.06, light p5 7.90 / median 8.70). --sweep prints the full table.
  180. node scripts/make-verify-profile.mjs
  181. node scripts/verify-browser.mjs --url "http://127.0.0.1:19388/?token=..." --shot-dir docs
  182. node scripts/verify-browser.mjs --url "http://127.0.0.1:19388/?token=..." --autoplay block --port 9445
  183. # Composition rehearsal with the kernel's own loadProfileDirectory, which is the first thing that
  184. # can throw on the boot path. Needed because `dsh --profile desktop --dump-config` is refused.
  185. $env:ELECTRON_RUN_AS_NODE='1'
  186. & 'D:\AI\Agent\DSH官方\DeepSeek Harness.exe' scripts\rehearse-profile.mjs desktop
  187. ```
  188. ## License
  189. MIT — see [LICENSE](LICENSE).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.