Skip to content
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

Video Consistently Dropping and Multiple Video Screens Coming Up #709

Closed
vinodmap opened this issue May 26, 2018 · 7 comments
Closed

Video Consistently Dropping and Multiple Video Screens Coming Up #709

vinodmap opened this issue May 26, 2018 · 7 comments

Comments

@vinodmap
Copy link

Just within the last week (not sure exactly when the problem came up), but definitely today, video has been dropping very consistently, almost as soon as the video starts. Then, when it drops, it recovers and then a second and third video screen comes up. Even got up to 5 screens. This even happens on the demo page: https://simplewebrtc.com/demo.html while selecting a room name, and then joining from a second computer. I have attached a screen shot of where it happens on the demo page. In addition, while running the service on my system (I have a separate STUN and TURN servers), the same thing happens. If you select a room on the demo page, it was repeatable for me within 30 seconds. Does anyone know what is going on and how to correct this? Thank you.

video_capture_from_simplewebrtc

@vinodmap
Copy link
Author

By the way, I am using Chrome on all machines. In addition, I have tried this with multiple computers from different locations, and have ruled out problems with individual computers and/or network/WiFi connections.

@fippo
Copy link
Contributor

fippo commented May 26, 2018

looks like this happens due to websocket reconnect. Are you using the sandbox server?

@vinodmap
Copy link
Author

I previously was working on a separate server for signaling. But, looks like I reverted back to the sandbox because I could not fully get a separate signaling server working (https://github.com/andyet/SimpleWebRTC/issues/522). I am working to get this working again. I am using my own TURN/STUN. Why would using the sandbox server cause the problem described above (which you also can see on your demo page)? Just want to make sure that if I do switch over, it will fix this issue. Thank you.

@fippo
Copy link
Contributor

fippo commented May 27, 2018

there is now a loadbalancer in front of the sandbox server and its not configured correctly and times out the websoket connection.

@vinodmap
Copy link
Author

Got it. Thank you.

I set up a sepaate signaling server. Was partially successful towards the end (the server is running), but I am not able to make video connections. Here is what I did. I followed the instructions at: https://github.com/andyet/signalmaster.

When I run node server.js (in development mode), I get at Linux prompt:
&yet -- signal master is running at: http://localhost:8888
And I go to http://54.xxx.xxx.xxx:8888/socket.io/ and I get:
{"code":0,"message":"Transport unknown"} in the Chrome browser (as your instructions state).
Then, to change to production mode, following the instructions, I did:
./scripts/generate-ssl-certs.sh -- which after I filled in the requested info, it ran and said: "Getting Private key".

Then, I set NODE_ENV=production by doing $export NODE_ENV=production
Then, when I run node server.js, it gave me an error on variable $STUNSERVER_URL not being set.
So, I did $export STUNSERVER_URL=ec2-35-xxx-xxx-xx.us-west-2.computer.amazonaws.com:3478
(NOTE, this ip/address url is the same as what I am specifying in the new SimpleWebRTC() call when setting the stun server setting through peerConnectionConfig.

When I specify the STUNSERVER_URL, the prompt says:
&yet -- signal master is running at: http://localhost:8888 (the same as before when running in development).

Now, when I make the call to SimpleWebRTC, here is my call:

new SimpleWebRTC({
	    localVideoEl: 'localVideo',
	    remoteVideosEl: 'remoteVideos',
	    autoRequestMedia: true,
	    url: "http://54.xxx.xx.xxx:8888/",
		peerConnectionConfig: { 'iceServers': [stunAWS, turnAWS] }
	});

Note, the url: "http://54.xxx.xx.xxx:8888/" is where my signalmaster is running. But, I am unable to make video connections using this. If I swap out that line with: url: "https://sandbox.simplewebrtc.com:443/", it makes video connections, but it is back to the inconsistent websocket timeouts. Again note, the stunAWS variable set in this new SimpleWebRTC() call is the same URL/IP as specified on my signalmaster for STUNSERVER_URL.

Note, I have not done the "Use with Express" or "Docker" sections listed at https://github.com/andyet/signalmaster because I don't believe those are necessary since the server is running in production mode.

Is there something I'm doing wrong here? How can I further diagnose this problem? Thank you.

@vinodmap
Copy link
Author

I wiresharked my connection. Even though my calls to the new SimpleWebRTC() specify the url: "http://54.xxx.xx.xxx:8888/" parameter, the Wireshark shows that connections are still being attempted to the sandbox server (35.190.85.125) and NOT to my specified url parameter. Why is this? But, when I specify this url parameter, video does not come up at all, even though it is trying to access sandbox (which I don't know why it is in the first). So, something different is happening, but I don't understand why it is still accessing sandbox. Does the signaling server need to be https? How else can I debug this? Thank you.

@vinodmap
Copy link
Author

Closing this issue as we know why the video drops. But I started a new issue (#710) to continue the problem I have been having here. Above, the Wireshark showed that the connections were not being attempted to my specified URL parameter in the SimpleWebRTC() constructor. I fixed this issue by changing the production.json file on the signal master configuration to set secure to true and to specify the key, cert, and password fields. Then, the Wireshark showed attempted connections to my signaling server at https://54.xxx.xx.xxx:8888. However, I am now not seeing a Client / Server Hello messages, and the video still does not come up. I would greatly appreciate any help on this issue. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants