From b4dbf5ad823f08574d937ff068f5bc7aff97a99b Mon Sep 17 00:00:00 2001 From: ian ramzy Date: Sat, 28 Mar 2020 15:22:27 -0400 Subject: [PATCH] more words --- .gitignore | 3 +-- public/js/chat.js | 17 +++++++---------- public/js/newroom.js | 10 ++++++++-- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 25dfad1..281707e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ node_modules/ .DS_Store -/.idea -.env \ No newline at end of file +/.idea \ No newline at end of file diff --git a/public/js/chat.js b/public/js/chat.js index e789332..57c6cc0 100644 --- a/public/js/chat.js +++ b/public/js/chat.js @@ -57,6 +57,7 @@ var VideoChat = { // noMediaStream function. requestMediaStream: function (event) { logIt("requestMediaStream"); + VideoChat.rePositionLocalVideo(); navigator.mediaDevices.getUserMedia({ video: true, audio: true @@ -256,24 +257,22 @@ var VideoChat = { VideoChat.remoteVideo.style.background = 'none'; VideoChat.connected = true; $('#remote-video-text').text(""); - + $('#local-video-text').fadeOut(); var timesRun = 0; - var interval = setInterval(function(){ + var interval = setInterval(function () { timesRun += 1; - if(timesRun === 20){ + if (timesRun === 20) { clearInterval(interval); } VideoChat.rePositionLocalVideo() }, 300); - - }, - rePositionLocalVideo: function(){ + rePositionLocalVideo: function () { var bounds = $("#remote-video").position(); - bounds.top += 10; - bounds.left += 10; + bounds.top += 10; + bounds.left += 10; $("#moveable").css(bounds) } }; @@ -441,7 +440,5 @@ function switchStreamHelper(stream) { $("#moveable").draggable({containment: 'window'}); - // auto get media VideoChat.requestMediaStream(); -VideoChat.rePositionLocalVideo() diff --git a/public/js/newroom.js b/public/js/newroom.js index 112a87d..ba397a1 100644 --- a/public/js/newroom.js +++ b/public/js/newroom.js @@ -1,8 +1,14 @@ var adjectives = ["small", "big", "large", "smelly", "new", "happy", "shiny", "old", "clean", "nice", "bad", "cool", - "hot", "cold", "warm", "hungry", "slow", "fast", "red", "white", "black", "blue", "green"]; + "hot", "cold", "warm", "hungry", "slow", "fast", "red", "white", "black", "blue", "green", "basic", "strong", + "cute", "poor", "nice", "huge", "rare", "lucky", "weak", "tall", "short", "tiny", "great", "long", "single", "rich", + "young", "dirty", "fresh", "brown", "dark", "crazy", "sad", "loud", "brave", "calm", "silly", "smart"]; + var nouns = ["dog", "bat", "wrench", "apple", "pear", "ghost", "cat", "wolf", "squid", "goat", "snail", "hat", "sock", "plum", "bear", "snake", "turtle", "horse", "spoon", "fork", "spider", "tree", "chair", "table", - "couch", "towel", "panda", "bread", "grape","cake","brick", "rat", "mouse"]; + "couch", "towel", "panda", "bread", "grape", "cake", "brick", "rat", "mouse", "bird", "oven", "phone", "photo", + "frog", "bear", "camel", "sheep", "shark", "tiger", "zebra", "duck", "eagle", "fish", "kitten", "lobster", "monkey", + "owl", "puppy", "pig", "rabbit", "fox", "whale", "beaver", "gorilla", "lizard", "parrot", "sloth", "swan"]; + var adjective = adjectives[Math.floor(Math.random() * adjectives.length)]; var noun = nouns[Math.floor(Math.random() * nouns.length)]; noun = noun.charAt(0).toUpperCase() + noun.substring(1);