explaingit

qiuranqaq/douyulive-danmu-merge

Analysis updated 2026-05-18

14JavaScriptAudience · vibe coderComplexity · 2/5LicenseSetup · easy

TLDR

A single-file Cloudflare Worker that displays Douyu live chat comments in a cleaner view, merging repeated spam comments and supporting OBS overlays.

Mindmap

mindmap
  root((DouyuLive-Danmu-Merge))
    What it does
      Shows Douyu live chat
      Merges spam comments
      OBS overlay mode
    Tech stack
      JavaScript
      Cloudflare Workers
      WebSocket
    Use cases
      Watch cleaner chat view
      Deploy single file
      Stream overlay for OBS
    Features
      Combo merging
      Text to speech
      User history lookup
    Audience
      Douyu viewers
      Streamers using OBS

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Watch a Douyu live room's chat comments in a cleaner web page instead of the native site.

USE CASE 2

Deploy the chat viewer as a single file on Cloudflare Workers or Pages with no server setup.

USE CASE 3

Use the transparent, scrollbar-free display mode as an OBS browser source overlay while streaming.

USE CASE 4

Automatically merge repeated spam comments and pin the most popular ones to the top.

What is it built with?

JavaScriptCloudflare WorkersWebSocket

How does it compare?

qiuranqaq/douyulive-danmu-mergeabdulrdeveloper/chai-aur-reactanasnakawa/kalendae-skins
Stars141414
LanguageJavaScriptJavaScriptJavaScript
Last pushed2013-12-07
MaintenanceDormant
Setup difficultyeasyeasyeasy
Complexity2/51/51/5
Audiencevibe codervibe coderdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Deploys as a single JavaScript file via the Cloudflare dashboard, Pages upload, or Wrangler CLI.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice, not to be used for spam or platform rule violations.

In plain English

This project is a web-based helper for watching live chat comments, called danmu, from Douyu, a Chinese live streaming platform. It is built to deploy as a single file on Cloudflare Workers or Cloudflare Pages, so setting it up does not require running a traditional server. Once deployed, it gives a viewer a webpage that connects directly to a Douyu live room and shows the chat comments in a cleaner, more readable format, along with a display mode meant to be used as an overlay in OBS for people who are streaming. The browser connects straight to Douyu's own chat server over a WebSocket connection, so the Cloudflare Worker itself only serves the static webpage and does not relay or store any chat traffic, keeping it cheap to run. A key feature is automatic merging of repeated spam-style comments: when many viewers post the same or similar text in a short time window, the tool groups them into a single combined entry with a badge showing how popular that comment is, and comments repeated more than ten times get pinned to the top of the screen so they are not missed. The tool also includes optional text to speech playback of comments and gifts, a way to look up a commenter's past messages by clicking their name, and adjustable settings like background transparency, font size, and how many messages to keep on screen at once, which helps keep things smooth on slower devices. Configuration includes toggles for showing normal comments, gift and subscription events, and viewer join notifications, plus a filter for automated bot comments that carry no user identity information. A room can be opened automatically by adding its room number to the page's web address, which is convenient for setting up a fixed OBS browser source. The chat parsing logic builds on an earlier open source project called douyuEx. It is released under the MIT license, with a note asking that it only be used for normal viewing, chat analysis, and research rather than spam or actions that violate Douyu's own platform rules.

Copy-paste prompts

Prompt 1
Walk me through deploying this Douyu chat viewer to Cloudflare Workers using the dashboard.
Prompt 2
Explain how the automatic comment merging and pinning feature works in this project.
Prompt 3
Show me how to set up this page as a transparent OBS browser source overlay.
Prompt 4
Describe how the browser connects directly to Douyu's WebSocket server without going through the Worker.

Frequently asked questions

What is douyulive-danmu-merge?

A single-file Cloudflare Worker that displays Douyu live chat comments in a cleaner view, merging repeated spam comments and supporting OBS overlays.

What language is douyulive-danmu-merge written in?

Mainly JavaScript. The stack also includes JavaScript, Cloudflare Workers, WebSocket.

What license does douyulive-danmu-merge use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice, not to be used for spam or platform rule violations.

How hard is douyulive-danmu-merge to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is douyulive-danmu-merge for?

Mainly vibe coder.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.