Coder Social home page Coder Social logo

webrtc-chat's Introduction

webrtc-chat

A.文件包说明

1.chat 目录是前端页面,建议用nginx部署,index.html 是例子页面

2.websocket 是使用springboot+maven构建的信令服务器,直接使用命令 java -jar websocket-0.0.1-SNAPSHOT.jar 启动即可

B.详情说明

1.先把websocket这个源码下载下来,使用maven打包后直接运行jar包,怎么使用maven自行查资料,启动信令服务器

2.进入chat文件夹,用浏览器打开index.html文件,进去后点击右上角的按钮,提示未连接,直接点一下就会连接到信令服务器上

3.复制这个页面地址,再开一个浏览器窗口,打开这个页面,再点击连接,这时候就会看见对方。

4.有较小的几率在webrtc的连接建立不起来。

5.只能在同一个局域网中使用,如果在互联网中涉及到p2p穿透问题,这个以后有时间弄好了再更新上来

6.如果是部署在外网服务器上,比如阿里云,腾讯云,则必须要将域名配置成https协议,推荐使用nginx配置,大家都这么玩。

7.如果想在局域网使用,直接打开html文件是不现实的,可以将前端部署在nginx中,这个可以自行查资料,非常简单。

8.总之webrtc只能在本地使用时可以http协议,如果是外网使用必须https协议,因为涉及到安全问题。

C.更新记录

1.2020年5月7日21:23:58,提交初版

webrtc-chat's People

Contributors

js1688 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.