yjmyzz / peerjs-sample Goto Github PK
View Code? Open in Web Editor NEWpeerjs samples
peerjs samples
执行了cnpm serve-index cnpm install peer
然后执行node server.js ,没有反应?请问怎么解决?
点击注册能成功有提示,但是一旦发消息了,就提示:
PeerJS: Socket open
peer.min.js:1 PeerJS: Creating RTCPeerConnection.
peer.min.js:1 PeerJS: Listening for ICE candidates.
peer.min.js:1 PeerJS: Listening for data channel
peer.min.js:1 PeerJS: Listening for remote stream
peer.min.js:1 PeerJS: Created offer.
peer.min.js:1 PeerJS: Set localDescription: offer for: 3456
2peer.min.js:1 PeerJS: Received ICE candidates for: 3456
peer.min.js:1 PeerJS: ERROR Error: Could not connect to peer 3456
peer.min.js:1 PeerJS: Socket closed.
peer.min.js:1 PeerJS: ERROR Error: Lost connection to server.
请问这个是我在什么地方做错了啊?
-----------serve-index包缺少的问题是不能用npm安装的,因为他会提示依赖包名称是下划线开头的,
! Invalid package name "_accepts@1.3.7@accepts": name cannot start with an underscore; name can only contain URL-friendly characters
所以我的做法是删掉package.json文件 重新npm init 一个 再安装serve-index 就可以启动服务端代码了,9000网页打开看上去是正常的。
81客户端端口的网页打开也是正常的 但是实际使用的时候就不行了。
大佬好,我用你的peerjs服务器弄了视频通话功能,但是现在有个问题,就是页面我都用的别的系统 的页面,只有peerjs服务器用的是示例中的,所以出现个问题,就是每次视频通话都连接不上,除非我首先登陆过9000这个页面,并且点进去,跳过隐私设置错误页面才能正常通话,大佬遇到过这个问题吗?
events.js:183
throw er; // Unhandled 'error' event
js error:
not found function 'start'
so where is the definition of function 'start' called in canvas.js
Can the project use the ws://localhost:8000 ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.