Comments (9)
Hello,
As far as I know, the issues comes from Chrome Desktop who's sending the request twice.
Using another browser fixed the issue for me.
from webrtc.
Going to port 8080 worked for me!
from webrtc.
i have same problem, how con i fixed
from webrtc.
I currently have the exact same problem, I'll try using a different browser when I get a chance to test across different networks again
from webrtc.
Dude, I had the same problem and you can fix it by deploying the signaling server on port 8080.
Also I had to add these iceServers:
const config = {
'iceServers': [
{ url: 'stun:stun1.l.google.com:19302' },
{
url: 'turn:numb.viagenie.ca',
credential: 'muazkh',
username: '[email protected]'
}
]
}
const peerConnection = new RTCPeerConnection(config);
I managed to deploy with the fixes on an amazon server.
from webrtc.
@rawars How do I deploy it on port 8080 ? Where is the option to change port ?
Im running on my localhost desktop and trying to connect to it from laptop.
from webrtc.
Hello, for those who still do not work even changing the port to 8080, it is because they need to go through the configuration, the ice servers:
const configuration = {'iceServers': [{'urls': 'stun:stun.l.google.com:19302'}]}
const peerConnection = new RTCPeerConnection(configuration);
from webrtc.
@rawars how to deploy signaling server on port 8080?
from webrtc.
@rawars how to deploy signaling server on port 8080?
In Amazon lightsail:
const express = require('express');
const socketIO = require('socket.io');
const http = require('http');
const https = require('https');
const path = require('path');
const fs = require('fs');
var PatientsSockets = [];
var DoctorsSockets = [];
const DEFAULT_PORT = 8080;
const app = express()
var Server = null;
Server = https.createServer({
key: fs.readFileSync('/etc/letsencrypt/live/domain.com/privkey.pem'),
cert: fs.readFileSync('/etc/letsencrypt/live/domain.com/fullchain.pem'),
}, app);
var io = socketIO(Server);
app.use(express.static(path.join(__dirname, "public")));
io.on("connection", socket => {
socket.on("new-paciente", (data) => {
const existingSocket = PatientsSockets.find(existingSocket => existingSocket.socket === socket.id);
if (!existingSocket) {
PatientsSockets.push({
names: data.names,
surnames: data.surnames,
socket: socket.id,
role: 'PATIENT'
});
socket.broadcast.emit("update-list-patients", {
patients: PatientsSockets
});
}
});
socket.on("new-doctor", (data) => {
const existingSocket = DoctorsSockets.find(existingSocket => existingSocket.socket === socket.id);
if (!existingSocket) {
DoctorsSockets.push({
socket: socket.id,
role: 'DOCTOR'
});
}
});
socket.on("make-answer", data => {
socket.to(data.to).emit("answer-made", {
socket: socket.id,
answer: data.answer
});
});
socket.on("call-patient", (data) => {
socket.to(data.to).emit("notify-call", {
offer: data.offer,
socket: socket.id
});
});
socket.on("load-patients", (data) => {
socket.emit("update-list-patients", {
patients: PatientsSockets
});
});
socket.on("disconnect", () => {
PatientsSockets = PatientsSockets.filter(existingSocket => existingSocket.socket !== socket.id);
socket.broadcast.emit("remove-user", {
disconnected: socket.id,
patients: PatientsSockets
});
});
});
Server.listen(DEFAULT_PORT, () => {
console.log('HTTPS Server running on port ' + DEFAULT_PORT);
});
from webrtc.
Related Issues (20)
- not support all browser HOT 1
- Can't retrieve the number of users HOT 4
- ScaleDrone is not defined HOT 1
- Remote video not showing
- Doesn't Work with mobile data HOT 1
- more than 2 users HOT 6
- remoteVideo not showing
- Demo no longer working with Safari
- is it possible to make text chat and video chat in same page HOT 1
- Can i use this code? HOT 1
- It's NOT working HOT 2
- Add a Mute/Unmute Button?
- Safari and iPads require Promise-based API for WebRTC
- The request is not allowed by the user agent or the platform in the current context. HOT 2
- error HOT 6
- How to add end stream function ?? HOT 3
- Not working on chrome and safari HOT 3
- How to check if any member haven't join the room for a while The first User need to know ?
- Trying to convert the script to use async/await HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webrtc.