
tsonglew/dsh-media-preview
30Last commit Aug 14, 2026
dsh-media-preview DSH plugin
This plugin registers as a FileViewer inside dsh-better-sidebar, allowing users to preview audio and video files directly in the sidebar. It uses its own streaming route with HTTP Range support, avoiding whole-file buffering and enabling smooth seeking for large media files.
How to install the dsh-media-preview DSH plugin
dsh plugin --profile web add github:tsonglew/dsh-media-previewCopying does not run this command. Review the repository and version before installing the dsh-media-preview DSH plugin.
dsh-media-preview DSH plugin data source
dsh-media-preview DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-media-preview DSH plugin can do
- Supports video formats: mp4, webm, mov, m4v, mkv, avi, ogv, ts, 3gp, flv
- Supports audio formats: mp3, wav, ogg, oga, m4a, aac, flac, opus, weba, wma
- HTTP Range (206) seeking for long videos
- Streamed responses via fs.createReadStream, no whole-file buffering
- Magic-byte sniffing for extension-less files (ftyp, EBML, OggS, fLaC, RIFF, ID3, etc.)
- Configurable maximum file size (default 2 GiB)
Where the dsh-media-preview DSH plugin fits
- Preview video files in the sidebar file tree without leaving the web GUI
- Play audio files from any folder the sidebar can browse (e.g., music folder in ~/Documents)
- Quickly check media content while navigating the file system
- Stream large video files (up to 2 GiB) with seeking support
Who the dsh-media-preview DSH plugin is for
- Users of DSH with the better-sidebar plugin installed
- Users who need inline media preview in the file explorer
dsh-media-preview DSH plugin limitations
- Requires dsh-better-sidebar >= 0.4.0
- Default only allows loopback requests; extra trustedHosts must be manually configured
- Hard cap on individual file size: 2 GiB (configurable via maxMediaBytes)
- Only works in the DSH web GUI via the sidebar file tree
dsh-media-preview DSH plugin: from the repository README
Quoted from the tsonglew/dsh-media-preview README, the upstream source of the dsh-media-preview DSH plugin. Copyright remains with the original authors.
Audio and video preview for the DeepSeek Harness (dsh) web GUI, registered as a **FileViewer** inside [dsh-better-sidebar](https://github.com/omdsh-dev/DSH-better-sidebar). Open an `.mp4`/`.webm`/`.mkv`/`.mov`/… or `.mp3`/`.flac`/`.wav`/… file in the sidebar file tree and it plays inline with native controls. | Video | Audio | |-|-| |<img width="679" height="643" alt="image" src="https://github.com/user-attachments/assets/061d92cb-4418-47d1-86bd-be52a9950dbc" />|<img width="692" height="542" alt="image" src="https://github.com/user-attachments/assets/74df4ef9-aa98-4be7-bdf1-852eed2ed51d" /> | ## Why a dedicated route better-sidebar's built-in `/sidebar/file` media route reads whole files into memory, has **no HTTP Range support**, and caps at an image-oriented size limit. This package serves media through its own streaming route (`/media-preview/file`) with: - HTTP **Range** (206) seeking — the browser can jump anywhere in a long video - Streamed responses (`fs.createReadStream`) — no whole-file buffering - Whole-filesystem scope behind the same browser trust fence the built-in `/api` documents (loopback Host + same-origin markers), matching the official directory-picker
Read the full READMERepository license: MIT
dsh-media-preview DSH plugin questions
How do I install dsh-media-preview?
Run the command `dsh plugin --profile web add github:tsonglew/dsh-media-preview`. Make sure you have dsh-better-sidebar version 0.4.0 or higher installed, as this plugin requires the registerFileViewer API from that plugin.
What audio and video formats are supported?
Video formats: mp4, webm, mov, m4v, mkv, avi, ogv, ts, 3gp, flv. Audio formats: mp3, wav, ogg, oga, m4a, aac, flac, opus, weba, wma. The plugin also uses magic-byte sniffing to identify files without extensions, so many common container formats are recognized even if the filename doesn't have an extension.
Why does my video not play or seek?
First, ensure the file is within the size limit (default 2 GiB, configurable via maxMediaBytes). Second, check that the file is served over a loopback connection (localhost) by default. If you are accessing from a remote host, you need to add that host to the trustedHosts configuration. Also, some codecs may not be supported by your browser—the plugin relies on native HTML5 video/audio capabilities.
Can I preview files outside the current session directory?
Yes. The sidebar file explorer can browse outside the session cwd (e.g., a music folder in ~/Documents), and the media preview will play any file the explorer can open. The plugin inherits the same filesystem access scope as the built-in directory-picker backend.
How do I increase the maximum file size limit?
In your profile configuration, add a `config` section for the media-preview plugin with `maxMediaBytes` set to the desired number of bytes. For example, to allow up to 4 GiB, set `maxMediaBytes: 4294967296`. The default is 2147483648 (2 GiB).