PearPlayer(梨享播放器)[Demo] is a streaming media player framework written completely with HTML5 and JavaScript. The player uses HTTP (including HTTPS, HTTP2) and WebRTC(data channels) for code work. The WebRTC is multi-protocol, multi-source,having low latency and high bandwidth utilization. Why can PearPlayer guarantee the maximum P2P rate and user's fluent video experience? There are two reasons. One is MSE (Media Source Extension) technology, another is our designed algorithm. We know MSE technology based on H5 technology can collect the Buffer block from multiple source nodes to the player. Besides, the designed algorithm is to achieve the best scheduling strategy and handle of various abnormal situations.
Now, through the html label<script>
,simply include thepear-player.min.js
on your webpages .Refer to the following code examples,or/examples/player-test.html
can help you.
WOW! See the basic methodget-started below .
- It can be used without plugins, extensions, or installations because of P2P ability for WebRTC
- Multi-protocol(HTTP, HTTPS, WebRTC)and multi-source
- Scheduling algorithm can guarantee the P2P rate and user's fluent video experience
- no parameter( the system can adapt by itself bases on the video rate ). Even on the high usage patterns, the player can adjust it's algorithm and parameter by itself
- No unlimited buffers to save bandwidth / traffic for CP users
- Support Chrome, Firefox, Opera, IE, Edge and other mainstream browsers. Besides, it will support Safari, Tencent WeChat and X5/TBS.
- access to low cost, high availability Pear Fog CDN
- Protocol by TLS/DTLS, no DPI features; eliminate statistical characteristics through Pear Fog dynamic port
- Easy using ,like using HTML5
- The ability of browser P2P(base on WebTorrent)
It's time to witness a miracle - please copy the following code into Web HTML5 code, and then open a webpage .
<script src="https://cdn.jsdelivr.net/npm/pearplayer@latest"></script>
<video id="video" controls></video>
<script>
var player = new PearPlayer('#video', { src: 'https://qq.webrtc.win/tv/Pear-Demo-Yosemite_National_Park.mp4' });
</script>
And then use the script label to import pear-player.min.js:
<script src="./dist/pear-player.min.js"></script>
or use CDN:
<script src="https://cdn.jsdelivr.net/npm/pearplayer@latest"></script>
Suppose we want to use video label to paly the fllowing video, see HTML below:
<video id="pearvideo" src="https://qq.webrtc.win/tv/Pear-Demo-Yosemite_National_Park.mp4" controls>
Import PearPlayer to the video label , using the codes below:
<script>
/**
* The first parameter is ID or CLASS of the video label
* Opts, the optional parameter configuration
*/
if (PearPlayer.isMSESupported()) {
var player = new PearPlayer('#pearvideo', opts);
}
</script>
Congratulations! NOW your player has the P2P abilitie and no plugin!
The videos above is already distributed, so how to speed up any other video? SO EASY! Add your video's URL intoVideo distribution system. And now you can use Pear's huge amounts of nodes to speed up your videos!Please click here(only support MP4
format,and add Pear-Demo
prefix of the video's name ,such as Pear-Demo-movie.mp4
)
Special thanks to the following projects to provide some source of inspiration and API design reference for our project:
- Nov 2017(Gold Science and Technology) - DITING Technologies Inc,which invested Pear Limited, has entered Blockchain domain
- Sep 2017 Future Network and Open Community Alliance) - Fog Computing has begun after Cloud Computing ——about P2P CDN
- Aug 2017(IT biggie talk) - Will WebRTC be the mainstream?It's era to crowdsource !
- Jul 2017(OSChina) - PearPlayer.js —— The streaming media player is Mixed P2P-CDN
- Jun 2017(Tencent Frontend Conference) - P2P-CDN streaming media acceleration based on WebRTC
- May 2017(Southern University of Science and Technology) - Edge Computing and Shared Fog Streaming
- May 2017(Feng Chia University) - A Cooler Fruit Venture: Scaling up a Network from Cloud to Fog with Crowdsourcing
- Aug 2016(Hong Kong University of Science and Technology) - From Cloud to Fog: Scaling up a Network with Crowdsourcing
MIT. Copyright (c) Pear Limited and snowinszu.
E-mail: [email protected];QQ group :373594967
; [CP/CDN、OEM and other business ] (https://github.com/PearInc/FogVDN)