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

dsh-media-preview

在右侧栏文档预览中直接播放音视频并支持拖拽进度。 通过流式传输实现无缝预览,适合经常需要在侧边栏查看多媒体文件的用户。

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

同名包的其他仓库

安装

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

Configuration

Settings live on the media-preview 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/media-previewRoute pathname. Must start with /api/; anything else falls back to the default so the auth fence still applies.
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_MEDIA_PREVIEW_CONFIG__ by the Host, so a configured path and the player's URL never drift apart.