better-sidebar 音视频预览器:原生播放器内联播放 mp4/webm/mkv/mov 等视频与 mp3/flac/wav 等音频,自带支持 HTTP Range 拖动的流式媒体路由。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:tsonglew/dsh-media-preview
GitHub 来源的插件在安装时会在你的机器上执行构建脚本。请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
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 exposes
ctx.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
链接
同类插件
zhu1090093659/dsh-web-ui★ 1766
DSH Web UI 插件与皮肤合集:任务看板、git 图、右侧面板、远程移动端 UI、桌宠、实时 token 统计与皮肤中心。
ccch1mneyyy/dsh-TUI★ 829
Claude Code 风格全屏终端 UI:像素鲸鱼顶栏、实时工作状态行、思考流式展开。
omdsh-dev/DSH-better-sidebar★ 705
侧边栏完整工作台:内置文件渲染编辑、终端、Git 与子代理,支持三方插件注册新 Tab。
huiliyi37/dsh-tianshu-tui★ 131
DeepSeek Harness 的终端 UI(TUI)。
omdsh-dev/dsh-at-file★ 117
Codex 风格的 `@file` 文件引用,输入框里直接搜索并引用工作区文件。
Nagi-ovo/dsh-visualize★ 79
对话内生成式 UI:模型把交互式 HTML 卡片直接画进会话流,带流式预览与沙箱渲染。