1 Star 0 Fork 58

elevate/hlsjs-p2p-engine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
flowplayer-demo.html 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
snowinszu 提交于 2018-10-13 21:54 . update docs
<!-- head section -->
<!-- skin -->
<link rel="stylesheet" href="https://releases.flowplayer.org/7.2.6/skin/skin.css">
<!-- CDNBye hls.js -->
<script src="https://cdn.jsdelivr.net/npm/cdnbye@latest/dist/hls.light.min.js"></script>
<!-- flowplayer -->
<script src="https://releases.flowplayer.org/7.2.6/flowplayer.min.js"></script>
<!-- body section -->
<div id="player"></div>
<script>
flowplayer('#player', {
live: true, // set if it's a live stream
ratio: 9/16, // set the aspect ratio of the stream
clip: {
sources: [
// path to the HLS m3u8
{ type: "application/x-mpegurl", src: "https://video-dev.github.io/streams/x36xhzz/url_2/193039199_mp4_h264_aac_ld_7.m3u8"},
]
},
hlsjs: {
debug: false,
// Other hlsjsConfig options provided by hls.js
p2pConfig: {
tag: 'flowplayer',
// Other p2pConfig options provided by CDNBye
}
}
});
// flowplayer().engine.hls.p2pEngine.on('stats', function ({totalHTTPDownloaded, totalP2PDownloaded}) {
// // get totalHTTPDownloaded and totalP2PDownloaded here
// console.warn(`totalHTTPDownloaded ${totalHTTPDownloaded} totalP2PDownloaded ${totalP2PDownloaded}`)
// })
</script>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/elevate/hlsjs-p2p-engine.git
git@gitee.com:elevate/hlsjs-p2p-engine.git
elevate
hlsjs-p2p-engine
hlsjs-p2p-engine
master

搜索帮助