{"id":15036399,"url":"https://github.com/tsuk1ko/bilibili-live-chat","last_synced_at":"2025-08-15T19:05:57.128Z","repository":{"id":38849199,"uuid":"170377633","full_name":"Tsuk1ko/bilibili-live-chat","owner":"Tsuk1ko","description":"📽️ 在线即食的仿 YouTube Live Chat 风格的简易 Bilibili 弹幕姬","archived":false,"fork":false,"pushed_at":"2024-04-25T13:29:09.000Z","size":14389,"stargazers_count":1438,"open_issues_count":0,"forks_count":110,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-23T06:09:57.118Z","etag":null,"topics":["bilibili","live","livechat"],"latest_commit_sha":null,"homepage":"https://blc.lolicon.app","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tsuk1ko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"jindaikirin","custom":["https://afdian.net/@jindaikirin"]}},"created_at":"2019-02-12T19:25:08.000Z","updated_at":"2025-05-20T07:26:07.000Z","dependencies_parsed_at":"2023-01-29T00:15:43.736Z","dependency_job_id":"57ff37c1-c8c7-42c2-985b-cf9a4c91882d","html_url":"https://github.com/Tsuk1ko/bilibili-live-chat","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/Tsuk1ko/bilibili-live-chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tsuk1ko%2Fbilibili-live-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tsuk1ko%2Fbilibili-live-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tsuk1ko%2Fbilibili-live-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tsuk1ko%2Fbilibili-live-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tsuk1ko","download_url":"https://codeload.github.com/Tsuk1ko/bilibili-live-chat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tsuk1ko%2Fbilibili-live-chat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270617819,"owners_count":24617121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bilibili","live","livechat"],"created_at":"2024-09-24T20:31:02.460Z","updated_at":"2025-08-15T19:05:57.101Z","avatar_url":"https://github.com/Tsuk1ko.png","language":"Vue","funding_links":["https://ko-fi.com/jindaikirin","https://afdian.net/@jindaikirin"],"categories":[],"sub_categories":[],"readme":"# Bilibili Live Chat\n\n![Preview](https://i.loli.net/2020/06/20/vXuZKCq396co2HO.gif)\n\n这是一个无后端的，仿 YouTube Live Chat 的，箱都不用开就能食用的 Bilibili 直播弹幕姬\n\n主要用于 OBS，为的是在低功能需求的情况下，不依靠任何第三方本地软件实现弹幕和礼物的展示\n\n老版本在 `v1` 分支，新版本是使用 Vue 3 重构的版本，并增加了一些新特性，成品直接部署在 Github Pages\n\n## 食用步骤\n\n1. 打开 [blc.lolicon.app](https://blc.lolicon.app/)\n2. 输入房间号，填写设置项，点击“Go!”，然后复制新页面的地址\n3. 在 OBS 中添加“浏览器”来源，将地址粘贴到“URL”处，根据自己需要调整宽高和缩放\n4. Enjoy~\n\n## 其他说明\n\n### 连接模式\n\nB站在2023年7月左右开始对游客模式下的直播弹幕进行用户名打码、限流等操作，如果需要正常使用有两种方法\n\n1. 在“普通模式”下额外提供 [live.bilibili.com](https://live.bilibili.com/) 的 cookie，**可以连接任意直播间**\n2. 【推荐】使用“开放平台”模式，需要注册 Bilibili 开放平台个人开发者并提供一些参数，**只能连接自己的直播间**\n\n#### 普通模式\n\n该模式若未提供 cookie 则为游客身份连接，会出现收到的弹幕用户名被打码且随机限流（部分弹幕收不到）的情况\n\n若提供 [live.bilibili.com](https://live.bilibili.com/) 的 cookie，则会使用该 cookie 调用B站 API 获取直播弹幕连接 token\n\n支持手机 APP 扫码登录（仅限本项目官方站点）（[隐私声明](#隐私声明)）\n\n\u003e [!NOTE]  \n\u003e 由于需要发送 cookie，因此无论是否开启跨域模式，调用该 API 都需要依赖反代服务（详见[跨域模式](#跨域模式)）\n\n#### 开放平台\n\n该模式只能连接自己的直播间，但为 Bilibili 官方开放的连接方式，因此更推荐使用\n\n1. 前往开放平台注册个人开发者（[注册地址](https://open-live.bilibili.com/open-register-form/personal)），提交注册后需要等待审核通过\n2. 前往[创作者服务中心](https://open-live.bilibili.com/open-manage)-我的项目，随意创建一个项目，点进项目拿到**项目ID**\n3. 前往[创作者服务中心](https://open-live.bilibili.com/open-manage)-个人资料，拿到 **access_key_id** 和 **access_key_secret**\n4. 获取**身份码**，两种方法任选其一\n   - [我的直播间](https://link.bilibili.com/p/center/index/#/my-room/start-live)-开始直播-身份码\n   - [互动应用中心](https://play-live.bilibili.com/)-右下角菜单-身份码\n\n### 跨域模式\n\nB站 API 无法被跨域调用，若不开启跨域模式，则会使用反代服务（[隐私声明](#隐私声明)）\n\n若在 OBS 使用，则推荐开启跨域模式，方法如下：\n\n任何基于 Chromium 的浏览器（例如 OBS Browser 和 Chrome）都可以通过添加 `--disable-web-security` 启动参数来禁用网页安全机制，此时可以开启“跨域模式”选项，几乎所有B站 API 将被直接跨域调用（需要 cookie 的除外），这样就不需要依赖反代服务\n\n示例：\n\n- OBS：直接在启动的快捷方式后追加该参数，然后通过快捷方式启动即可  \n  ![obs](https://i.loli.net/2020/06/20/QkXOfoTalnpAvt3.png)\n- Chrome：和 OBS 同理，不过必须额外添加一个  `--user-data-dir` 参数来指定用户目录，随意新建一个空文件夹来指定即可  \n  该操作看上去十分麻烦，实则是 Chrome 的一个安全措施，因为**禁用网页安全机制是危险行为，日常使用时千万别这么做**  \n  ![chrome](https://s2.loli.net/2023/09/24/KL8UkX93p2ZdYSe.png)\n\n其他内核的浏览器可以自行搜索相应参数来禁用网页安全机制\n\n### 显示头像\n\n\u003e 已支持从弹幕信息中获取头像，不再需要调用 API  \n\u003e 不过普通模式下可能没有头像，不知道为什么B站又不提供 `dm_v2` 了\n\n头像加载机制：\n\n- 获取到头像后，图片会被预加载，加载完毕或超时（5 秒）后弹幕才会被插入弹幕列表\n- 非 GIF 头像会优先加载小头像（48x48）以节省流量，若首包到达时间超过 2 秒（B站 COS 图片压缩处理卡了，偶尔可能发生），则会回退为加载完整大小的头像图片\n\n## 隐私声明\n\n本项目官方站点 [blc.lolicon.app](https://blc.lolicon.app/) 会额外使用到以下两个本人开源并部署在公共平台上的服务：\n\n1. B站API反向代理服务 [Tsuk1ko/blc-proxy](https://github.com/Tsuk1ko/blc-proxy) 部署于 HuggingFace\n2. B站扫码登录服务 [Tsuk1ko/bilibili-qr-login](https://github.com/Tsuk1ko/bilibili-qr-login) 部署于 HuggingFace\n\n本站及上述服务不会收集任何信息，若不信任请勿在【关闭跨域模式】或【在普通连接模式下提供 cookie】的情况下使用本项目及【扫码登录】功能\n\n## Project setup\n\n```bash\nyarn install\n```\n\n### Compiles and hot-reloads for development\n\n```bash\nyarn serve\n```\n\n### Compiles and minifies for production\n\n```bash\nyarn build\n```\n\n### Lints and fixes files\n\n```bash\nyarn lint\n```\n\n### Customize configuration\n\nSee [Configuration Reference](https://cli.vuejs.org/config/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsuk1ko%2Fbilibili-live-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsuk1ko%2Fbilibili-live-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsuk1ko%2Fbilibili-live-chat/lists"}