Introduction¶
DeepSeek Harness (DSH) currently cannot play videos within the agent. When you click a video file in the sidebar, you only see a file icon and an “Open in external app” button: to inspect a clip, you have to leave the agent, wait for a player, and then switch back — breaking your context.
The Video Preview plugin enables video and audio files to play directly in the DSH right sidebar: click a file, and the preview tab becomes the player. The player is built on the mature open-source Plyr (MIT), and the plugin itself is primarily responsible for wiring things together.
Plugin Positioning¶
This is a preview plugin for DeepSeek Harness, developed by maintainer feifandiv. It provides lightweight, low-overhead preview capability for local video and audio in the sidebar, leveraging HTTP Range streaming and Chromium hardware decoding.
Core Features¶
- Play video and audio files directly in the DSH right sidebar
- Supports MP4, M4V (H.264), MOV (H.264/H.265), WebM (VP8/VP9/AV1), MKV (H.264/VP9 video, AAC/MP3 audio), MP3, M4A, AAC, OGG/Opus, WAV, FLAC
- Audio files can also be played in the sidebar
- Vertical 9:16 phone footage correctly uses letterboxing instead of cropping
- Supports playback speed adjustment (0.5–2x), fullscreen, keyboard shortcuts, and remembers volume and speed
- UI language follows DSH’s localization settings (Chinese/English)
- Unsupported formats (e.g., AVI, RMVB, WMV, FLV) offer one-click “Open in IINA” and “Show in file manager” shortcuts
Highlights & Design Details¶
- Lightweight by design: The goal is to avoid the player dragging down agent tooling. Memory usage stays flat regardless of file size: a 2 MiB window is streamed from disk via an authenticated HTTP Range (206) route, and the browser only buffers near the playhead. Multi-GB files do not significantly increase memory.
- Buffer on demand:
preload="metadata"— only metadata is read when the preview opens, and buffering begins only after pressing play. - Zero-cost idle: Auto-pauses when the preview tab is closed, the sidebar is collapsed, or the page is hidden; fullscreen playback is not interrupted. A paused player does not decode and consumes no resources.
- Release on close: Closing the preview destroys the player, discards buffers, and aborts requests.
- Hardware decoding: Playback cost is roughly equivalent to a browser tab playing video — no reliance on ffmpeg or transcoding processes.
- Inlined Plyr: Includes ~114 KB of Plyr source (MIT), works offline, with no external CDN requests.
Limitations¶
- Format ceiling: AVI, RMVB, WMV, and FLV cannot be played; only the native player fallback is available.
- DTS/AC3 audio silence: Browsers do not hold decode licenses for these audio formats. MKV files containing DTS/AC3 tracks will play video without sound, with no error reported. Be aware of this and use the “Open in app” option.
- No professional playback features: Track switching, ASS subtitles, frame stepping, and screenshots are not supported. HDR rendering is basic. This is a “verify the asset” tool, not a professional cinema environment.
- Tied to DSH version: The preview extension API is in RC stage and bound to a specific DSH version (the fully tested version in plugin docs is 0.2.2-rc.3). Major version upgrades may require follow-up adaptation.
- Adds one HTTP endpoint: The Host adds an authenticated streaming route (security model consistent with the built-in
/api/file: browser authentication + absolute path validation + sandboxed filesystem). - Files still being written may be interrupted: The preview framework’s auto-refresh will repeatedly reload the player while a file is still being recorded/transcoded.
Installation & Enablement¶
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 use Add plugin and select the extracted package directory.
No Host restart required; refresh the web page once to load the client module, then click any video or audio file to see the preview in the sidebar.
Development & Build¶
node src/build.mjs # Inlines Plyr + styles into client.js
node src/test-host.mjs # Host streaming route: 12 assertions (Range/redirect/error codes)
node src/test-client.mjs # Client module: load, registration, inline Plyr smoke test
index.js is the Host side (streaming route); src/client-main.js is the client side (preview renderer), bundled into client.js after build. After modifying client code, a rebuild and page refresh are required.
Use Cases & Cautions¶
Suitable for DSH users who need to quickly verify video clips during development/debugging. The plugin runs with the current DSH process permissions. Review the source code and license before installing.
Conclusion¶
Video Preview uses HTTP Range streaming and Chromium hardware decoding to bring video and audio preview capability into the DeepSeek Harness sidebar while remaining lightweight and low-overhead. It is well-suited for quick asset verification, but professional playback scenarios are best handled by a native player.
- Plugin directory: https://www.skillhub.cn/plugins/feifandiv/dsh-video-preview
- GitHub repository: https://github.com/feifandiv/dsh-video-preview