Introduction¶
The message rendering blocks in DeepSeek Harness (DSH) support text, image, file, and table, but lack a native video block; tool invocation blocks are collapsed by default. Consequently, mp4 or m4a files generated by model screen recording, transcoding, or voice synthesis often appear only as file chips, requiring users to manually locate the path in the sidebar. To achieve the goal of “seeing a player right below the reply at the end of the turn,” additional mechanisms are required.
This article introduces the community plugin dsh-video-preview (Maintainer: OrderG-X, Category: Client). Using the official plugin API, it provides a play_video tool, a native player at the end of the turn, and a signed streaming route supporting HTTP Range. It has zero dependencies on @deepseek-ai/* and utilizes the same deliverables channel as the official present tool.
What is this¶
dsh-video-preview enables inline playback of local video and audio within the DSH conversation flow. When the model calls play_video or generates new media files within the current turn, the player automatically appears directly below the reply (in a similar position to Claude Desktop / Codex) and can be previewed in the sidebar’s large view alongside the deliverable file chip.
The current version of the plugin is 0.3.0, licensed under MIT. The source code and release packages are available on GitHub, and the community directory page is available on SkillHub.
Core Features¶
play_video Tool and Three Display Locations¶
After a play_video call, users typically see:
- Player below the reply (Primary): Videos appear as small cards (approx. 200px high, aspect ratio preserved, duration badge in the corner; hover to preview muted and see filename, size, and download options; click to play with sound from the beginning). Audio appears in a slim bar style (round play button, filename, size, duration, draggable progress bar). If there are more than 3 media items, they are collapsed into “N more media files”; only one item plays audio at a time. The color scheme and rounded corners utilize DSH design variables and switch according to the theme (light/dark).
- Deliverable File Chip: Clicking “Preview in Sidebar” opens a large-screen player (taking over DSH’s native limitation regarding “non-previewable” formats like mp4).
- Mini-player inside the tool block (Fallback): Visible after expanding the tool invocation block.
Media files delivered by the model via the built-in present tool will also automatically have a player attached.
Automatic Playback at Turn End¶
No special tool call is required from the model: Media paths appearing in command arguments, command output, or the reply body within the current turn are parsed (supporting spaces, Chinese characters, ~, relative paths, and shell escaping). Only files newly written in the current turn are mounted, with paths mentioned in the reply body taking priority; up to 8 items per turn. Files already played via play_video / present are not duplicated. If the file cannot be mounted in time during the wrap-up, it will be added after the turn ends (requires reopening the session to view).
Streaming and Security¶
The server provides two routes: /dsh-video-preview/media (HMAC signed token + HTTP Range streaming, preventing large files from loading into memory) and /dsh-video-preview/preview (for the sidebar and inline players, authenticated via DSH connection service login cookies; if the DSH version lacks this service, only local connections are accepted).
Since the DSH local web service itself does not perform authentication, the routes restrict file access strictly to media extensions (symlinks are resolved to their real targets). It also validates Host and Origin headers to prevent DNS rebinding and cross-site reading. Before v0.3.0, only the cookie name was validated, presenting a forgery risk. It is recommended to upgrade to the current version.
Installation and Activation¶
Installation command (from the repository README; do not manually construct the github:owner/repo format):
dsh plugin add https://github.com/OrderG-X/dsh-video-preview/releases/latest/download/dsh-video-preview.tgz
DSH must be restarted after installation—client code is bundled at startup, so the player will not appear without a restart. The plugin displays as “Video Playback” in the DSH “Plugins” page.
For local development, you can link to the directory (restart is also required after code changes):
dsh plugin --profile desktop add link:/path/to/dsh-video-preview
Typical Usage¶
Simply state the path in the conversation, for example, “Play ~/Movies/a.mp4”, and the model will call play_video. Parameters are as follows:
| Parameter | Required | Description |
|---|---|---|
path |
Yes | Absolute path of the local file (supports ~) |
title |
No | Player title, defaults to filename |
autoplay |
No | Autoplay (usually blocked by the browser) |
loop |
No | Loop playback |
Supported Formats¶
The player is based on the Chromium core used by DSH; format support depends on the core:
| Format | |
|---|---|
| Playable | Video: mp4 / m4v / mov / webm / ogv; Audio: mp3 / wav / ogg / m4a / aac / flac / opus |
| Video Codec Dependent | mkv / 3gp: Depends on internal codec; if unsupported, the player will display a notice and provide a transcoding command. |
| Not Directly Playable | avi / flv / wmv / wma / ts / mpg / rmvb, etc.—play_video will explain and provide a transcoding command. |
Transcoding requires installing ffmpeg (macOS example: brew install ffmpeg):
ffmpeg -i in.avi -c:v libx264 -c:a aac -movflags +faststart out.mp4 # Video
ffmpeg -i in.wma -c:a aac out.m4a # Audio
If playback fails, the interface distinguishes between cases such as: file moved, permission denied, plugin not loaded (requires DSH restart), or codec unsupported, and attaches transcoding commands where appropriate.
Use Cases and Notes¶
Target Audience: Users who frequently use models within DSH to generate or process local audio/video (screen recording, ffmpeg / avconvert, say voice synthesis, etc.) and wish to preview them instantly within the same conversation interface without repeatedly copying paths or relying on external players.
Runtime and Trust: The plugin runs with the current DSH process privileges. The signing key is stored at ~/.dsh/cache/dsh-video-preview.secret (permissions 0600). Before installation, please review the source code and MIT license to confirm the routes and file access policies fit your environment. The README documents end-to-end verification on the DeepSeek Harness 0.2.1-rc.2 desktop client; behavior may vary in other versions.
The DSH ecosystem emphasizes “everything is a plugin”; community directories like SkillHub are independent sites and have no official affiliation with DeepSeek / High-Flyer. This article describes a community-maintained client plugin, not an official app store entry.
Conclusion¶
dsh-video-preview utilizes play_video, the deliverables channel, and the end-of-turn player to fill the gap in DSH’s message model for inline video/audio experiences. It also applies extension and signature/login state constraints to local media streaming. If you need to play local files directly within Harness conversations, you can install it using the command above, restart DSH, and try it out.
- Community Directory: https://www.skillhub.cn/plugins/OrderG-X/dsh-video-preview
- Source Code & Documentation: https://github.com/OrderG-X/dsh-video-preview