diff --git a/app/src/Server.js b/app/src/Server.js index 8dc3408b..51fc5a65 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.14 + * @version 1.5.15 * */ diff --git a/package.json b/package.json index 7ac779c6..c233fca6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mirotalksfu", - "version": "1.5.14", + "version": "1.5.15", "description": "WebRTC SFU browser-based video calls", "main": "Server.js", "scripts": { diff --git a/public/js/Room.js b/public/js/Room.js index 5d2d8c9e..ffc2abe5 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.14 + * @version 1.5.15 * */ @@ -4279,7 +4279,7 @@ function showAbout() { imageUrl: image.about, customClass: { image: 'img-about' }, position: 'center', - title: 'WebRTC SFU v1.5.14', + title: 'WebRTC SFU v1.5.15', html: `
diff --git a/public/js/RoomClient.js b/public/js/RoomClient.js index 55b20e77..737f33c9 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.14 + * @version 1.5.15 * */ @@ -7937,13 +7937,8 @@ class RoomClient { createPollInputs(poll) { const questionInput = ``; const optionsInputs = poll.options - .map( - (option, i) => ` - - `, - ) + .map((option, i) => ``) .join(''); - return questionInput + optionsInputs; } @@ -7962,14 +7957,18 @@ class RoomClient { polls.forEach((poll, index) => { const question = poll.querySelector('.poll-h3').textContent; const options = poll.querySelectorAll('.options div label'); - const optionsText = Array.from(options) - .map((option) => option.textContent) - .join(', '); + + const optionsText = Array.from(options).reduce((acc, option, index) => { + acc[index + 1] = option.textContent.trim(); + return acc; + }, {}); const votersList = poll.querySelector('ul'); - const voters = Array.from(votersList.querySelectorAll('li')) - .map((li) => li.textContent) - .join('\n'); + const voters = Array.from(votersList.querySelectorAll('li')).reduce((acc, li) => { + const [name, vote] = li.textContent.split(':').map((item) => item.trim()); + acc[name] = vote; + return acc; + }, {}); results.push({ Poll: `${index + 1}`,