{"id":15816607,"url":"https://github.com/cdnbye/p2p-dplayer","last_synced_at":"2025-08-20T01:31:48.912Z","repository":{"id":33088642,"uuid":"151442603","full_name":"cdnbye/P2P-DPlayer","owner":"cdnbye","description":"DPLayer powered by CDNBye P2P Engine","archived":false,"fork":false,"pushed_at":"2022-12-07T17:29:59.000Z","size":5149,"stargazers_count":65,"open_issues_count":23,"forks_count":25,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-06T05:05:31.925Z","etag":null,"topics":["cdnbye","dplayer","hls","hlsjs","live","p2p","player","video","vod","webrtc"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/cdnbye.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}},"created_at":"2018-10-03T16:16:14.000Z","updated_at":"2024-08-10T05:17:42.000Z","dependencies_parsed_at":"2023-01-14T23:30:19.156Z","dependency_job_id":null,"html_url":"https://github.com/cdnbye/P2P-DPlayer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdnbye%2FP2P-DPlayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdnbye%2FP2P-DPlayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdnbye%2FP2P-DPlayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdnbye%2FP2P-DPlayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdnbye","download_url":"https://codeload.github.com/cdnbye/P2P-DPlayer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230382858,"owners_count":18216854,"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":["cdnbye","dplayer","hls","hlsjs","live","p2p","player","video","vod","webrtc"],"created_at":"2024-10-05T05:05:54.561Z","updated_at":"2024-12-19T05:08:00.511Z","avatar_url":"https://github.com/cdnbye.png","language":"JavaScript","funding_links":["https://www.paypal.me/DIYgod","https://www.patreon.com/DIYgod"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://i.imgur.com/LnPvZvO.png\" alt=\"ADPlayer\" width=\"100\"\u003e\n\u003cimg src=\"figs/cdnbye.png\" alt=\"CDNBye\" width=\"152.23\"\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eP2P-DPlayer\u003c/h1\u003e\n\n\u003e 警告：本项目已无人维护，请使用官方播放器[CBPlayer](https://github.com/cdnbye/CBPlayer)\n\u003e \n\u003e Notice：This project is deprecated now, please consider use [CBPlayer](https://github.com/cdnbye/CBPlayer)\n\n[![npm](https://img.shields.io/npm/v/p2p-dplayer.svg?style=flat-square)](https://www.npmjs.com/package/p2p-dplayer)\n[![npm](https://img.shields.io/npm/l/dplayer.svg?style=flat-square)](https://github.com/MoePlayer/DPlayer/blob/master/LICENSE)\n[![npm](https://img.shields.io/npm/dt/dplayer.svg?style=flat-square)](https://www.npmjs.com/package/dplayer)\n[![size](https://badge-size.herokuapp.com/cdnbye/p2p-dplayer/master/dist/DPlayer.min.js?compression=gzip\u0026style=flat-square)](https://github.com/MoePlayer/DPlayer/tree/master/dist)\n[![Travis](https://img.shields.io/travis/MoePlayer/DPlayer.svg?style=flat-square)](https://travis-ci.org/MoePlayer/DPlayer)\n[![devDependency Status](https://img.shields.io/david/dev/MoePlayer/dplayer.svg?style=flat-square)](https://david-dm.org/MoePlayer/DPlayer#info=devDependencies)\n\n## DPlayer with CDNBye P2P Engine\n![image](figs/screen.jpg)\n\nSince had CDNBye [hlsjs-p2p-engine](https://github.com/cdnbye/hlsjs-p2p-engine), DPlayer is henceforth more lovely!\u003c/br\u003e\n内置了[hlsjs-p2p-engine](https://github.com/cdnbye/hlsjs-p2p-engine)的[DPlayer](https://github.com/MoePlayer/DPlayer)播放器，播放hls流支持P2P加速，API与DPlayer保持一致，使用方法参考[quick-start.html](quick-start/index.html)。\n\n## Quick Start\n```javascript\n\u003cmeta charset=\"UTF-8\"\u003e\n\u003clink rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/p2p-dplayer@latest/dist/DPlayer.min.css\"\u003e\n\u003cstyle type=\"text/css\"\u003e\n    body,html{width:100%;height:100%;background:#000;padding:0;margin:0;overflow-x:hidden;overflow-y:hidden}\n    *{margin:0;border:0;padding:0;text-decoration:none}\n    #stats{position:fixed;top:5px;left:10px;font-size:12px;color:#fdfdfd;z-index:2147483647;text-shadow:1px 1px 1px #000, 1px 1px 1px #000}\n    #dplayer{position:inherit}\n\u003c/style\u003e\n\u003cdiv id=\"dplayer\"\u003e\u003c/div\u003e\n\u003cdiv id=\"stats\"\u003e\u003c/div\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/cdnbye@latest\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/p2p-dplayer@latest\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    var dp = new DPlayer({\n        container: document.getElementById('dplayer'),\n        autoplay: true,\n        video: {\n            url: 'https://video-dev.github.io/streams/x36xhzz/url_2/193039199_mp4_h264_aac_ld_7.m3u8',\n            type: 'hls'\n        },\n        hlsjsConfig: {\n//            debug: false,\n            // Other hlsjsConfig options provided by hls.js\n            p2pConfig: {\n                logLevel: true,\n                live: false,\n                // Other p2pConfig options provided by CDNBye\n                // https://docs.cdnbye.com/#/API\n            }\n        }\n    });\n    var _peerId = '', _peerNum = 0, _totalP2PDownloaded = 0, _totalP2PUploaded = 0;\n    dp.on('stats', function (stats) {\n        _totalP2PDownloaded = stats.totalP2PDownloaded;\n        _totalP2PUploaded = stats.totalP2PUploaded;\n        updateStats();\n    });\n    dp.on('peerId', function (peerId) {\n        _peerId = peerId;\n    });\n    dp.on('peers', function (peers) {\n        _peerNum = peers.length;\n        updateStats();\n    });\n\n    function updateStats() {\n        var text = 'CDNBye P2P正在为您加速' + (_totalP2PDownloaded/1024).toFixed(2)\n            + 'MB 已分享' + (_totalP2PUploaded/1024).toFixed(2) + 'MB' + ' 连接节点' + _peerNum + '个';\n        document.getElementById('stats').innerText = text\n    }\n\u003c/script\u003e\n```\n\n## Introduction\n\nDPlayer is a lovely HTML5 danmaku video player to help people build video and danmaku easily.\n\n**DPlayer supports:**\n\n- Streaming formats\n    - [HLS](https://github.com/video-dev/hls.js)\n    - [FLV](https://github.com/Bilibili/flv.js)\n    - [MPEG DASH](https://github.com/Dash-Industry-Forum/dash.js)\n    - [WebTorrent](https://github.com/webtorrent/webtorrent)\n    - Any other custom streaming formats\n- Media formats\n    - MP4 H.264\n    - WebM\n    - Ogg Theora Vorbis\n- Features\n    - Danmaku\n    - Screenshot\n    - Hotkeys\n    - Quality switching\n    - Thumbnails\n    - Subtitle\n\nUsing DPlayer on your project? [Let me know!](https://github.com/DIYgod/DPlayer/issues/31)\n\n**[Docs](http://dplayer.js.org)**\n\n**[中文文档](http://dplayer.js.org/#/zh-Hans/)**\n\n## Thanks\n\n### Sponsors\n\n\u003ca href=\"https://www.dogecloud.com/?ref=dplayer\" target=\"_blank\"\u003e\n    \u003cimg width=\"222px\" src=\"https://i.imgur.com/BBKXPAp.png\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://console.upyun.com/register/?invite=BkLZ2Xqob\" target=\"_blank\"\u003e\n    \u003cimg width=\"222px\" src=\"https://imgur.com/apG1uKf.png\"\u003e\n\u003c/a\u003e\n\n### Contributors\n\n\u003ca href=\"https://github.com/MoePlayer/DPlayer/graphs/contributors\"\u003e\u003cimg src=\"https://opencollective.com/DPlayer/contributors.svg?width=890\" /\u003e\u003c/a\u003e\n\n## Join the Discussion\n\n- [Telegram Group](https://t.me/adplayer)\n\n## Related Projects\n\nFeel free to submit yours in [`Let me know!`](https://github.com/MoePlayer/DPlayer/issues/31)\n\n### Tooling\n\n- [DPlayer-thumbnails](https://github.com/MoePlayer/DPlayer-thumbnails): generate video thumbnails\n\n### Danmaku api\n\n- [DPlayer-node](https://github.com/MoePlayer/DPlayer-node): Node.js\n- [laravel-danmaku](https://github.com/MoePlayer/laravel-danmaku): PHP\n- [dplayer-live-backend](https://github.com/Izumi-kun/dplayer-live-backend): Node.js, WebSocket live backend\n- [RailsGun](https://github.com/MoePlayer/RailsGun): Ruby\n\n### Plugins\n\n- [DPlayer-for-typecho](https://github.com/volio/DPlayer-for-typecho): Typecho\n- [Hexo-tag-dplayer](https://github.com/NextMoe/hexo-tag-dplayer): Hexo\n- [DPlayer_for_Z-BlogPHP](https://github.com/fghrsh/DPlayer_for_Z-BlogPHP): Z-BlogPHP\n- [DPlayer for Discuz!](https://coding.net/u/Click_04/p/video/git): Discuz!\n- [DPlayer for WordPress](https://github.com/BlueCocoa/DPlayer-WordPress): WordPress\n- [DPlayerHandle](https://github.com/kn007/DPlayerHandle): WordPress\n- [Vue-DPlayer](https://github.com/sinchang/vue-dplayer): Vue\n- [react-dplayer](https://github.com/hnsylitao/react-dplayer): React\n\n### Other\n\n- [DPlayer-Lite](https://github.com/kn007/DPlayer-Lite): lite version\n- [hlsjs-p2p-engine](https://github.com/cdnbye/hlsjs-p2p-engine)\n- Feel free to submit yours in [`Let me know!`](https://github.com/MoePlayer/DPlayer/issues/31)\n\n## Who use DPlayer?\n\n- [小红书](https://www.xiaohongshu.com/): 中国最大的生活社区分享平台，同时也是发现全球好物的电商平台\n- [极客时间](https://time.geekbang.org/): 极客邦科技出品的一款 IT 内容知识服务 App\n- [嘀哩嘀哩](http://www.dilidili.wang/): 兴趣使然的无名小站（D站）\n- [银色子弹](https://www.sbsub.com/): 银色子弹，简称银弹，由多数柯南热爱者聚集在一起的组织\n- [浙江大学CC98论坛](https://zh.wikipedia.org/wiki/CC98%E8%AE%BA%E5%9D%9B): 浙江大学校网内规模最大的论坛，中国各大学中较活跃的BBS之一\n- [纸飞机南航青年网络社区](http://my.nuaa.edu.cn/video-video.html): 南京航空航天大学门户网站\n- [otomads](https://otomads.com/): 专注于音MAD的视频弹幕网站\n- [Cloudreve](https://github.com/HFO4/Cloudreve): 基于ThinkPHP构建的网盘系统\n- [oneindex](https://github.com/donwa/oneindex): Onedrive Directory Index\n- Feel free to submit yours in [`Let me know!`](https://github.com/MoePlayer/DPlayer/issues/31)\n\n## Donate\n\nDPlayer is an MIT licensed open source project and completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing.\n\n## One-time Donations\n\nWe accept donations through these channels:\n\n- [Paypal](https://www.paypal.me/DIYgod)\n- [WeChat Pay](https://i.imgur.com/aq6PtWa.png)\n- [Alipay](https://i.imgur.com/wv1Pj2k.png)\n- Bitcoin: 13CwQLHzPYm2tewNMSJBeArbbRM5NSmCD1\n\n## Recurring Pledges\n\nRecurring pledges come with exclusive perks, e.g. enabling faster GitHub response, having your name or your company logo listed in the DPlayer GitHub repository and this website.\n\n- Become a backer or sponsor via [Patreon](https://www.patreon.com/DIYgod)\n- E-mail us: i#html.love\n\n## Author\n\n**DPlayer** © [DIYgod](https://github.com/DIYgod), Released under the [MIT](./LICENSE) License.\u003cbr\u003e\nAuthored and maintained by DIYgod with help from contributors ([list](https://github.com/DIYgod/DPlayer/contributors)).\n\n\u003e [Blog](https://diygod.me) · GitHub [@DIYgod](https://github.com/DIYgod) · Twitter [@DIYgod](https://twitter.com/DIYgod) · Telegram Channel [@awesomeDIYgod](https://t.me/awesomeDIYgod)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdnbye%2Fp2p-dplayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdnbye%2Fp2p-dplayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdnbye%2Fp2p-dplayer/lists"}