dsh-media-player: Inline Video/Animation Playback in the DeepSeek Harness Web GUI

Introduction

The DeepSeek Harness (DSH) Web GUI attachment system currently only accepts png/jpeg/webp/gif, meaning videos and animations cannot be played directly within the chat stream. After an Agent outputs a video file, the user has to open it locally, resulting in a fragmented experience. The DSH philosophy is “everything is a plugin,” and community plugins fill this gap by extending the capabilities of the Web GUI.

What Is This

dsh-media-player is a client-side plugin for the DeepSeek Harness Web GUI, maintained by forfeeling. It injects a media_show tool and a local media streaming route into DSH, allowing an Agent to display videos and animations directly in a conversation and render them as native <video> or <img> cards in the chat stream.

Core Features

  • Host half: Registers the media_show tool, generates one-time token URLs for local media files, and registers a /dsh-media prefix route on the web server to support HTTP Range requests (so the browser can scrub the progress bar).
  • Client half: A hand-written browser script (no build step) that renders tool.call.toolview as a <video controls playsInline> or <img> card, embedded directly into the chat stream.
  • Security: The route only accepts a random 96-bit token (bound to an absolute path); no directory traversal. Tokens exist only in memory and become invalid after a process restart. Response headers include cache-control: no-store.
  • Supported extensions: mp4 webm mov m4v mkv gif webp png jpg jpeg. Videos are rendered as <video controls playsInline>, images as <img>.

Installation & Enablement

The plugin is a Cordis loader entry point that includes a dsh.client browser bundle.

  1. Clone the repository locally:
   git clone https://github.com/forfeeling/dsh-media-player ~/dsh-media-player
  1. Link the repository into the node_modules of the web profile so the bare identifier can be resolved:
   ln -s ~/dsh-media-player "$HOME/.dsh/profiles/web/node_modules/@forfeeling/dsh-media-player"

The dependency @deepseek-ai/dsh-tools also needs to be symlinked following the scripts/link-deps.sh instructions in the README.

  1. Enable the plugin in $HOME/.dsh/profiles/web/cordis.patch.yml:
   - insert:
       - id: dsh-media-player
         name: "@forfeeling/dsh-media-player"
  1. Restart dsh web. Client bundle metadata is cached for the lifetime of the process, so plugin changes require a restart.

  2. Refresh the Web GUI. The media_show tool will appear in new conversation sessions.

Typical Usage

In any new session, ask the Agent to process and display a local video file:

  • Example prompt (natural language):

    Open ./out.mp4 and show it to me / show me the video at ./out.mp4

  • After the Agent calls media_show, a native playback card appears in the chat stream. The result structure looks like:

  // tool result
  { "url": "/dsh-media/582e7e5a001f0ef59f18a947",
    "kind": "video", "mime": "video/mp4",
    "bytes": 7938745, "path": "/abs/path/out.mp4", "label": "optional caption" }

Use Cases & Notes

  • Suited for agent development scenarios that require direct video/animation preview within the DSH Web GUI.
  • The plugin runs with the permissions of the current DSH process. Please ensure you trust the source code and its license (MIT) before installing.
  • Tokens are valid only in memory and expire after a server restart; the Agent needs to mint new ones.

Summary

dsh-media-player addresses the limited video/animation support in the DSH Web GUI attachment system. Through coordinated work between the Host and Client halves, it enables native playback of videos and animations directly in the chat stream. The plugin introduces no extra dependencies, and its security design follows the principle of minimal exposure.

  • Directory page: https://www.skillhub.cn/plugins/forfeeling/dsh-media-player
  • GitHub: https://github.com/forfeeling/dsh-media-player
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye