-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to set up peer to peer connection using peerjs #251
Comments
Check the answer to this question here and the link in the answer to github where a complete working example is placed. You may solve all your problems. At least the ws.... error goes away. You may want to only use the http part and just ignore the https server built into the example. Change ports accordingly. Please watch out for the reverse order in the example of calling the peer.on('call',.... event handler first and waiting for the stream promise to return inside the 'call' event handler. This is the only way you can make sure that you won't receive a call event before you have set up your handler for that event. Most of the examples and tutorials have this bug in them |
I am also having similar error any solution |
I'm having an issue:
const express = require('express') const app = express(); const server = require('http').Server(app); server.listen(process.env.PORT||9000); const { ExpressPeerServer } = require("peer"); const peerServer = ExpressPeerServer(server, { debug: true, }); app.use("/peerjs", peerServer);
And my client side code:
var myPeer = new Peer(undefined, { path: "/peerjs", host: "/", port: "9000", });
And I include this library in my html document
<script src="https://unpkg.com/[email protected]/dist/peerjs.min.js"></script>
But when I am running my app on local host I am getting error
I read the documentation it says
path : '/myapp'
I am confused what myapp is in the path
Does it mean I can create peerjs server and deploy it and then use it any time for peer to peer connection in any other app?
If I can do so it is the best option but documentation seems confusing.
I need urgent help and want to know about
The text was updated successfully, but these errors were encountered: