diff --git a/public/chat.css b/public/chat.css index b41c81b..95ad035 100644 --- a/public/chat.css +++ b/public/chat.css @@ -38,42 +38,47 @@ video { height: auto; background-image: url(loader.gif); background-size: 400px auto; - background-repeat:no-repeat; + background-repeat: no-repeat; background-position: center center; } -.video-overlay{ +.video-overlay { z-index: 1; } - .buttons { - width: 520px; + width: 700px; + margin-left: -350px; bottom: 0px; position: absolute; left: 50%; } +.buttons a { + cursor: pointer; +} + .round-button { - display:block; - width:100px; - height:60px; - line-height:60px; + display: block; + width: 100px; + height: 60px; + line-height: 60px; border-radius: 4px; background: #292B32; - text-align:center; + text-align: center; text-decoration: none; color: white; transition: 0.2s; margin: 20px; font-family: "Heebo", sans-serif; font-weight: 400; - float:left; + float: left; } + .round-button:hover { background: #3d3f47; } \ No newline at end of file diff --git a/public/chat.html b/public/chat.html index 745d6bf..e1b4789 100644 --- a/public/chat.html +++ b/public/chat.html @@ -5,32 +5,24 @@ Neon Chat + + - - - - -
- - - +
-
-
-
- Back - Fullscreen - Mute -
+ diff --git a/public/chat.js b/public/chat.js index 5f58cb2..fb35e8b 100644 --- a/public/chat.js +++ b/public/chat.js @@ -235,3 +235,47 @@ var VideoChat = { // VideoChat.requestScreenStream(); VideoChat.requestMediaStream(); + +function openFullscreen() { + if (VideoChat.remoteVideo.requestFullscreen) { + VideoChat.remoteVideo.requestFullscreen(); + } else if (VideoChat.remoteVideo.mozRequestFullScreen) { /* Firefox */ + VideoChat.remoteVideo.mozRequestFullScreen(); + } else if (VideoChat.remoteVideo.webkitRequestFullscreen) { /* Chrome, Safari and Opera */ + VideoChat.remoteVideo.webkitRequestFullscreen(); + } else if (VideoChat.remoteVideo.msRequestFullscreen) { /* IE/Edge */ + VideoChat.remoteVideo.msRequestFullscreen(); + } +} + + +function muteMicrophone() { + var muted = !VideoChat.localStream.getAudioTracks()[0].enabled; + VideoChat.localStream.getAudioTracks()[0].enabled = muted; + var mutedButton = document.getElementById("muteButton"); + if (!muted) { + mutedButton.innerText = "Unmute" + } else { + mutedButton.innerText = "Mute" + } +} + + +var timedelay = 1; + +function delayCheck() { + if (timedelay === 5) { + $('#buttons').fadeOut(); + timedelay = 1; + } + timedelay = timedelay + 1; +} + +$(document).mousemove(function () { + $('#buttons').fadeIn(); + timedelay = 1; + clearInterval(_delay); + _delay = setInterval(delayCheck, 500); +}); +// page loads starts delay timer +_delay = setInterval(delayCheck, 500);