Giter VIP home page Giter VIP logo

p2pvideocall's Introduction

科普

WebRTC 是一个协议,允许人们使用 JavaScript 在两点之间创建实时通讯。

我们可以用这个结构使两个或更多浏览器之间实现直接交流,而不需要中心服务器。

服务器只需要在连接的时候被使用,因此每个客户端知道如何连接彼此。

我们可以使用这个特性创建什么类型的App呢?例如,直接网络摄像头连接。点对点通话,文件共享,还有更多。

安装教程

1、使用 node 安装 peerjs

npm install peer

2、启动

npx peerjs --port 9000

3、打开 WebRTC client

先打开 receiver.html 再打开 sender.html 即可完成p2p连接,如无法穿透则会使用 server 转发

4、其他

0、p2p其实并不稳定,还需要有优化策略

1、需要压缩音频流

2、html 应该放在服务器上

3、本人比较懒,上面几点都没做

p2pvideocall's People

Watchers

James Cloos avatar TKLeung 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.