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

dsh-preview-media

音视频文件流式播放与预览工具 适合需要在右侧边栏直接预览和拖动进度条播放音视频文件的用户。

包名
dsh-preview-media
兼容性
待验证
Cordis 依赖范围
^4.0.1
版本
0.1.5
许可证
MIT
最近更新
2026年10月24日

安装

$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.