1 Star 0 Fork 73

woerwin / PearDownloader.js

forked from Pear / PearDownloader.js 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README_EN.md 6.15 KB
一键复制 编辑 原始数据 按行查看 历史
gooni 提交于 2018-08-03 13:28 . update readme_en


PearDownloader.js

A multi-protocol, multi-source and hybrid P2P-CDN downloader


The release of PearPlayer.js has attracted constant attention from industry and we have received many precious suggestions. On the one hand, we will continue maintaining and updating PearPlayer to support more extended functions. On the other hand, we will rearrange the related module that is of deeper layer, more flexible and applicable to wider areas. Besides, focused on node selection and data scheduling, we separate out multi-source transmission parts and thus form PearDownloader.js.

PearDownloader (梨享下载器) [Demo], serving as base download module of the PearPlayer, combines HTTP (including HTTPS, HTTP2) & WebRTC and accelarates the streaming media on Web. It supports multiple protocols, multiple sources, and achieves low latency and high bandwidth utilization. Our customized algorithms, based on high efficiency, can integrate data from multi nodes to form a complete file or transfer well-organised data/media stream to upper layer applications like audio & video players. Thus, PearDownloader can ensure the downloading speed while maximizing the P2P ratio at the same time.

PearDownloader aims to lower the migration cost for Content Providers (CP) of the present well-developed players: CP manufacturers can choose to integrate it into their own products and achieve Web P2P ability. They can also schedule the massive node sources of Pear Fog to enjoy low-cost, high-quality shared fog CDN service. PearDownloader supports more kinds of file types, provides more flexible scheduling algorithm & strategies and satisfies broader and more flexible business situations and needs.

arch

Simply import pear-downloader.min.js to HTML via <script> tag. Refer to code example or consult /examples/downloader-test.html or get-started for usages.

Features

  • Client- and plugin-free thanks to P2P ability based on WebRTC
  • Multi-protocol (HTTP, HTTPS, WebRTC), multi-source
  • Support the present mainstream browsers thanks to the multi-source transmission ability (Fully schedule HTTP nodes when browser does not support WebRTC.)
  • Support simultaneously playing and downloading of audios & videos using MSE within the browser kernel
  • Customized algorithms ensure the downloading speed while maximizing the P2P ratio at the same time. (Users can also adopt their own algorithms to fulfill various situation needs.)
  • Parameter-free by default (dynamic adaptive internally according to bitrate, etc.). Clients can fill in their preferred parameters in advanced mode.
  • Optional access to low-cost, high-availability Pear Fog CDN
  • Fully encrypted via TLS/DTLS by default, no DPI features; Statistical characteristics can be further eliminated using dynamic port mapping of Pear Fog Suite.
  • With Browser-to-Browser P2P ability (based on WebTorrent)

Usages

First, use script tag to import pear-downloader.min.js:

<script src="./dist/pear-downloader.min.js"></script>

or use CDN

<script src="https://cdn.jsdelivr.net/npm/peardownloader@latest"></script></script>

If we want to download https://example.com/file.zip

<script>
  var downloader = new PearDownloader('https://example.com/file.zip');
</script>

How to accelerate your files?

The file above has already been dispatched. So how to speed up other files? It's a piece of cake. Just add your file URL into File distribution system. And then you can feel free to use Pear's massive nodes to accelerate your file downloading! Please click here for detailed guide. (You need to add Pear-Demo prefix in front of the file name, such as Pear-Demo-file.zip)

Who's using PearDownloader today?

PearDownloader Documents

Acknowledgement

Special thanks goes to the following projects that provide some inspirations and API design references:

Talks

License

MIT. Copyright (c) Pear Limited and snowinszu.

Help and Support

E-mail: service@pear.hk; QQ Group: 373594967; CP/CDN, OEM and other business cooperations

JavaScript
1
https://gitee.com/woerwin/PearDownloader.js.git
git@gitee.com:woerwin/PearDownloader.js.git
woerwin
PearDownloader.js
PearDownloader.js
master

搜索帮助