Skip to content
forked from cdnbye/cbsignal

go语言版的 CDNBye 信令服务器,可用于Web、安卓、iOS SDK等所有CDNBye产品

Notifications You must be signed in to change notification settings

bb7788/cbsignal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build

git clone https://github.com/cdnbye/cbsignal.git
cd cbsignal
make

deploy

Upload binary file, admin.sh and config.yaml to server, create cert directory with signaler.pem and signaler.key, then start service:

chmod +x admin.sh
./admin.sh start

test

import Hls from 'cdnbye';
var hlsjsConfig = {
    p2pConfig: {
        wsSignalerAddr: 'ws://YOUR_SIGNAL',
        // Other p2pConfig options provided by hlsjs-p2p-engine
    }
};
// Hls constructor is overriden by included bundle
var hls = new Hls(hlsjsConfig);
// Use `hls` just like the usual hls.js ...

go语言版的 CDNBye 信令服务器,可用于Web、安卓、iOS SDK等所有CDNBye产品

编译二进制文件

git clone https://github.com/cdnbye/cbsignal.git
cd cbsignal
make

部署

将编译生成的二进制文件、admin.sh和config.yaml上传至服务器,并在同级目录创建cert文件夹,将证书和秘钥文件分别改名为signaler.pemsignaler.key放入cert,之后启动服务:

chmod +x admin.sh
echo -17 > /proc/$(pidof cbsignal)/oom_adj     # 防止进程被OOM killer杀死
./admin.sh start

测试

import Hls from 'cdnbye';
var hlsjsConfig = {
    p2pConfig: {
        wsSignalerAddr: 'ws://YOUR_SIGNAL',
        // Other p2pConfig options provided by hlsjs-p2p-engine
    }
};
// Hls constructor is overriden by included bundle
var hls = new Hls(hlsjsConfig);
// Use `hls` just like the usual hls.js ...

About

go语言版的 CDNBye 信令服务器,可用于Web、安卓、iOS SDK等所有CDNBye产品

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 81.3%
  • Shell 15.4%
  • Makefile 3.3%