more words

This commit is contained in:
ian ramzy 2020-03-28 15:22:27 -04:00
parent c6788d1fb5
commit b4dbf5ad82
3 changed files with 16 additions and 14 deletions

1
.gitignore vendored
View File

@ -1,4 +1,3 @@
node_modules/ node_modules/
.DS_Store .DS_Store
/.idea /.idea
.env

View File

@ -57,6 +57,7 @@ var VideoChat = {
// noMediaStream function. // noMediaStream function.
requestMediaStream: function (event) { requestMediaStream: function (event) {
logIt("requestMediaStream"); logIt("requestMediaStream");
VideoChat.rePositionLocalVideo();
navigator.mediaDevices.getUserMedia({ navigator.mediaDevices.getUserMedia({
video: true, video: true,
audio: true audio: true
@ -256,7 +257,7 @@ var VideoChat = {
VideoChat.remoteVideo.style.background = 'none'; VideoChat.remoteVideo.style.background = 'none';
VideoChat.connected = true; VideoChat.connected = true;
$('#remote-video-text').text(""); $('#remote-video-text').text("");
$('#local-video-text').fadeOut();
var timesRun = 0; var timesRun = 0;
var interval = setInterval(function () { var interval = setInterval(function () {
@ -266,8 +267,6 @@ var VideoChat = {
} }
VideoChat.rePositionLocalVideo() VideoChat.rePositionLocalVideo()
}, 300); }, 300);
}, },
rePositionLocalVideo: function () { rePositionLocalVideo: function () {
@ -441,7 +440,5 @@ function switchStreamHelper(stream) {
$("#moveable").draggable({containment: 'window'}); $("#moveable").draggable({containment: 'window'});
// auto get media // auto get media
VideoChat.requestMediaStream(); VideoChat.requestMediaStream();
VideoChat.rePositionLocalVideo()

View File

@ -1,8 +1,14 @@
var adjectives = ["small", "big", "large", "smelly", "new", "happy", "shiny", "old", "clean", "nice", "bad", "cool", 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", 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", "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 adjective = adjectives[Math.floor(Math.random() * adjectives.length)];
var noun = nouns[Math.floor(Math.random() * nouns.length)]; var noun = nouns[Math.floor(Math.random() * nouns.length)];
noun = noun.charAt(0).toUpperCase() + noun.substring(1); noun = noun.charAt(0).toUpperCase() + noun.substring(1);