mirror of
https://github.com/ianramzy/decentralized-video-chat.git
synced 2024-11-23 10:39:20 +08:00
more words
This commit is contained in:
parent
c6788d1fb5
commit
b4dbf5ad82
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
node_modules/
|
||||
.DS_Store
|
||||
/.idea
|
||||
.env
|
||||
/.idea
|
@ -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()
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user