同步操作将从 Pear/PearPlayer.js 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
PearPlayer (梨享播放器) [Demo] is a streaming media player framework written completely with HTML5 and JavaScript. Combining HTTP (including HTTPS, HTTP2) and WebRTC, PearPlayer accelerates media streaming on the Web. It supports multiple protocols, multiple sources, and achieves low latency and high bandwidth utilization. With the help of H5 MSE (Media Source Extension) technology, it receives buffers from multiple source nodes and delivers to the player. Finely designed algorithms are adopted to achieve the best scheduling effect and to handle abnormal situations. Thus, PearPlayer can provide end-users with wonderful video watching experience while maximizing the P2P ratio at the same time.
Simply import pear-player.min.js
to HTML via the <script>
tag. Refer to code examples below, or consult /examples/player-test.html
or get-started for usages.
<video>
tag; easy to integrate with popular player frameworks like video.js
Please copy the following codes into Web HTML5 code, and then open the webpage. Now, it's time to witness the miracle.
<video id="video" controls></video>
<script>
var player = new PearPlayer('#video', { src: 'https://qq.webrtc.win/tv/Pear-Demo-Yosemite_National_Park.mp4' });
</script>
First import the <script> tag to 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>
If use video tag to play the following video, HTML is like below:
<video id="pearvideo" src="https://qq.webrtc.win/tv/Pear-Demo-Yosemite_National_Park.mp4" controls>
PearPlayer can be bound to the video tag using only the codes below:
<script>
/**
* The first parameter is ID or CLASS of the video tag
* Opts means the optional parameter configurations
*/
if (PearPlayer.isMSESupported()) {
var player = new PearPlayer('#pearvideo', opts);
}
</script>
Congratulations! NOW your player has P2P ability and no plug-ins!
The video above has already been dispatched. So how to speed up other videos? Just add your video URL into Pear Fog Content Delivery Operating System. And then you can feel free to use Pear's massive fog nodes to accelerate your videos! Please click here for detailed guide. (Currently, newly-registered users can distribute three MP4
/TS files, each under 100MB, free of charge. Prefix Pear-Demo-
prefix needs to be added in front of the video file name, such as Pear-Demo-movie.mp4
)
Special thanks goes to the following projects that provide some inspirations and API design references:
MIT. Copyright (c) Pear Limited and snowinszu.
E-mail: service@pear.hk; User QQ group:373594967
; CP/CDN, OEM and other business cooperations
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。