From 8c9dd84bae4b0f63164ef396c308911237f4fe57 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 24 Nov 2025 09:03:40 +0000 Subject: [PATCH] more css fixed, removed unusued buttons + remove other bg images: --- public/css/Room.css | 55 ++++++++++++++++++++++++++ public/js/Room.js | 86 ++++++++++++++++++++--------------------- public/js/RoomClient.js | 11 +----- public/views/Room.html | 33 ++++++++-------- 4 files changed, 116 insertions(+), 69 deletions(-) diff --git a/public/css/Room.css b/public/css/Room.css index 8a495ffa..4c653e22 100644 --- a/public/css/Room.css +++ b/public/css/Room.css @@ -430,6 +430,61 @@ body { color: red; } + +#toggleExtraButton i { + color: red; +} + +#startAudioButton i { + color: red; +} + +#stopAudioButton i { + color: red; +} + +#startVideoButton i { + color: red; +} + +#stopVideoButton i { + color: red; +} + +#swapCameraButton i { + color: red; +} + +#startScreenButton i { + color: red; +} + +#stopScreenButton i { + color: red; +} + +#raiseHandButton i { + color: red; +} + +#lowerHandButton i { + color: red; +} + +#chatButton i { + color: red; +} + +#settingsButton i { + color: red; +} + +#exitButton i { + color: red; +} + + + #toggleExtraButton { color: #66beff; } diff --git a/public/js/Room.js b/public/js/Room.js index 4326b0a7..898e65fe 100644 --- a/public/js/Room.js +++ b/public/js/Room.js @@ -735,9 +735,9 @@ function setupInitButtons() { initAudioButton.onclick = () => { handleAudio(); }; - initAudioVideoButton.onclick = async (e) => { - await handleAudioVideo(e); - }; + // initAudioVideoButton.onclick = async (e) => { + // await handleAudioVideo(e); + // }; // initStartScreenButton.onclick = async () => { // await toggleScreenSharing(); // }; @@ -1172,7 +1172,7 @@ async function whoAreYou() { isInitVideoLoaded = true; elemDisplay('initVideo', false); elemDisplay('initVideoButton', false); - elemDisplay('initAudioVideoButton', false); + // elemDisplay('initAudioVideoButton', false); elemDisplay('initVideoAudioRefreshButton', false); elemDisplay('initVideoSelect', false); elemDisplay('tabVideoDevicesBtn', false); @@ -1181,7 +1181,7 @@ async function whoAreYou() { if (!BUTTONS.main.startAudioButton) { isAudioAllowed = false; elemDisplay('initAudioButton', false); - elemDisplay('initAudioVideoButton', false); + // elemDisplay('initAudioVideoButton', false); elemDisplay('initVideoAudioRefreshButton', false); elemDisplay('initMicrophoneSelect', false); elemDisplay('initSpeakerSelect', false); @@ -1344,14 +1344,14 @@ async function handleAudioVideo() { lS.setInitConfig(lS.MEDIA_TYPE.audioVideo, isAudioVideoAllowed); initAudioButton.className = 'fas fa-microphone' + (isAudioVideoAllowed ? '' : '-slash'); initVideoButton.className = 'fas fa-video' + (isAudioVideoAllowed ? '' : '-slash'); - initAudioVideoButton.className = 'fas fa-eye' + (isAudioVideoAllowed ? '' : '-slash'); + // initAudioVideoButton.className = 'fas fa-eye' + (isAudioVideoAllowed ? '' : '-slash'); if (!isAudioVideoAllowed) { hide(initAudioButton); hide(initVideoButton); hide(initVideoAudioRefreshButton); } if (isAudioAllowed && isVideoAllowed && !isMobileDevice) show(initVideoAudioRefreshButton); - setColor(initAudioVideoButton, isAudioVideoAllowed ? 'white' : 'red'); + // setColor(initAudioVideoButton, isAudioVideoAllowed ? 'white' : 'red'); setColor(initAudioButton, isAudioAllowed ? 'white' : 'red'); setColor(initVideoButton, isVideoAllowed ? 'white' : 'red'); setColor(startAudioButton, isAudioAllowed ? 'white' : 'red'); @@ -2396,7 +2396,7 @@ function setButtonsInit() { if (!isMobileDevice) { setTippy('initAudioButton', 'Toggle the audio', 'top'); setTippy('initVideoButton', 'Toggle the video', 'top'); - setTippy('initAudioVideoButton', 'Toggle the audio & video', 'top'); + // setTippy('initAudioVideoButton', 'Toggle the audio & video', 'top'); setTippy('initStartScreenButton', 'Toggle screen sharing', 'top'); setTippy('initStopScreenButton', 'Toggle screen sharing', 'top'); setTippy('initVideoMirrorButton', 'Toggle video mirror', 'top'); @@ -2405,7 +2405,7 @@ function setButtonsInit() { } if (!isAudioAllowed) hide(initAudioButton); if (!isVideoAllowed) hide(initVideoButton); - if (!isAudioAllowed || !isVideoAllowed) hide(initAudioVideoButton); + // if (!isAudioAllowed || !isVideoAllowed) hide(initAudioVideoButton); if ((!isAudioAllowed && !isVideoAllowed) || isMobileDevice) hide(initVideoAudioRefreshButton); isAudioVideoAllowed = isAudioAllowed && isVideoAllowed; } @@ -2667,7 +2667,7 @@ async function toggleScreenSharing() { hide(initStartScreenButton); disable(initVideoSelect, true); disable(initVideoButton, true); - disable(initAudioVideoButton, true); + // disable(initAudioVideoButton, true); disable(initVideoAudioRefreshButton, true); disable(initVirtualBackgroundButton, true); }) @@ -2682,7 +2682,7 @@ async function toggleScreenSharing() { show(initStartScreenButton); disable(initVideoSelect, false); disable(initVideoButton, false); - disable(initAudioVideoButton, false); + // disable(initAudioVideoButton, false); disable(initVideoAudioRefreshButton, false); disable(initVirtualBackgroundButton, false); } @@ -5414,40 +5414,40 @@ function showImageSelector() { ); // Handle file upload (common logic for file selection) - function setupFileUploadButton(buttonId, sourceImg, tooltip, handler) { - const imgButton = document.createElement('img'); - imgButton.id = buttonId; - imgButton.src = sourceImg; - imgButton.addEventListener('click', handler); - imageGrid.appendChild(imgButton); - setTippy(imgButton.id, tooltip, 'top'); - } + // function setupFileUploadButton(buttonId, sourceImg, tooltip, handler) { + // const imgButton = document.createElement('img'); + // imgButton.id = buttonId; + // imgButton.src = sourceImg; + // imgButton.addEventListener('click', handler); + // imageGrid.appendChild(imgButton); + // setTippy(imgButton.id, tooltip, 'top'); + // } - function handleFileUpload(file) { - if (file && file.type.startsWith('image/')) { - const reader = new FileReader(); - reader.onload = async (e) => { - const imgData = e.target.result; - await indexedDBHelper.saveImage(imgData); - addImageToUI(imgData); - }; - reader.readAsDataURL(file); - } - } + // function handleFileUpload(file) { + // if (file && file.type.startsWith('image/')) { + // const reader = new FileReader(); + // reader.onload = async (e) => { + // const imgData = e.target.result; + // await indexedDBHelper.saveImage(imgData); + // addImageToUI(imgData); + // }; + // reader.readAsDataURL(file); + // } + // } - function createUploadImageButton() { - const fileInput = document.createElement('input'); - fileInput.type = 'file'; - fileInput.accept = 'image/*'; - fileInput.style.display = 'none'; - fileInput.addEventListener('change', (event) => { - handleFileUpload(event.target.files[0]); - }); + // function createUploadImageButton() { + // const fileInput = document.createElement('input'); + // fileInput.type = 'file'; + // fileInput.accept = 'image/*'; + // fileInput.style.display = 'none'; + // fileInput.addEventListener('change', (event) => { + // handleFileUpload(event.target.files[0]); + // }); - setupFileUploadButton('initUploadImg', image.upload, 'Upload your custom image', () => fileInput.click()); + // setupFileUploadButton('initUploadImg', image.upload, 'Upload your custom image', () => fileInput.click()); - return fileInput; - } + // return fileInput; + // } // Function to add an image to UI function addImageToUI(imgData) { @@ -5519,10 +5519,10 @@ function showImageSelector() { }); // Upload from file button - createUploadImageButton(); + // createUploadImageButton(); // Upload from URL button - setupFileUploadButton('initLinkImage', image.link, 'Upload Image from URL', askForImageURL); + // setupFileUploadButton('initLinkImage', image.link, 'Upload Image from URL', askForImageURL); // Load default virtual backgrounds virtualBackgrounds.forEach((imageUrl, index) => { diff --git a/public/js/RoomClient.js b/public/js/RoomClient.js index fba21235..b706e2cf 100644 --- a/public/js/RoomClient.js +++ b/public/js/RoomClient.js @@ -122,16 +122,7 @@ const image = { upload: '../images/upload.png', virtualBackground: { one: '../images/virtual-background/default/background-1.jpg', - two: '../images/virtual-background/default/background-2.webp', - three: '../images/virtual-background/default/background-3.jpg', - four: '../images/virtual-background/default/background-4.jpg', - five: '../images/virtual-background/default/background-5.jpg', - six: '../images/virtual-background/default/background-6.jpg', - seven: '../images/virtual-background/default/background-7.jpg', - eight: '../images/virtual-background/default/background-8.jpg', - nine: '../images/virtual-background/default/background-9.jpg', - ten: '../images/virtual-background/default/background-10.jpg', - eleven: '../images/virtual-background/default/background-11.gif', + two: '../images/virtual-background/default/background-2.webp' }, }; diff --git a/public/views/Room.html b/public/views/Room.html index 76247ac6..9afc0824 100644 --- a/public/views/Room.html +++ b/public/views/Room.html @@ -174,7 +174,7 @@ access to use this app.
- + @@ -225,23 +225,24 @@ access to use this app.
-
+ + - - - - - - - - - - - - - -