session-closed error message and some CSS
This commit is contained in:
parent
498028284f
commit
1dd97e6ebe
6
index.js
6
index.js
@ -84,8 +84,8 @@ wss.on('connection', ws => {
|
||||
else{
|
||||
let xhr = new XMLHttpRequest();
|
||||
console.log(msg[1])
|
||||
xhr.timeout = 1000;
|
||||
xhr.open('GET', msg[1], true);
|
||||
xhr.timeout = 2000;
|
||||
xhr.ontimeout = function(e) {ws.send('error;url timed out')}
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState === 4) {
|
||||
@ -124,6 +124,10 @@ function get_key(length) {
|
||||
for (let i = 0; i < length; i++ )
|
||||
output += characters.charAt(Math.floor(Math.random() * characters.length))
|
||||
for (let i = 0; i < forbidden_array.length; i++) if (output === forbidden_array[i]) forbidden = true
|
||||
redis_cli.hget("surl;"+output, "url", function(err, obj) {
|
||||
if(err) console.log(err)
|
||||
if(obj) forbidden = true
|
||||
})
|
||||
} while (forbidden)
|
||||
return output
|
||||
}
|
||||
|
@ -15,100 +15,6 @@ body{
|
||||
margin: auto;
|
||||
background-color: #1f262b;
|
||||
}
|
||||
#stream{
|
||||
position: relative;
|
||||
top: 50px;
|
||||
left: 0px;
|
||||
margin: auto;
|
||||
width: calc(100% - 50px);
|
||||
height: auto;
|
||||
max-width: 700px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10px;
|
||||
}
|
||||
#left-control{
|
||||
position: absolute;
|
||||
bottom: 70px;
|
||||
left: calc(25% - 75px);
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 75px;
|
||||
box-shadow: 2px 2px 3px #14181b;
|
||||
}
|
||||
#right-control{
|
||||
position: absolute;
|
||||
bottom: 70px;
|
||||
right: calc(25% - 75px);
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 2px 2px 3px #14181b;
|
||||
}
|
||||
div.control-buttons{
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-color: #000000;
|
||||
border-radius: 25px;
|
||||
box-shadow: 1px 1px 3px #14181b;
|
||||
cursor: pointer;
|
||||
}
|
||||
#left-control-up{
|
||||
top: 10px;
|
||||
left: 50px;
|
||||
}
|
||||
#left-control-down{
|
||||
bottom: 10px;
|
||||
left: 50px;
|
||||
}
|
||||
#left-control-left{
|
||||
top: 50px;
|
||||
left: 10px;
|
||||
}
|
||||
#left-control-right{
|
||||
top: 50px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
#left-control-rotate-l{
|
||||
top: -10px;
|
||||
left: -10px;
|
||||
}
|
||||
#left-control-rotate-r{
|
||||
top: -10px;
|
||||
right: -10px;
|
||||
}
|
||||
|
||||
#right-control-up{
|
||||
top: 10px;
|
||||
left: 50px;
|
||||
}
|
||||
#right-control-down{
|
||||
bottom: 10px;
|
||||
left: 50px;
|
||||
}
|
||||
#right-control-left{
|
||||
top: 50px;
|
||||
left: 10px;
|
||||
}
|
||||
#right-control-right{
|
||||
top: 50px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
#right-control-forward{
|
||||
top: 10px;
|
||||
right: -60px;
|
||||
border: 2px solid #fff;
|
||||
}
|
||||
#right-control-backward{
|
||||
bottom: 10px;
|
||||
right: -60px;
|
||||
border: 2px solid #fff;
|
||||
}
|
||||
|
||||
div.login {
|
||||
position: absolute;
|
||||
left: calc(50% - 200px);
|
||||
|
Loading…
Reference in New Issue
Block a user