janus(WebRTC server)在mac上的使用

安装依赖

brew install jansson libnice openssl srtp libusrsctp libmicrohttpd libwebsockets cmake rabbitmq-c sofia-sip opus libogg curl glib pkg-config gengetopt autoconf automake libtool libconfig

下载源码

git clone https://github.com/meetecho/janus-gateway

编译

sh autogen.sh
./configure --prefix=/usr/local/janus PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig

make

make install

make configs

安装nginx

sudo brew install nginx

修改配置文件

vim /usr/local/etc/nginx/nginx.conf

janus(WebRTC server)在mac上的使用_第1张图片

 server{
   listen 80;
   listen *:443 ssl;
   server_name localhost;
   location / {
    root /usr/local/janus/share/janus/demos;
    index index.html index.htm index.php;
   }
  ssl_certificate /usr/local/janus/share/janus/certs/mycert.pem;
  ssl_certificate_key /usr/local/janus/share/janus/certs/mycert.key;
 }

启动及停止命令

janus(WebRTC server)在mac上的使用_第2张图片

测试

1、启动nginx

sudo nginx

2、启动janus

cd /usr/local/janus/bin/

./janus

3、访问http://localhost

janus(WebRTC server)在mac上的使用_第3张图片

https://localhost,同样ok的

janus(WebRTC server)在mac上的使用_第4张图片

4、demo的echo测试

 

你可能感兴趣的:(webrtc)