439436269-ctrl/dsh-preview-media ↗★ 0

dsh-preview-media

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 (plus a loopback origin so the desktop app can seek) without loading the whole file. 适合需要在右侧边栏直接预览和拖动进度条播放音视频文件的用户。

Package
dsh-preview-media
Compatibility
Unverified
Cordis peer range
^4.0.1
Version
0.1.5
License
MIT
Last updated
Oct 24, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:439436269-ctrl/dsh-preview-media

Configuration

Settings live on the preview-media entry (Settings → Plugins, or the profile patch). Every key has a code-side default, so a partial config is valid.

KeyDefaultMeaning
enabledtrueMount the route at all. Off leaves the renderer registered but transfers no bytes (503).
routePath/api/preview/mediaRoute pathname. Must start with /api/; anything else falls back to the default so the auth fence still applies.
loopbacktrueAlso serve bytes from the token-guarded 127.0.0.1 origin. This is what makes the desktop player seekable. Off keeps only the authenticated route: the desktop shell can play but not seek.
debugfalseAppend playback/loopback diagnostics to $DSH_HOME/preview-media-debug.log. Leave off unless you are diagnosing a problem.
maxBytes2147483648 (2 GiB)Largest file served; larger files answer 413.
chunkBytes1048576Bytes per ranged read.
videoExtensionsmp4, m4v, mov, webm, ogv, ogg, mkv, avi, wmv, flv, 3gp, ts, m2ts, mtsSuffixes the video player claims.
audioExtensionsmp3, wav, flac, m4a, aac, oga, opus, weba, wma, aiff, aifSuffixes the audio player claims.

The browser half mirrors the suffix lists in lib/client.js; keep them in sync when changing either side. The route path is published to the page as __DSH_PREVIEW_MEDIA_CONFIG__ by the Host, so a configured path and the player's URL never drift apart.