插件目录 / UI & Skins / dsh-media-preview
dsh-media-preview
已验证 · 实测可装 tsonglew
功能简介
音视频预览:原生播放+Range流
可用 — 实测通过,早期项目
音视频预览:原生播放+Range流 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-media-preview
Audio and video preview for the DeepSeek Harness (dsh) web GUI, registered as
a FileViewer inside
dsh-better-sidebar. Open an.mp4/.webm/.mkv/.mov/… or .mp3/.flac/.wav/… file in the sidebar
file tree and it plays inline with native controls.
| Video | Audio |
|---|---|
Why a dedicated route
better-sidebar's built-in /sidebar/file media route reads whole files into
memory, has no HTTP Range support, and caps at an image-oriented size
limit. This package serves media through its own streaming route
(/media-preview/file) with:
- HTTP Range (206) seeking — the browser can jump anywhere in a long video
- Streamed responses (
fs.createReadStream) — no whole-file buffering - Whole-filesystem scope behind the same browser trust fence the built-in
/apidocuments (loopback Host + same-origin markers), matching the
official directory-picker browse backend — the sidebar explorer browses
outside the session cwd (e.g. a music folder in~/Documents), and media
files must play wherever the explorer can open them
Supported extensions
Video: mp4 webm mov m4v mkv avi ogv ts 3gp flv
Audio: mp3 wav ogg oga m4a aac flac opus weba wma
Extension-less media is still claimed via magic-byte sniffing (ftyp,
EBML, OggS, fLaC, RIFF/WAVE, RIFF/AVI, ID3, MP3 frames).
Install
dsh plugin --profile web add github:tsonglew/dsh-media-preview
(Requires dsh-better-sidebar ≥ 0.4.0, which exposesctx.betterSidebar.registerFileViewer.)
Configuration
All fields optional (profile patch layer):
- id: media-preview
config:
maxMediaBytes: 2147483648 # hard cap on one served file (default 2 GiB)
trustedHosts: [] # extra non-loopback authorities
License
MIT
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-media-preview」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:tsonglew/dsh-media-preview Headless(CLI)profile:
dsh plugin --profile headless add github:tsonglew/dsh-media-preview 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。
使用场景
改变 dsh 的外观或交互方式——一套主题、皮肤或新面板,重塑工作区。
适合谁
在 web UI 里一待几小时、想让它按自己的习惯好看又好用的人。
二次开发建议
皮肤、面板和主题 token 是扩展点——写新皮肤、加面板,或与上游配色同步 token。