dsh-video-preview
Manifest validDSH Plugin: Play workspace videos directly in the right-side document preview panel, with HTTP Range seeking support / Native video playback in DeepSeek Harness's document preview panel
DSH Video Preview
Play workspace videos directly in DeepSeek Harness's right-side context / document preview panel. Instead of showing "unsupported file type", the panel renders a native video player with working seeking, including files larger than the 32 MiB RPC preview read limit.
- Package:
@lifenrir/dsh-video-preview - DSH:
>= 0.2.1-rc.2 - Node:
^22.19 || >=24
Features
- Inline
<video controls playsInline preload="metadata">inside the right-side document panel: play, pause, seek, and fullscreen. - Authenticated Host route
/api/dsh-video-preview/streamthat implements HTTPRange(206/416), so seeking is not limited by the RPC preview cap. - 4 MiB chunked reads through
ctx.fs.readByteRange; aHEADprobe validates the path, MIME type, and workspace permission before the browser issues itsGET. - Only known video extensions are accepted; everything else returns
415. - The player follows the DSH theme through
--dsw-alias-*design tokens.
Supported containers and codecs
| Extension | Content-Type |
|---|---|
.mp4, .m4v | video/mp4 |
.mov | video/quicktime |
.webm | video/webm |
.ogv, .ogg | video/ogg |
.mkv | video/x-matroska |
Container recognition does not imply codec support. The browser still has to decode the stream:
- H.264/AAC in MP4 and VP8/VP9 in WebM have the widest compatibility.
.movoften contains ProRes, and.mkvoften contains H.265/AC-3 or other codecs browsers do not ship decoders for. When decoding fails the panel shows "This browser cannot play this video format" with a Retry button.
Install
From npm
dsh plugin add @lifenrir/dsh-video-preview
From a local directory
git clone https://github.com/LiFenrir/dsh-video-preview.git
dsh plugin add /absolute/path/to/dsh-video-preview
No build step is required: the Host half is the ESM entry index.js, and the browser half is client.js, loaded through window.__ModuleLoader__.
From git
dsh plugin add git+https://github.com/LiFenrir/dsh-video-preview.git
Reload the Web UI (or restart the profile) after adding and enabling the plugin.
Usage
- Open a workspace video from the Files tab.
- The right-side preview panel shows the player.
- Use the native controls to play, seek, and enter fullscreen.
How it works
index.jsregisters the streaming route on the authenticated connection layer viactx.connection.fetch.register.- The route resolves the session workspace through the
workspaceFileScopelookup, then resolves and stats the requested path withctx.fs, which keeps sandbox rules in force. client.jsregisters a document-preview definition for the supported extensions and the panel component. It parses thedsh-resource://file/session/<sessionId>/<path>address, performs theHEADprobe, and only then points the<video>element at the stream URL.
Security
- The stream route is served through DSH's authenticated connection layer; paths are resolved relative to the session's workspace root and remain subject to the
ctx.fssandbox. - Responses use
Cache-Control: private, no-storeandX-Content-Type-Options: nosniff. - Error responses do not leak internal error details.
- Request paths containing NUL bytes are rejected, and only the extensions listed above are served.
Verify
- Enable the plugin and reload the Web UI.
- Open a
.mp4file from the Files tab. - The right-side preview should show a player, and dragging the progress bar should seek correctly.
- Optionally open a file larger than 32 MiB and confirm that seeking still works.
If the panel reports a load failure, check that the file exists, lies inside the current session workspace, and has a supported extension. If it reports an unsupported format, the container may be recognized but the codec is not decodable by the browser.
Development
This package has no build step and no runtime dependencies. The source files are the shipped files:
index.js Host half (stream route)
client.js Browser half (document preview + player)
cordis.patch.yml Bundle manifest
locale/{en,zh}.json Display metadata
icon.svg Plugin icon
To test a change locally, point dsh plugin add at this directory and reload the Web UI.
License
MIT. See LICENSE.
Comments
Loading…
Similar plugins
by zemul
dsh-better-sidebar 的视频文件预览插件: 在侧边栏打开 .mp4 .webm .mov .mkv .avi 等视频文件时,内联渲染一个可播放、可拖拽进度条的 <video> 播放器。
★ 8
↓ 402/wk
MIT
JavaScript
Aug 27, 2026
dsh plugin --profile web add dsh-video-previewby shisuiqingqian
DeepSeek Harness 插件:读取本地视频或网页链接,返回带时间轴的逐字稿与关键帧图片,供模型逐帧查看。
★ 0
MIT
Python
Oct 19, 2026
dsh plugin --profile web add dsh-video-kitby feigo313
DSH 侧边栏的内联音视频预览插件(dsh-better-sidebar 伴生):自带 /media 路由支持 HTTP Range,mp4/mkv/mp3/flac 直接播、可拖时间轴,无需先下载
★ 0
JavaScript
Oct 23, 2026
dsh plugin --profile web add dsh-av-previewby 439436269-ctrl
Video and audio preview for DeepSeek Harness: play mp4/mov/mkv/webm and mp3/flac/wav in the right-Sidebar document preview, streamed over an authenticated HTTP Range route.
★ 0
MIT
JavaScript
Oct 17, 2026
dsh plugin --profile web add dsh-media-previewby cnskycn
Persistent right-side preview panel for DeepSeek Harness Web: HTML/PDF/PPTX/images/video/audio/text preview with workspace browser
★ 0
MIT
JavaScript
Aug 16, 2026
dsh plugin --profile web add pview-panelPlays video and audio files in the right Sidebar preview pane, streamed over an authenticated HTTP Range route so a remote browser can play and seek a large file without launching a native player on t
★ 0
MIT
JavaScript
dsh plugin --profile web add dsh-media-web-preview