rtc

minimal webrtc client
git clone https://git.ce9e.org/rtc.git

commit
910d4004675eb01a222abefb6720dde009d6a7ae
parent
195543f0a6eaa7011544e62b9c9cb011bb112784
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2020-03-25 21:12
rtc: protect queue with password

Diffstat

M www/rtc/rtc.js 3 ++-

1 files changed, 2 insertions, 1 deletions


diff --git a/www/rtc/rtc.js b/www/rtc/rtc.js

@@ -9,6 +9,7 @@
    9     9 
   10    10 	var room = location.hash.substr(1);
   11    11 	var queue = patch.randomString(10);
   -1    12 	var queuePassword = patch.randomString(10);
   12    13 	console.log('own queue', queue);
   13    14 
   14    15 	var container = document.querySelector('.rtc-videos');
@@ -104,7 +105,7 @@
  104   105 		con.addIceCandidate(candidate);
  105   106 	};
  106   107 
  107    -1 	patch.listen(queue, function(event) {
   -1   108 	patch.listen(queue + ':' + queuePassword, function(event) {
  108   109 		var sender = event.sender;
  109   110 		var data = event.data;
  110   111 		if (sender && data) {