From c230627a36dfbbc6c1e3b9732f0d962889d90a34 Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Thu, 18 Jul 2024 11:13:51 +0200 Subject: [PATCH] [mirotalksfu] - Improve real-time poll UI, update readme --- README.md | 1 + app/src/Server.js | 2 +- package.json | 3 ++- public/js/Room.js | 6 ++++-- public/js/RoomClient.js | 14 ++++++++++---- public/views/Room.html | 4 ++-- 6 files changed, 20 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 679de0f7..16b3e522 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ - Push-to-talk functionality, similar to a walkie-talkie. - Advanced collaborative whiteboard for teachers. - Real-time sharing of YouTube embed videos, video files (MP4, WebM, OGG), and audio files (MP3). +- Real-time polls, allows users to create and participate in live polls, providing instant feedback and results. - Integrated RTMP server, fully compatible with **[OBS](https://obsproject.com)**. - Supports RTMP streaming from files, URLs, webcams, screens, and windows. - Full-screen mode with one-click video element zooming and pin/unpin. diff --git a/app/src/Server.js b/app/src/Server.js index e47c7955..3d90feb2 100644 --- a/app/src/Server.js +++ b/app/src/Server.js @@ -44,7 +44,7 @@ dependencies: { * @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon * @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970 * @author Miroslav Pejic - miroslav.pejic.85@gmail.com - * @version 1.5.11 + * @version 1.5.12 * */ diff --git a/package.json b/package.json index b4b11ee8..4b578aa3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mirotalksfu", - "version": "1.5.11", + "version": "1.5.12", "description": "WebRTC SFU browser-based video calls", "main": "Server.js", "scripts": { @@ -45,6 +45,7 @@ "oidc", "chatgpt", "rtmp", + "poll", "client", "server", "streaming", diff --git a/public/js/Room.js b/public/js/Room.js index fec42d7a..076c08ca 100644 --- a/public/js/Room.js +++ b/public/js/Room.js @@ -11,7 +11,7 @@ if (location.href.substr(0, 5) !== 'https') location.href = 'https' + location.h * @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon * @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970 * @author Miroslav Pejic - miroslav.pejic.85@gmail.com - * @version 1.5.11 + * @version 1.5.12 * */ @@ -346,6 +346,8 @@ function initClient() { setTippy('chatMaxButton', 'Maximize', 'bottom'); setTippy('chatMinButton', 'Minimize', 'bottom'); setTippy('pollCloseBtn', 'Close', 'bottom'); + setTippy('addOptionButton', 'Add option', 'top'); + setTippy('delOptionButton', 'Delete option', 'top'); setTippy('participantsSaveBtn', 'Save participants info', 'bottom'); setTippy('participantsRaiseHandBtn', 'Toggle raise hands', 'bottom'); setTippy('participantsUnreadMessagesBtn', 'Toggle unread messages', 'bottom'); @@ -4273,7 +4275,7 @@ function showAbout() { imageUrl: image.about, customClass: { image: 'img-about' }, position: 'center', - title: 'WebRTC SFU v1.5.11', + title: 'WebRTC SFU v1.5.12', html: `
diff --git a/public/js/RoomClient.js b/public/js/RoomClient.js index 0cd90b2c..b705d34d 100644 --- a/public/js/RoomClient.js +++ b/public/js/RoomClient.js @@ -9,7 +9,7 @@ * @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon * @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970 * @author Miroslav Pejic - miroslav.pejic.85@gmail.com - * @version 1.5.11 + * @version 1.5.12 * */ @@ -7816,7 +7816,7 @@ class RoomClient { const toggleButton = document.createElement('button'); const toggleButtonIcon = document.createElement('i'); toggleButtonIcon.className = 'fas fa-users'; - toggleButton.textContent = ' Toggle Voters'; + toggleButton.id = 'toggleVoters'; toggleButton.className = 'view-btn'; // Append the icon to the button toggleButton.insertBefore(toggleButtonIcon, toggleButton.firstChild); @@ -7831,7 +7831,7 @@ class RoomClient { const editPollButton = document.createElement('button'); const editPollButtonIcon = document.createElement('i'); editPollButtonIcon.className = 'fas fa-pen-to-square'; - editPollButton.textContent = ' Edit Poll'; + editPollButton.id = 'editPoll'; editPollButton.className = 'poll-btn'; editPollButton.insertBefore(editPollButtonIcon, editPollButton.firstChild); editPollButton.addEventListener('click', () => { @@ -7867,7 +7867,7 @@ class RoomClient { const deletePollButton = document.createElement('button'); const deletePollButtonIcon = document.createElement('i'); deletePollButtonIcon.className = 'fas fa-minus'; - deletePollButton.textContent = ' Delete Poll'; + deletePollButton.id = 'delPoll'; deletePollButton.className = 'del-btn'; deletePollButton.insertBefore(deletePollButtonIcon, deletePollButton.firstChild); deletePollButton.addEventListener('click', () => { @@ -7890,6 +7890,12 @@ class RoomClient { // } pollsContainer.appendChild(pollDiv); + + if (!this.isMobileDevice) { + setTippy('toggleVoters', 'Toggle voters', 'top'); + setTippy('delPoll', 'Delete poll', 'top'); + setTippy('editPoll', 'Edit poll', 'top'); + } }); } diff --git a/public/views/Room.html b/public/views/Room.html index d34a2773..b8c752a0 100644 --- a/public/views/Room.html +++ b/public/views/Room.html @@ -1457,10 +1457,10 @@ access to use this app.