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

3
.gitignore vendored
View File

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

View File

@ -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()

View File

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