
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-video-preview
Advanced tools
Inline video preview for dsh-better-sidebar: plays .mp4/.webm/.mov/.mkv/.avi etc. in the sidebar editor with HTTP Range (seeking) support via a dedicated /video host route
📌 本插件已收录于 dshfind 插件超市(GitHub 仓库打
dsh-better-sidebar/dsh-plugintopic 后自动收录),点击上方徽章直达主页。
dsh-better-sidebar 的视频文件预览插件:
在侧边栏打开 .mp4 / .webm / .mov / .mkv / .avi 等视频文件时,内联渲染一个可播放、可拖拽进度条的 <video> 播放器。
better-sidebar 内置的文件预览器只有 image / pdf / markdown / html / code / binary-download, 没有视频预览——视频文件目前会落到 code 视图(乱码)或下载按钮。
直接复用内置的 /sidebar/file 媒体路由也不行:
200),浏览器无法拖动进度条(seek);mediaLimit(默认 20MB)限制,更大的视频会被直接拒绝。因此本插件自带一条 支持 Range(206 Partial Content)的 /video/* 宿主路由,
用 createReadStream 分片流式下发,seek / 拖进度条 / 倍速都能正常工作。
ctx.betterSidebar.registerFileViewer 注册 video 预览器(id video,与内置 viewer 同权):
.mp4/.m4v/.webm/.mov/.qt/.mkv/.avi/.wmv/.flv/.ogv/.ogg/.mpeg/.mpg/.3gp/.3g2/.m2ts<video controls>:播放/暂停、拖进度条(Range 206)、倍速、全屏、音量、preload=metadata/video/* 宿主路由:HTTP Range / If-Range / suffix-range(bytes=-N),视频大小不受 mediaLimit 限制title/icon,Side card 设置页自动显示启用开关(含 16px 播放器图标)fetchStrategy: 'none'需要 better-sidebar >= 0.4.0(ctx.betterSidebar.registerFileViewer 服务)。
前置:DSH 已装好且 dsh web 能运行,已安装 dsh-better-sidebar。
# 从 npm 安装(推荐,发布后生效):
dsh plugin --profile web add dsh-video-preview
# 本地开发(link: 热更新):
dsh plugin --profile web add "link:<本目录>"
# 从 tarball 安装(离线 / 未发布):
dsh plugin --profile web add file:<本目录>/dsh-video-preview-0.1.1.tgz
安装后重启 dsh web 进程并浏览器硬刷新(Cmd/Ctrl+Shift+R)。
说明:新增宿主半(
/video路由)需要重启一次;之后仅 client 改动硬刷新即可。
video 预览器自动命中;Video 卡片(带播放器图标),可单独启用/禁用。node test/route.test.mjs # 宿主路由回归测试(Range/206/416/403/HEAD/405,19 项)
| 检查项 | 命令 | 预期 |
|---|---|---|
| 宿主路由测试 | node test/route.test.mjs | 全部通过 |
| client bundle | node --check client.js | 语法 OK |
| bundle 形态 | 产物首行 | window.__ModuleLoader__.load({ id: 'dsh-video-preview', ... }) |
| 安装状态 | node_modules/dsh-video-preview/client.js 存在 | True |
| 文件 | 作用 |
|---|---|
index.js | 宿主半:注册 /video/* 前缀路由(Host 头信任围栏 + 会话 cwd 越界检查 + Range/If-Range/suffix-range) |
client.js | 客户端 bundle:经 ctx.betterSidebar.registerFileViewer 注册 video 预览器(fetchStrategy: 'none',含 16px 图标) |
cordis.patch.yml | dsh.bundle.patch:挂载行(entry name 与包名一致,供 client-modules 发现 client bundle) |
test/route.test.mjs | 宿主路由回归测试(自包含,无需 ffmpeg) |
/api 网关相同的 Host 头信任围栏(loopback 或 trustedHosts,拒绝跨站);.. 无法越界;mediaLimit 限制;registerTab)。FAQs
Inline video preview for dsh-better-sidebar: plays .mp4/.webm/.mov/.mkv/.avi etc. in the sidebar editor with HTTP Range (seeking) support via a dedicated /video host route
The npm package dsh-video-preview receives a total of 563 weekly downloads. As such, dsh-video-preview popularity was classified as not popular.
We found that dsh-video-preview demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.