All Projects → zsxsoft → Danmu Client

zsxsoft / Danmu Client

A cross-platforms danmaku client that supports transparency which based on canvas + WebSocket. 多用跨平台透明弹幕客户端,支持图文弹幕,基于canvas + WebSocket。

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Danmu Client

acfundanmu
AcFun直播API
Stars: ✭ 27 (-82.12%)
Mutual labels:  danmaku, danmu
Commentcorelibrary
Javascript Live Comment (Danmaku) Engine Implementation. JS弹幕模块核心,提供从基本骨架到高级弹幕的支持。
Stars: ✭ 1,724 (+1041.72%)
Mutual labels:  danmaku, danmu
Danmu Server
A danmaku server based on WebSocket. 弹幕服务器,基于WebSocket。
Stars: ✭ 169 (+11.92%)
Mutual labels:  danmaku, danmu
Ocbarrage
iOS 弹幕库 OCBarrage, 同时渲染5000条弹幕也不卡, 轻量, 可拓展, 高度自定义动画, 超高性能, 简单易上手; A barrage render-engine with high performance for iOS. At the same time, rendering 5000 barrages is also very smooth, lightweight, scalable, highly custom animation, ultra high performance, simple and easy to use!
Stars: ✭ 294 (+94.7%)
Mutual labels:  danmaku, danmu
Danmaku
live video comments protocol and platform api
Stars: ✭ 70 (-53.64%)
Mutual labels:  danmaku, danmu
Ocbarrage
iOS 弹幕库 OCBarrage, 同时渲染5000条弹幕也不卡, 轻量, 可拓展, 高度自定义动画, 超高性能, 简单易上手; A barrage render-engine with high performance for iOS. At the same time, rendering 5000 barrages is also very smooth, lightweight, scalable, highly custom animation, ultra high performance, simple and easy to use!
Stars: ✭ 589 (+290.07%)
Mutual labels:  danmaku, danmu
awesome-danmaku
一款轻量、适用于 H5 弹幕场景的 JS lib。🚀🚀
Stars: ✭ 35 (-76.82%)
Mutual labels:  danmaku, danmu
Kikoplay
KikoPlay - NOT ONLY A Full-Featured Danmu Player 不仅仅是全功能弹幕播放器
Stars: ✭ 313 (+107.28%)
Mutual labels:  danmaku, danmu
Danmu.js
HTML5 danmu (danmaku) plugin for any DOM element
Stars: ✭ 130 (-13.91%)
Mutual labels:  danmaku, danmu
Danmaku
A high-performance JavaScript danmaku engine. 高性能弹幕引擎库
Stars: ✭ 446 (+195.36%)
Mutual labels:  danmaku, danmu
Danmu.server
一个开源的弹幕后端
Stars: ✭ 92 (-39.07%)
Mutual labels:  danmaku, danmu
Qliveplayer
A cute and useful Live Stream Player with danmaku support.
Stars: ✭ 105 (-30.46%)
Mutual labels:  danmaku
Yatto
Parse & play online video with danmaku on local player.
Stars: ✭ 14 (-90.73%)
Mutual labels:  danmaku
Danmu.go
基于golang的命令行形式的直播网站(斗鱼)的弹幕浏览
Stars: ✭ 14 (-90.73%)
Mutual labels:  danmu
Abplayerhtml5
Video Player for danmaku comments. ABPlayer in HTML5. ABPlayer核心构件以动态HTML编写的版本。向HTML5进发!HTML5弹幕播放器
Stars: ✭ 858 (+468.21%)
Mutual labels:  danmu
Dplayer
🍭 Wow, such a lovely HTML5 danmaku video player
Stars: ✭ 12,101 (+7913.91%)
Mutual labels:  danmaku
Animesearcher
整合第三方网站的视频和弹幕资源, 为白嫖党提供最佳看番追剧体验
Stars: ✭ 101 (-33.11%)
Mutual labels:  danmaku
Hjdanmakudemo
A high performance danmaku engine for iOS
Stars: ✭ 844 (+458.94%)
Mutual labels:  danmaku
Bilibili Downloader
哔哩哔哩视频下载器 | Yet another video downloader for Bilibili
Stars: ✭ 146 (-3.31%)
Mutual labels:  danmaku
Bulletjs
👨‍💻‍一个原生js弹幕库
Stars: ✭ 22 (-85.43%)
Mutual labels:  danmu

danmu-client

Github All Releases David deps

这是一个独立的弹幕客户端,其服务端项目见danmu-server。屏幕截图见Release

欲使用此项目,服务端需要使用对应的版本。已发布的客户端均已写明对应的服务端版本号,开发分支内的客户端版本仅对应开发分支的服务端。

功能特色

  • WebSocket作为通讯协议,用Canvas作为弹幕的画布;
  • 可在桌面任何位置显示弹幕,可与其他程序(如PowerPoint、视频播放器等)共同工作;
  • 窗口置于最前,完全透明可穿透,能与其他程序正常交互;
  • 提供紧急清空弹幕池、停止接收弹幕等功能,可删除单条弹幕;
  • 支持图片弹幕。

适用场景

  • 数十人至千人集会(如学校活动、电影放映会)的实时互动
  • 大型活动实时公告信息显示
  • 欲在桌面显示实时吐槽

最低系统要求

Windows 7 / macOS 10.9 (x64) / Ubuntu 12.04 / Fedora 21 / Debian 8

使用预编译版本

  1. 打开Release下载已经编译好的程序包并解压到某目录。
  2. 双击目录下的danmu-client,启动成功。

从源码启动

  1. 下载并安装Nodejs,并检查node-gyp的依赖环境。
  2. npm install
  3. npm start

打包发布

npm run build

配置说明

根目录config.js下有配置,以下是说明

socket: {
    url: "弹幕服务器开启的IP与端口(如使用反代,需要确认反代支持WebSocket连接)",
    password: "弹幕服务器连接密码",
    room: "选择连接弹幕服务器的某间房间",
    heartbeat: 心跳包发送间隔
},
display: {
    comment: {
        animationStyle: "默认弹幕样式(支持scroll、reversescroll、staticdown、staticup)",
        fontStyle: "默认字体样式",
        fontColor: "默认颜色",
        lifeTime: 每条弹幕的基本存活时间,
        height: 每条弹幕占据高度
    }, 
    image: 图片弹幕开关
}, 
image: {
    regex: 图片判断正则,勿动
    whitelist: [
        "图片弹幕允许加载的网络图片白名单。", 
        "不支持通配符,必须一条一条手动添加。", 
        "请确认图片可以正常被打开。"
    ], 
    preload: 网络图片是否预读缓存
}

图片弹幕

打开图片弹幕开关后,弹幕内含相关内容的将被解析为图片。图片必须可以正常打开,调用代码如:[IMG WIDTH=24]danmu-24.png[/IMG]。格式:[IMG WIDTH=图片宽度]图片地址(支持HTTP)[/IMG]

为了保证安全与稳定,图片弹幕有防火墙机制。只有在弹幕程序目录及子目录下存在的图片才可被加载。引用网络图片,必须手动修改config.js添加白名单规则。如果被过滤,则程序不会有任何提示,该弹幕也不会被显示。

自定义弹幕

需要在服务器打开相应开关后,才允许使用自定义弹幕功能。自定义弹幕必须返回一个函数(或类),继承自lib/danmu/sprite.js中的Sprite,并需要实现updateLifeTime方法和draw方法,有alive属性。为确保效率,自定义弹幕未加入错误捕捉。一旦函数出错,则弹幕系统停止接受新弹幕。 示例代码如下(生成一个颜色随机、在屏幕上晃来晃去的玩意):

最新版示例代码

return (() => {
    'use strict';
    const Sprite = require('./lib/danmu/sprite');
    let canvasWidth = 0;
    let canvasHeight = 0;
    class Comment extends Sprite {
        constructor(param) {
            super(param.id, param.x, param.y, param.width, param.height, param.speed, param.lifeTime);
            this.text = param.text || ""; //文字内容
            this.lifeTime = param.lifeTime || config.display.comment.lifeTime;
            this.font = param.font || config.display.comment.fontStyle;
        }
        draw(canvasContext) {
            if (canvasWidth === 0) canvasWidth = canvasContext.canvas.width;
            if (canvasHeight === 0) canvasHeight = canvasContext.canvas.height;
            canvasContext.fillStyle = `rgb(${parseInt(Math.random() * 255)}, ${parseInt(Math.random() * 255)}, ${parseInt(Math.random() * 255)})`;
            canvasContext.font = this.font;
            canvasContext.fillText(this.text, parseInt(Math.random() * canvasWidth), parseInt(Math.random() * canvasHeight));
        }
        updateLifeTime() {
            this.lifeTime--; //每刷新一帧,存活时间-1
            this.alive = (this.lifeTime >= 0);
        };
    }
    return Comment;
})();

开源协议

The MIT License (MIT)

博文

弹幕服务器及搭配之透明弹幕客户端研究结题报告

弹幕服务器及搭配之透明弹幕客户端研究中期报告

弹幕服务器及搭配之透明弹幕客户端研究开题报告

开发者

zsx - https://www.zsxsoft.com / 博客 - https://blog.zsxsoft.com

感谢

DDPlayer by dpy1123

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].