fix WebRTC multiplayer

Use the default https://peerjs.com/ server for the WebRTC connection.
I've also added a random string to the connection id to make it unlikely that someone accidentally is using the same id...
This commit is contained in:
Damiano Ruehl
2019-11-21 20:57:26 +01:00
committed by Anders Jenbo
parent 3bfb225e8d
commit 3cb30610e4

View File

@@ -11,8 +11,8 @@ import { buffer_reader, read_packet, write_packet, client_packet, server_packet,
}
}*/
const PeerID = name => `diabloweb_${name}`;
const Options = {host: 'diablo.rivsoft.net', port: 443, secure: true};
const PeerID = name => `diabloweb_dDv62yHQrZJP28tBEHL_${name}`;
const Options = {port: 443, secure: true};
const MAX_PLRS = 4;
class webrtc_server {