Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
peardownloader
Advanced tools
PearPlayer发布后,引起各方关注,但是有较强开发能力的CP集成起来困难,因为已经有的开发数年的H5播放器了。为此, 我们将多源传输部分抽离出来,形成PearDownloader。这样各家CP可以根据需要集成到产品/项目中, 例如,视频厂商可以将PearDownloader集成到已有播放器中,采用我们的算法或自己设计算法,将从多源多协议取得的数据喂给播放器。 PearDownloader(梨享下载器) 是PearPlayer的底层下载模块, 实现了融合HTTP(包含HTTPS、HTTP2)、WebRTC的多协议、多源、低延迟、高带宽利用率的无插件Web端下载加速能力。 基于高效的调度算法将来自多个节点的数据进行拼接形成完整的文件或将有序的数据/媒体流喂给上层的应用,例如音视频播放器, PearDownloader能在保证下载速度前提下最大化P2P率。
只需将pear-downloader.min.js
通过<script>
标签导入到HTML就可以使用。
参考以下代码示例,也可以查看/examples/downloader-test.html
来了解使用方法。
参考get-started来了解基本使用方法。
Demo演示地址:https://demo.webrtc.win/peardownloader/
首先通过script标签导入pear-downloader.min.js:
<script src="./dist/pear-downloader.min.js"></script>
或者使用CDN:
<script src="https://cdn.jsdelivr.net/npm/peardownloader@latest/dist/pear-downloader.min.js"></script>
假设要下载https://qq.webrtc.win/tv/Pear-Demo-Yosemite_National_Park.mp4
<script>
/**
* 第一个参数为文件的url
* opts是可选的参数配置
*/
var downloader = new PearDownloader('https://qq.webrtc.win/tv/Pear-Demo-Yosemite_National_Park.mp4', opts);
</script>
恭喜您,您的下载器已经具备P2P能力了,而且无须任何插件!
特别感谢以下项目,为本项目提供了部分灵感来源以及API设计参考:
MIT. Copyright (c) Pear Limited and snowinszu.
E-mail: service@pear.hk;用户QQ群:373594967
;CP/CDN接入、OEM与其他商务合作
FAQs
PearDownloader.js
The npm package peardownloader receives a total of 46 weekly downloads. As such, peardownloader popularity was classified as not popular.
We found that peardownloader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.