Skip to content

Latest commit

 

History

History
125 lines (101 loc) · 6.63 KB

README_EN.md

File metadata and controls

125 lines (101 loc) · 6.63 KB

The streaming media player for multi-protocol, multi-source and mixed P2P-CDN

npm jsdelivr License


English

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.

PearPlayer

multisources

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.htmlcan help you. WOW! See the basic methodget-started below .

Feature

  • 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)

bitmap

Quick Start

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>

## Using Method

Simply include the video label on the js packet

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!

How to speed up the videos?

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 MP4format,and add Pear-Demoprefix of the video's name ,such as Pear-Demo-movie.mp4

Who is using Pear Player today?

Pear Player document

Thanks

Special thanks to the following projects to provide some source of inspiration and API design reference for our project:

Speech and media coverage

License

MIT. Copyright (c) Pear Limited and snowinszu.

Service

E-mail: [email protected];QQ group :373594967; [CP/CDN、OEM and other business ] (https://github.com/PearInc/FogVDN)