mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Further updates for this repo
This commit is contained in:
parent
461324d36e
commit
8fbc50bec8
5 changed files with 17 additions and 10 deletions
|
@ -19,7 +19,9 @@ window.RTCIceCandidate = window.RTCIceCandidate || window.mozRTCIceCandidate;
|
|||
window.RTCSessionDescription = window.RTCSessionDescription || window.mozRTCSessionDescription;
|
||||
|
||||
var pc; // PeerConnection
|
||||
var answer;
|
||||
var offer, answer;
|
||||
var channel;
|
||||
|
||||
// Janky state machine
|
||||
var MODE = {
|
||||
INIT: 0,
|
||||
|
@ -65,7 +67,6 @@ function welcome() {
|
|||
}
|
||||
|
||||
function start(initiator) {
|
||||
username + ": " + msg;
|
||||
log("Starting up RTCPeerConnection...");
|
||||
pc = new PeerConnection(config, {
|
||||
optional: [
|
||||
|
@ -211,6 +212,12 @@ function prepareDataChannel(channel) {
|
|||
}
|
||||
}
|
||||
|
||||
function startChat() {
|
||||
currentMode = MODE.CHAT;
|
||||
$chatlog.className = "active";
|
||||
log("------- chat enabled! -------");
|
||||
}
|
||||
|
||||
// Get DOM elements and setup interactions.
|
||||
function init() {
|
||||
console.log("loaded");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue