Giter VIP home page Giter VIP logo

mutil-webrtc's Introduction

mutil-webrtc

基于 WebRTC 的多人视频通话,解决视频卡顿和回音

演示地址

项目概述

  • 实现基于房间的多人(大于2人)webrtc 视频通话,在每两个对等端之间都建立一个连接,组成“全网状拓扑结构”
  • 配套博文:https://laravue.org/#/articles/27

部署要求

  • 安装 redis (需要用到 redis 发布订阅)
  • 安装 node > 6.0.0

安装

本地部署

  • 安装完之后,打开浏览器运行 localhost:3001

线上部署

  • Nginx 反向代理

线上环境修改 Room.vueWelcome.vue 中的 const socket = io.connect('https://yourdomain');

如果部署到线上环境,可以配置 Nginx 反向代理,并且配置 SSL 证书(WebRTC 必须要使用安全协议,如:https & wss) 如下所示:

server {
        listen 443 ssl;

        ssl_certificate '你的 SSL 证书地址';
        ssl_certificate_key '你的 SSL 证书地址';
        
        ssl_session_cache shared:SSL:50m;
        ssl_session_timeout 1d;
        ssl_session_tickets off;

        server_name '你的域名';

        # 反向代理到 node 服务
        location / {
                proxy_pass    http://127.0.0.1:3001;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_set_header Host $host;
        }
}
  • pm2 or forever 守护进程
npm i -g pm2
pm2 start server.js

OR

npm i -g forever
forever start server.js

说明

mutil-webrtc's People

Contributors

zmecust avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.