We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is what I am trying to do:
const callUser = id => { const peer = new Peer({initiator: true, trickle: false, stream}); console.log(stream); peer.on('error', console.log); peer.on('connect', console.log); peer.on('signal', data => { console.log('data', data); socket.emit('callUser', { userToCall: id, signalData: data, from: me, name, }); });
This function does not show nor error message,nor success message.
But on top of the component I have tried to call peerServer like this:
const peerServer = new Peer({ host: 'https://0.0.0.0', secure: false, port: 8080, path: '/mypeer', }); peerServer.on('error', console.log);
And it constantly returned: Could not get User Id error.
This is my code for server:
const app = require("express")(); const server = require("http").createServer(app); const cors = require("cors"); const { ExpressPeerServer } = require("peer"); const io = require("socket.io")(server, { cors: { origin: "*", methods: ["GET", "POST"], }, }); const env = require("dotenv").config(); const customGenerationFunction = () => (Math.random().toString(36) + "0000000000000000000").substr(2, 16); app.use(cors()); app.get("/hello", (req, res) => { res.send("hello from the other siiiiiiide"); }); const peerServer = ExpressPeerServer(server, { debug: true, path: "/", generateClientId: customGenerationFunction, }); app.use("/mypeer", peerServer); io.on("connection", (socket) => { socket.emit("me", socket.id); console.log("connected", socket.id); socket.on("disconnect", () => { socket.broadcast.emit("callEnded"); }); socket.on("callUser", ({ userToCall, signalData, from, name }) => { console.log("from", from); io.to(userToCall).emit("callUser", { signal: signalData, from, name }); }); socket.on("answerCall", (data) => { io.to(data.to).emit("callAccepted", data.signal); }); }); server.listen(process.env.PORT || 8080, () => console.log(`Server is running on port ${process.env.PORT || 8080}`) );
Any suggestions please? Following code of server works perfectly on web.
I am using Linux Mint latest version.
Android emulator latest version Emulator: Pixel 4
The text was updated successfully, but these errors were encountered:
same problem.. did you found how resolve this?
Sorry, something went wrong.
Facing the same issue! Any news on that?
No branches or pull requests
This is what I am trying to do:
This function does not show nor error message,nor success message.
But on top of the component I have tried to call peerServer like this:
And it constantly returned: Could not get User Id error.
This is my code for server:
Any suggestions please? Following code of server works perfectly on web.
I am using Linux Mint latest version.
Android emulator latest version Emulator: Pixel 4
The text was updated successfully, but these errors were encountered: