{"id":13488936,"url":"https://github.com/spacemeowx2/DouyuHTML5Player","last_synced_at":"2025-03-28T02:31:27.020Z","repository":{"id":90663700,"uuid":"72282284","full_name":"spacemeowx2/DouyuHTML5Player","owner":"spacemeowx2","description":"替换斗鱼的Flash弹幕播放器","archived":false,"fork":false,"pushed_at":"2018-11-12T12:30:54.000Z","size":1188,"stargazers_count":598,"open_issues_count":27,"forks_count":98,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-03-22T07:04:29.967Z","etag":null,"topics":["html5","javascript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/spacemeowx2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2016-10-29T12:00:42.000Z","updated_at":"2025-01-16T10:26:57.000Z","dependencies_parsed_at":"2023-07-09T03:45:59.731Z","dependency_job_id":null,"html_url":"https://github.com/spacemeowx2/DouyuHTML5Player","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacemeowx2%2FDouyuHTML5Player","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacemeowx2%2FDouyuHTML5Player/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacemeowx2%2FDouyuHTML5Player/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacemeowx2%2FDouyuHTML5Player/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spacemeowx2","download_url":"https://codeload.github.com/spacemeowx2/DouyuHTML5Player/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245957686,"owners_count":20700317,"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","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":["html5","javascript"],"created_at":"2024-07-31T18:01:24.479Z","updated_at":"2025-03-28T02:31:24.398Z","avatar_url":"https://github.com/spacemeowx2.png","language":"TypeScript","readme":"# 斗鱼HTML5播放器\r\n\r\n基于 [flv.js](https://github.com/Bilibili/flv.js) 的斗鱼HTML5播放器.\r\n\r\n使用了 flv.js 内核提供的直播流播放, 用 JavaScript 实现了斗鱼的弹幕协议, 并支持发送弹幕和送礼物.\r\n\r\n![screenshot](https://user-images.githubusercontent.com/8019167/33715813-d3f38294-db8e-11e7-95c7-c029d69ebf7e.jpg)\r\n\r\n# 使用\r\n\r\n**不要**使用 Chrome 直接加载本文件夹, 本扩展程序需要构建后才能使用.\r\n\r\n[Chrome 应用商店](https://chrome.google.com/webstore/detail/hbocinidadgpnbcamhjgfbgiebhpnmfj)\r\n\r\n[Firefox 附加组件](https://addons.mozilla.org/zh-CN/firefox/addon/douyuhtml5player/)\r\n\r\n[Greasy Fork](https://greasyfork.org/scripts/26901) (Firefox)\r\n\r\n要求 Chrome 版本大于等于 49 (仅在54+版本测试过)\r\n\r\n打开斗鱼的直播间, 如果没有错误, 播放器就已经被自动替换.\r\n\r\n注: 如开启了 [chrome://flags/#extension-active-script-permission](chrome://flags/#extension-active-script-permission), 请注意允许扩展程序在所有网址上运行, 否则会没有权限运行.\r\n\r\n# 原理\r\n\r\n视频播放基于 flv.js, 弹幕发射使用 CSS3, 弹幕使用 WebSocket 连接, 在 JavaScript 中实现斗鱼的弹幕协议.\r\n\r\n由于斗鱼使用了 HTTPS, 受到 Mixed Content 限制, 只能在 Background 页面 fetch 视频内容再传到 Content Script 给 flv.js 进行播放.\r\n\r\n具体原理请见我的 [blog](http://blog.imspace.cn/2016/10/29/DouyuHTML5Player/)\r\n\r\n# 构建\r\n\r\n1. `npm install`\r\n\r\n2. `npm run build`\r\n\r\n3. `npm run pack` 在 versions 文件夹查看 zip 文件\r\n\r\n# 重要更新\r\n\r\n0.8.4 开始使用 WebSocket 连接弹幕服务器, 完全摆脱 Flash 的依赖.\r\n\r\n0.7.0 开始已经使用 [flash-emu](https://github.com/spacemeowx2/flash-emu) 进行签名\r\n\r\n# 捐赠\r\n\r\n欢迎投食(逃\r\n\r\n支付宝\r\n\r\n![alipay](https://user-images.githubusercontent.com/8019167/28763218-faff38b6-75ee-11e7-80a0-0ecb031256e2.png)\r\n\r\n\r\n微信\r\n\r\n![wechat](https://user-images.githubusercontent.com/8019167/28763153-7e168bc4-75ee-11e7-8aa6-322a33a4c2de.png)\r\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacemeowx2%2FDouyuHTML5Player","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacemeowx2%2FDouyuHTML5Player","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacemeowx2%2FDouyuHTML5Player/lists"}