Web P2P 服务器,依托cdnbye的源码和klink.tech页面而开发的服务器。
var hlsjsConfig = {
debug: true,
// Other hlsjsConfig options provided by hls.js
p2pConfig: {
announce: "https://gop2p.cachecha.com",
wsSignalerAddr: 'wss://gop2p.cachecha.com/ws',
logLevel: 'debug',
// Other p2pConfig options if applicable
}
};
// Hls constructor is overriden by included bundle
var hls = new Hls(hlsjsConfig);
// Use hls just like the usual hls.js ...
hls.loadSource(contentUrl);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED,function() {
video.play();
});
curl -fsSL https://raw.githubusercontent.com/midoks/go-p2p-server/master/scripts/install.sh | sh
curl -fsSL https://raw.githubusercontent.com/midoks/go-p2p-server/master/scripts/install_dev.sh | sh