Danmu Push:
<!-- One-line code to push a danmu --> $.getJSON("https://www.phprm.com/services/push/trigger/4d05f4abdb0a0c2a0269900809946903?head=This is a danmu");
$.getJSON() call trigger interface writes a danmu record on the backend. Only head is required; avatar is optional and defaults automatically. API Danmu Test
Fill in the content and click Send. The danmu will appear in real time in the bottom-right preview. You can also trigger it directly via URL:
Share Link
Share the link below with friends; recipients receive danmu messages in real time.
https://ws.phprm.com/frame.html?channelCode=4d05f4abdb0a0c2a0269900809946903&danMu=1&hidePanel=1
One-Line Integration No Backend
Drop the following <script> danmu.js on any page of your site. danmu.js auto-loads dependencies and initializes the danmu plugin — no backend needed.
<!-- One-line JS to integrate AI danmu --> (function() { var dm = document.createElement("script"); dm.src = "https://ws.phprm.com/static/customer/js/danmu.js?appName=your_app_name_for_stats&channelCode=your_channel_code&hidePanel=1&hideDialog=1&danMu=1"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(dm, s); })();
channelCode is your channel code. Sign up and create one. After domain verification you may skip channelCode; a channel is created for your URL automatically. Parameters
| Parameter | Description |
|---|---|
appName | Custom app name for stats |
channelCode | Channel code from registration; optional after domain verification |
hidePanel | Hide config panel (0=show, 1=hide) |
hideDialog | Hide chat dialog (0=show, 1=hide) |
danMu | Enable danmu (0=off, 1=on) |
danMuSetting | Danmu appearance config (nested object, see children below) |
danMuSetting.opacity | Background opacity (0~100, 100=opaque) |
danMuSetting.size | Danmu font size (8~33) |
danMuSetting.speed | Scroll speed (seconds) |
danMuSetting.close | Show close button (0=no, 1=yes, takes precedence over like) |
danMuSetting.like | Show like button (0=no, 1=yes); only effective when danMuSetting.close=0 |
danMuSetting.bottom | Distance from screen bottom (px, effective when bottomradio=1) |
danMuSetting.bottomradio | Position by bottom (0=random, 1=fixed) |
danMuSetting.aiDanMu | AI danmu polling interval (sec, 0=off). Supports danmu.js?aiDanMu=30 to poll every 30s |
danMuSetting.aiDanMuUrl | Custom AI danmu endpoint |
danMuSetting.selector | Danmu mount DOM selector (default body) |
danMuSetting.color | Danmu text color |
danMuSetting.hideIcon | Hide the floating icon in the bottom-right (0=show, 1=hide). Supports danmu.js?hideIcon=1 |
Browser Danmu Widget
Zero-code danmu widget — pop-up push windows on any site. Desktop, mobile, tablet supported. Add it as a bookmarklet to start.
How to use the widget →