muaz-khan / RTCMultiConnection

RTCMultiConnection is a WebRTC JavaScript library for peer-to-peer applications (screen sharing, audio/video conferencing, file sharing, media streaming etc.)
https://muazkhan.com:9001/
MIT License
2.57k stars 1.37k forks source link

Scalable Broadcast Peer Connection closed #809

Closed Denoder closed 5 years ago

Denoder commented 5 years ago

I'm not sure what's going on with the scalable broadcast but I've got my TURN server working but i cant seem to establish a connection with peers. It always ends up closing.Just ends up a black screen

Peer connection is closed between you & iyx1ezvbaif {broadcastId: "1234"} state: closed

TURN server test (IP Hidden):

rtarta commented 5 years ago

@Teranode check your turn and stun server, remove first ice server after that append yours.

Denoder commented 5 years ago

this is what my logs say:

DEBUG | 20190816-094640.240 | reTurnServer | RETURN | 139758632298240 | StunMessage.cxx:82 | Successfully parsed StunMessage: STUN Request: Bind, id 42a41221496265796645357a356a6453
DEBUG | 20190816-094640.292 | reTurnServer | RETURN | 139758632298240 | StunMessage.cxx:82 | Successfully parsed StunMessage: STUN Request: Allocate, id 42a412213941534342547551454c5441
INFO | 20190816-094640.292 | reTurnServer | RETURN | 139758632298240 | RequestHandler.cxx:245 | Received Request with no Message Integrity. Sending 401. Sender=[UDP 14.138.205.50:49655]

this is what my apeded turn server looks like (domain/ip/credentials hidden):

connection.iceServers = [];

// last step, set TURN url (recommended)
connection.iceServers.push({
    urls: 'turn:domain.com:3478',
    credential: 'turnuser',
    username: 'turnpass'
});

@rtarta @muaz-khan think you could help out?

rtarta commented 5 years ago

@Teranode best way to checkout your credentials, i recomend yo tou use twillo turn server and monitor. i have used the twillo turn and stun servers i works perfectly. i can not comment on the your turns like this.

Proxy08 commented 5 years ago

@Teranode I've tried twillo turn server but still not working!

rtarta commented 5 years ago

check the twillo server credentials ttl if expired you will get same error :)

Denoder commented 5 years ago

yea im still getting closed connection :/

at the same time if i purposely make connection.onleave in scalable broadcast give an error, it starts to work. After that it seems that going into fullscreen on any video raises the cpu by an exponential amount so the fullscreen api doesnt work well with it

Proxy08 commented 5 years ago

Hey @Teranode did you manage to get it works ?

Denoder commented 5 years ago

@Proxy08 yes, you have to create your own socket.io server and remove the false here: https://github.com/muaz-khan/RTCMultiConnection-Server/blob/c48fc95f6883482cd1e569dfe9d5029f39c35809/node_scripts/Signaling-Server.js#L706

Proxy08 commented 5 years ago

@Teranode Thanks!!