Skip to content

Commit

Permalink
update demo
Browse files Browse the repository at this point in the history
  • Loading branch information
snowinszu committed Jan 5, 2022
1 parent 2fb430f commit 89f8df3
Show file tree
Hide file tree
Showing 32 changed files with 411 additions and 393 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**English | [简体中文](Readme_zh.md)**

<h1 align="center"><a href="" target="_blank" rel="noopener noreferrer"><img width="250" src="https://cdnbye.oss-cn-beijing.aliyuncs.com/pic/cdnbye.png" alt="cdnbye logo"></a></h1>
<h1 align="center"><a href="" target="_blank" rel="noopener noreferrer"><img width="250" src="https://swarmcloud.net/logo.png" alt="cdnbye logo"></a></h1>
<h4 align="center">Let your viewers become your unlimitedly scalable CDN.</h4>
<p align="center">
<a href="https://www.npmjs.com/package/cdnbye"><img src="https://img.shields.io/npm/v/cdnbye.svg?style=flat" alt="npm"></a>
Expand Down Expand Up @@ -75,13 +75,13 @@ See [API.md](https://www.hdtvcloud.com/en/views/web/API.html)
Register your domain in `https://oms.cdnbye.com`, where you can view p2p-related information.

## Related Projects
- [iosweb-p2p-engine](https://github.com/swarm-cloud/iosweb-p2p-engine) - Live/VOD P2P Engine for iOS Safari.
- [hls-sw-p2p-engine](https://github.com/swarm-cloud/hls-sw-p2p-engine) - Live/VOD P2P Engine for all browsers including iOS Safari, with the help of ServiceWorker.
- [android-p2p-engine](https://github.com/cdnbye/android-p2p-engine) - Live/VOD P2P Engine for Android and Android TV.
- [ios-p2p-engine](https://github.com/cdnbye/ios-p2p-engine) - iOS Video P2P Engine for Any Player.
- [flutter-p2p-engine](https://github.com/cdnbye/flutter-p2p-engine) - Live/VOD P2P Engine for Flutter, contributed by [mjl0602](https://github.com/mjl0602).
- [shaka-p2p-engine](https://github.com/cdnbye/shaka-p2p-engine) - P2P engine for Shaka Player.
- [dashjs-p2p-engine](https://github.com/cdnbye/dashjs-p2p-engine) - Web Video Delivery Technology with No Plugins for MPEG-dash.
- [mp4-p2p-engine](https://github.com/cdnbye/mp4-p2p-engine) - Web Video Delivery Technology with No Plugins for MP4.
- [mp4-sw-p2p-engine](https://github.com/swarm-cloud/mp4-sw-p2p-engine) - Web Video Delivery Technology for MP4.

<!--
## They are using CDNBye
Expand Down
6 changes: 3 additions & 3 deletions Readme_zh.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**[English](README.md) | 简体中文**

<h1 align="center"><a href="" target="_blank" rel="noopener noreferrer"><img width="250" src="https://cdnbye.oss-cn-beijing.aliyuncs.com/pic/cdnbye.png" alt="cdnbye logo"></a></h1>
<h1 align="center"><a href="" target="_blank" rel="noopener noreferrer"><img width="250" src="https://swarmcloud.net/logo.png" alt="cdnbye logo"></a></h1>
<h4 align="center">Save Your Bandwidth using WebRTC.</h4>
<h4 align="center">视频网站省流量&加速神器.</h4>
<p align="center">
Expand Down Expand Up @@ -76,13 +76,13 @@ CDNBye | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ |
在接入P2P插件后,访问`https://www.cdnbye.com/oms`,注册并绑定域名,即可查看该域名的P2P流量、在线人数、用户地理分布等信息。

## 相关项目
- [iosweb-p2p-engine](https://github.com/swarm-cloud/iosweb-p2p-engine) - 适用于iOS浏览器的P2P流媒体加速引擎
- [hls-sw-p2p-engine](https://github.com/swarm-cloud/hls-sw-p2p-engine) - 基于ServiceWorker的P2P流媒体加速引擎,适用于所有浏览器
- [android-p2p-engine](https://gitee.com/cdnbye/android-p2p-engine) - 安卓端P2P流媒体加速引擎。
- [ios-p2p-engine](https://gitee.com/cdnbye/ios-p2p-engine) - iOS端P2P流媒体加速引擎。
- [flutter-p2p-engine](https://gitee.com/cdnbye/flutter-p2p-engine) - Flutter视频/直播APP省流量&加速神器, 由 [mjl0602](https://github.com/mjl0602) 贡献。
- [shaka-p2p-engine](https://github.com/cdnbye/shaka-p2p-engine) - 同时支持HLS和Mpeg-Dash格式。
- [dashjs-p2p-engine](https://github.com/cdnbye/dashjs-p2p-engine) - MPEG-dash协议的Web端P2P流媒体方案。
- [mp4-p2p-engine](https://github.com/cdnbye/mp4-p2p-engine) - 支持MP4的Web端P2P流媒体方案。
- [mp4-sw-p2p-engine](https://github.com/swarm-cloud/mp4-sw-p2p-engine) - 支持MP4的Web端P2P流媒体方案。

<!--
## 客户案例
Expand Down
2 changes: 1 addition & 1 deletion demo/cbplayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script src="//cdn.jsdelivr.net/npm/hls.js@0.14.16"></script>
<script src="//cdn.jsdelivr.net/npm/cbplayer2@latest"></script>
<script>
var url = 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8';
var url = 'https://test-streams.mux.dev/x36xhzz/url_2/193039199_mp4_h264_aac_ld_7.m3u8';
var cb = new CBPlayer({
container: document.getElementById('video'),
autoplay: true,
Expand Down
2 changes: 1 addition & 1 deletion demo/chimee.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h3>download info:</h3>
<script>
new Chimee({
wrapper: '#player', // video dom容器
src: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8',
src: 'https://test-streams.mux.dev/x36xhzz/url_2/193039199_mp4_h264_aac_ld_7.m3u8',
controls: true,
kernels: {
hls: {
Expand Down
2 changes: 1 addition & 1 deletion demo/chplayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
variable: 'player',//该属性必需设置,值等于下面的new chplayer()的对象
autoplay: true,
html5m3u8: true,
video: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8',//视频地址
video: 'https://test-streams.mux.dev/x36xhzz/url_2/193039199_mp4_h264_aac_ld_7.m3u8',//视频地址
hlsjsConfig: { // hlsjs和CDNBye的配置参数
debug: false,
// Other hlsjsConfig options provided by hls.js
Expand Down
2 changes: 1 addition & 1 deletion demo/ckplayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h3>download info:</h3>
variable: 'player', // 该属性必需设置,值等于下面的new chplayer()的对象
autoplay:true,
html5m3u8:true, // 强制html5播放
video:'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8',//视频地址
video:'https://test-streams.mux.dev/x36xhzz/url_2/193039199_mp4_h264_aac_ld_7.m3u8',//视频地址
hlsjsConfig: { // hlsjs和CDNBye的配置参数
debug: false,
// Other hlsjsConfig options provided by hls.js
Expand Down
2 changes: 1 addition & 1 deletion demo/clappr.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h3>download info:</h3>
<script>
var player = new Clappr.Player(
{
source: "https://wowza.peer5.com/live/smil:bbb_abr.smil/playlist.m3u8",
source: "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8",
parentId: "#player",
autoPlay: true,
plugins: [LevelSelector,CDNByeClapprPlugin],
Expand Down
2 changes: 1 addition & 1 deletion demo/dplayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
container: document.getElementById('dplayer'),
autoplay: true,
video: {
url: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8',
url: 'https://test-streams.mux.dev/x36xhzz/url_2/193039199_mp4_h264_aac_ld_7.m3u8',
type: type,
customType: {
'customHls': function (video, player) {
Expand Down
2 changes: 1 addition & 1 deletion demo/flowplayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h3>download info:</h3>
clip: {
sources: [
// path to the HLS m3u8
{ type: "application/x-mpegurl", src: "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8"},
{ type: "application/x-mpegurl", src: "https://test-streams.mux.dev/x36xhzz/url_2/193039199_mp4_h264_aac_ld_7.m3u8"},
]
},
hlsjs: {
Expand Down
2 changes: 1 addition & 1 deletion demo/fluidplayer.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script src="//cdn.jsdelivr.net/npm/cdnbye@latest"></script>
<script src="https://cdn.fluidplayer.com/v3/current/fluidplayer.min.js"></script>
<video id='hls-video'>
<source src='https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8' type='application/x-mpegURL'/>
<source src='https://test-streams.mux.dev/x36xhzz/url_2/193039199_mp4_h264_aac_ld_7.m3u8' type='application/x-mpegURL'/>
</video>
<p id="version"></p>
<h3>download info:</h3>
Expand Down
8 changes: 4 additions & 4 deletions demo/jwplayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<title>CDNBye JWPlayer Demo</title>
<!-- CDNBye Plugin -->
<script src="//cdn.jsdelivr.net/npm/cdnbye@latest"></script>
<!--<script src="//cdn.jsdelivr.net/gh/teranode/jw-provider@0.0.8/provider.hlsjs.js"></script>-->
<script src="//cdn.jsdelivr.net/npm/cdnbye@latest/dist/jwplayer.provider.hls.js"></script>
<script src="//cdn.jsdelivr.net/gh/teranode/jw-provider@0.0.9/provider.hlsjs.js"></script>
<!-- <script src="//cdn.jsdelivr.net/npm/cdnbye@latest/dist/jwplayer.provider.hls.js"></script>-->
<!-- JW Player Builds -->
<script src="//ssl.p.jwpcdn.com/player/v/8.21.2/jwplayer.js"></script>
<script src="//ssl.p.jwpcdn.com/player/v/8.22.0/jwplayer.js"></script>

</head>

Expand All @@ -22,7 +22,7 @@
jwplayer.key = "uoW6qHjBL3KNudxKVnwa3rt5LlTakbko9e6aQ6VUyKQ=";

jwplayer('demoplayer').setup({
file: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8',
file: 'https://wowza.peer5.com/live/smil:bbb_abr.smil/chunklist_b591000.m3u8',
width: 512,
height: 288,
autostart: true,
Expand Down
2 changes: 1 addition & 1 deletion demo/mediaelement.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</head>
<body>
<video id="player"
src="https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8"
src="https://test-streams.mux.dev/x36xhzz/url_2/193039199_mp4_h264_aac_ld_7.m3u8"
class="mejs__player"
controls>
</video>
Expand Down
2 changes: 1 addition & 1 deletion demo/openplayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</head>
<body>
<video class="op-player__media" id="video" controls playsinline>
<source src="https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8"></video>
<source src="https://test-streams.mux.dev/x36xhzz/url_2/193039199_mp4_h264_aac_ld_7.m3u8"></video>
<p id="version"></p>
<h3>download info:</h3>
<p id="info"></p>
Expand Down
2 changes: 1 addition & 1 deletion demo/playerjs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<script>
var player = new Playerjs({
id:"player",
file:"https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8",
file:"https://test-streams.mux.dev/x36xhzz/url_2/193039199_mp4_h264_aac_ld_7.m3u8",
hlsconfig: {
p2pConfig: {
live: true, // set to false in VOD mode
Expand Down
2 changes: 1 addition & 1 deletion demo/plyr.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h3>download info:</h3>
<script>
document.querySelector('#version').innerText = `hls.js version: ${Hls.version} cdnbye version: ${Hls.engineVersion}`;
document.addEventListener('DOMContentLoaded', () => {
var source = 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8';
var source = 'https://test-streams.mux.dev/x36xhzz/url_2/193039199_mp4_h264_aac_ld_7.m3u8';
var video = document.querySelector('video');

// For more options see: https://github.com/sampotts/plyr/#options
Expand Down
2 changes: 0 additions & 2 deletions demo/ppvod/DPlayer.min.js

This file was deleted.

16 changes: 0 additions & 16 deletions demo/ppvod/P2P集成说明.md

This file was deleted.

4 changes: 4 additions & 0 deletions demo/ppvod/dplayer/DPlayer.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions demo/ppvod/dplayer/DPlayer.min.css.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions demo/ppvod/dplayer/DPlayer.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions demo/ppvod/dplayer/DPlayer.min.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions demo/ppvod/dplayer/DPlayer.min.mod.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions demo/ppvod/dplayer/hls.min.js

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions demo/ppvod/ppvod集成p2p方法.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

注:本教程适用于ppvod新版点播系统

1. 修改 /home/work/views/share.ejs,
将 <script type="text/javascript" src="/html/js/share.js?time=8" charset="utf-8"></script>
改为
<script type="text/javascript" src="/html/js/share2.js?time=8" charset="utf-8"></script>

2. 将本文件夹中的 share2.js 放到目录 /home/work/public/js/

3. 用本文件夹中的 dplayer文件夹 替换 /home/work/public/dplayer

4. 登录cdnbye控制台 https://www.cdnbye.com/oms/ 绑定播放域名

5. 刷新浏览器缓存
Loading

0 comments on commit 89f8df3

Please sign in to comment.