439436269-ctrl/dsh-preview-media ↗★ 0
dsh-preview-media
音视频文件流式播放与预览工具 适合需要在右侧边栏直接预览和拖动进度条播放音视频文件的用户。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:439436269-ctrl/dsh-preview-media說明文件
閱讀完整 README ↗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.
| Key | Default | Meaning |
|---|---|---|
enabled | true | Mount the route at all. Off leaves the renderer registered but transfers no bytes (503). |
routePath | /api/preview/media | Route pathname. Must start with /api/; anything else falls back to the default so the auth fence still applies. |
loopback | true | Also 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. |
debug | false | Append playback/loopback diagnostics to $DSH_HOME/preview-media-debug.log. Leave off unless you are diagnosing a problem. |
maxBytes | 2147483648 (2 GiB) | Largest file served; larger files answer 413. |
chunkBytes | 1048576 | Bytes per ranged read. |
videoExtensions | mp4, m4v, mov, webm, ogv, ogg, mkv, avi, wmv, flv, 3gp, ts, m2ts, mts | Suffixes the video player claims. |
audioExtensions | mp3, wav, flac, m4a, aac, oga, opus, weba, wma, aiff, aif | Suffixes 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.