Removed comments, spacing and changed password
This commit is contained in:
parent
e1a1ab706f
commit
7d5bac659c
@ -2,5 +2,5 @@
|
||||
"server_ip": "192.168.68.118",
|
||||
"server_port": 3000,
|
||||
"video_path": "videos/bigbuck.mp4",
|
||||
"password": "pass"
|
||||
"password": ""
|
||||
}
|
@ -63,16 +63,16 @@ socket.addEventListener("message", (event) => {
|
||||
|
||||
console.log(`%cGap was ${proposed_time - vid.currentTime}`, 'font-size:12px; color:purple')
|
||||
if (state.playing){
|
||||
// tolerance while the video is playing
|
||||
if(gap > PLAYING_THRESH){
|
||||
// tolerance while the video is playing
|
||||
vid.currentTime = proposed_time
|
||||
}
|
||||
vid.play()
|
||||
}
|
||||
else{
|
||||
vid.pause()
|
||||
// condition to prevent an unnecessary seek
|
||||
if (gap > PAUSED_THRESH){
|
||||
// condition to prevent an unnecessary seek
|
||||
vid.currentTime = proposed_time
|
||||
}
|
||||
}
|
||||
@ -142,7 +142,7 @@ function median(values) {
|
||||
|
||||
values.sort((x,y) => (x-y));
|
||||
let half = Math.floor(values.length / 2);
|
||||
if (values.length % 2){
|
||||
if (values.length % 2) {
|
||||
return values[half];
|
||||
}
|
||||
return (values[half - 1] + values[half]) / 2.0;
|
||||
|
@ -79,7 +79,6 @@ app.use(session({
|
||||
resave: false,
|
||||
saveUninitialized: false,
|
||||
logged: false
|
||||
|
||||
}));
|
||||
|
||||
app.get("/", function (req, res) {
|
||||
|
30
src/main.css
30
src/main.css
@ -30,34 +30,4 @@ video {
|
||||
left: 0;
|
||||
border-radius: 10px;
|
||||
border: 2px solid black;
|
||||
}
|
||||
|
||||
.user-list {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.user-list h2 {
|
||||
margin-bottom: 10px;
|
||||
font-size: 1.5rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.user-list ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.user-list li {
|
||||
margin-bottom: 5px;
|
||||
padding: 10px;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.user-list li:hover {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
|
||||
.user-list li:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
@ -17,15 +17,6 @@
|
||||
<source src="/video" type="video/mp4" />
|
||||
</video>
|
||||
</div>
|
||||
<div class="user-list">
|
||||
<h2>People Watching:</h2>
|
||||
<ul>
|
||||
<li>User 1</li>
|
||||
<li>User 2</li>
|
||||
<li>User 3</li>
|
||||
<!-- Add more list items for additional users -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user