mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
sendrecv/js: Don't reuse peer_id across sessions
It increases the likelihood of a collision with someone else, and it was an unintended side-effect anyway.
This commit is contained in:
parent
47bfa3cc27
commit
669d234ebd
1 changed files with 2 additions and 3 deletions
|
@ -11,7 +11,7 @@
|
|||
var ws_server;
|
||||
var ws_port;
|
||||
// Set this to use a specific peer id instead of a random one
|
||||
var peer_id;
|
||||
var default_peer_id;
|
||||
// Override with your own STUN servers if you want
|
||||
var rtc_configuration = {iceServers: [{urls: "stun:stun.services.mozilla.com"},
|
||||
{urls: "stun:stun.l.google.com:19302"}]};
|
||||
|
@ -180,8 +180,7 @@ function websocketServerConnect() {
|
|||
if (textarea.value == '')
|
||||
textarea.value = JSON.stringify(default_constraints);
|
||||
// Fetch the peer id to use
|
||||
peer_id = peer_id || getOurId();
|
||||
ws_server = ws_server;
|
||||
peer_id = default_peer_id || getOurId();
|
||||
ws_port = ws_port || '8443';
|
||||
if (window.location.protocol.startsWith ("file")) {
|
||||
ws_server = ws_server || "127.0.0.1";
|
||||
|
|
Loading…
Reference in a new issue