dsh-video-preview
Manifest validPlay local video and audio inside the sidebar preview — HTTP Range streaming keeps memory flat at any file size, nothing buffers until you press play, playback pauses when the pane is hidden, and form
Video Preview — play video & audio inside the DeepSeek Harness sidebar
English | 中文
The problem
DeepSeek Harness (DSH) cannot play video inside the agent. Clicking a video file in the sidebar only shows a file-type icon and an "open in external app" button — to check one clip you must leave the agent, wait for a player, then switch back. Context, broken.
This plugin makes video and audio files play directly in DSH's right sidebar: click a file and the preview tab is the player. The playback surface is the mature open-source Plyr player (MIT); the plugin itself is only wiring.
Strengths
Lightweight is the primary design goal (the author fears agent tools getting dragged down by a player):
- Memory stays flat at any file size — an authenticated HTTP Range (206) route streams 2 MiB windows from disk; the browser only buffers around the playhead. Multi-GB files don't move the needle
- Nothing buffers until you press play —
preload="metadata"; opening a preview reads metadata only - Forgotten tabs cost nothing — auto-pause when the pane collapses, the tab switches, or the page hides (fullscreen playback is never interrupted); a paused player decodes nothing
- Closing releases everything — player destroyed, buffers dropped, requests aborted
- Hardware decoding via Chromium — while playing, the cost is ≈ one browser tab playing video; no ffmpeg, no transcoding processes
- Plyr vendored (~114 KB, MIT) — works offline, zero external CDN requests
Details that matter:
- Vertical (9:16 phone) footage letterboxes correctly instead of cropping
- Speed control (0.5–2x), fullscreen, keyboard shortcuts, volume/speed memory
- Chinese & English UI following the DSH locale
- Audio files included: MP3/M4A and friends play in place too
Graceful handoff for what browsers can't do:
- When the engine can't decode a file, the preview shows one-click "Open in IINA" (reads OS file associations, default app first, with icons) and "Reveal in file manager"
Weaknesses (stated honestly)
- Format ceiling: AVI, RMVB, WMV, FLV cannot play at all (browser engine limitation; they get the native-player fallback)
- DTS/AC3 audio is silent: browsers hold no decode license for these — MKVs with such tracks play video without sound and without an error; you have to notice and use the header's "Open in app" control yourself
- No pro playback features: no audio-track switching, no ASS subtitles, no frame stepping, no snapshots; HDR rendering is basic. This is a "confirm the footage" tool, not a screening room — watch seriously in a native player
- Third-party plugin pinned to DSH versions: the preview extension API is rc-stage; major DSH upgrades may need a follow-up (fully tested on 0.2.2-rc.3)
- One extra HTTP endpoint: the Host gains one authenticated streaming route (same security pattern as the built-in
/api/file: browser auth + absolute-path validation + sandboxed filesystem) - Files being written get interrupted: the preview framework's auto-refresh reloads the player repeatedly while a file is still recording/transcoding
Supported formats
| Format | Status | Notes |
|---|---|---|
| MP4 / M4V (H.264) | ✅ | The common case, fully supported |
| MOV (H.264/H.265) | ✅ | H.265 depends on OS decoding; macOS usually has hardware support |
| WebM (VP8/VP9/AV1) | ✅ | |
| MKV (H.264/VP9 video) | ✅ | AAC/MP3 audio fine; DTS/AC3 audio plays silent |
| MP3, M4A, AAC, OGG/Opus, WAV, FLAC | ✅ | Audio files |
| AVI / RMVB / WMV / FLV | ❌ | Preview offers the native-player fallback instead |
Install
Option A: local directory (recommended)
git clone https://github.com/feifandiv/dsh-video-preview.git
In DSH, open Plugins → Add plugin and select the cloned directory.
Option B: npm tarball
npm pack @fanfan4589/dsh-video-preview
tar -xzf fanfan4589-dsh-video-preview-*.tgz
Then Add plugin → select the extracted package directory.
No Host restart needed; reload the web page once so the client module loads, then click any video/audio file.
Development
node src/build.mjs # inline Plyr + styles into client.js
node src/test-host.mjs # Host streaming route: 12 assertions (Range/redirects/error codes)
node src/test-client.mjs # Client module: load, registration, vendored-Plyr smoke test
index.js is the Host half (streaming route); src/client-main.js is the Client half (preview renderer), built into client.js. Rebuild after Client changes and reload the page.
License
MIT © 2026 feifandiv.
The vendored Plyr player is also MIT; its license text is kept at vendor/PLYR-LICENSE.md.
Comments
Loading…
From the same category
by awesome-dsh-plugin
A curated list of plugins for DeepSeek Harness (dsh) · DeepSeek Harness 插件精选列表
★ 25.5k
CC0-1.0
Python
Nov 23, 2026
by woniuniuniu
DeepSeek Harness 自媒体工作台插件:一句话记灵感,一键生成脚本、封面、配图和分镜
★ 1.7k
↓ 5.6k/wk
MIT
JavaScript
Nov 18, 2026
dsh plugin --profile web add dsh-media-deskby 0xsline
DeepSeek Harness (DSH) ecosystem: curated plugins, tools, and infrastructure from dsh-external/hub and the public dsh-plugin topic.
★ 1.4k
CC0-1.0
Python
Nov 6, 2026
by keli-wen
Hire Google's Antigravity CLI (agy) as a fast Gemini staffer for Claude Code, OpenAI Codex, and DeepSeek Harness.
★ 917
MIT
JavaScript
Nov 19, 2026
dsh plugin --profile agent add agy-staffby SAOS-3624
Scene-aware storyboard for DeepSeek Harness: 9-16 numbered cells with timestamps + transcript + an audio envelope, packed into ONE image (384 tokens). Two tools: video_storyboard and video_zoom.
★ 594
↓ 17k/wk
MIT
JavaScript
Nov 23, 2026
dsh plugin --profile web add dsh-video-storyboardby omdsh-dev
DSH(DeepSeek Harness)插件:把 ego-lite 浏览器(给 AI Agent 用的 Chromium)接入 HARNESS——13 个结构化 ego_* 工具(文本语义快照、语义定位点击、表单填充、截图、CDP 控制、任务空间隔离),内置 ego 运行时,Linux + Chrome 开箱即用,无需克隆官方仓库或手动构建。
★ 570
↓ 13.5k/wk
NOASSERTION
TypeScript
Nov 23, 2026
dsh plugin --profile web add dsh-ego-browser