Further updates for this repo

This commit is contained in:
Arlo Breault 2016-01-05 10:12:53 -08:00
parent 461324d36e
commit 8fbc50bec8
5 changed files with 17 additions and 10 deletions

View file

@ -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");