diff --git a/app/src/Server.js b/app/src/Server.js index 18c9f1a6..9fb8caee 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.34 + * @version 1.5.35 * */ diff --git a/package.json b/package.json index b4da81a5..67dcdf2e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mirotalksfu", - "version": "1.5.34", + "version": "1.5.35", "description": "WebRTC SFU browser-based video calls", "main": "Server.js", "scripts": { diff --git a/public/css/Room.css b/public/css/Room.css index 0c710f41..19c5ad66 100644 --- a/public/css/Room.css +++ b/public/css/Room.css @@ -442,6 +442,10 @@ th { width: 180px; } +#VideoMirrorDiv { + margin-top: 10px; +} + /*-------------------------------------------------------------- # RTMP settings --------------------------------------------------------------*/ diff --git a/public/js/Room.js b/public/js/Room.js index 503c204f..91a1b0bc 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.34 + * @version 1.5.35 * */ @@ -2277,6 +2277,11 @@ function handleSelects() { lS.setSettings(localStorageSettings); e.target.blur(); }; + switchVideoMirror.onchange = (e) => { + rc.toggleVideoMirror(); + rc.roomMessage('toggleVideoMirror', e.currentTarget.checked); + e.target.blur(); + }; switchSounds.onchange = (e) => { isSoundEnabled = e.currentTarget.checked; rc.roomMessage('sounds', isSoundEnabled); @@ -2783,6 +2788,7 @@ function handleRoomClientEvents() { show(stopVideoButton); setColor(startVideoButton, 'red'); setVideoButtonsDisabled(false); + switchVideoMirror.disabled = false; // if (isParticipantsListOpen) getRoomParticipants(); }); rc.on(RoomClient.EVENTS.pauseVideo, () => { @@ -2805,6 +2811,7 @@ function handleRoomClientEvents() { show(startVideoButton); setVideoButtonsDisabled(false); isVideoPrivacyActive = false; + switchVideoMirror.disabled = true; // if (isParticipantsListOpen) getRoomParticipants(); }); rc.on(RoomClient.EVENTS.startScreen, () => { @@ -4325,7 +4332,7 @@ function showAbout() { imageUrl: image.about, customClass: { image: 'img-about' }, position: 'center', - title: 'WebRTC SFU v1.5.34', + title: 'WebRTC SFU v1.5.35', html: `
diff --git a/public/js/RoomClient.js b/public/js/RoomClient.js index 59e9ab4b..4fbee97f 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.34 + * @version 1.5.35 * */ @@ -57,6 +57,7 @@ const icons = { lock: '', unlock: '', pitchBar: '', + mirror: '', sounds: '', fileSend: '', fileReceive: '', @@ -5799,6 +5800,9 @@ class RoomClient { const status = active ? 'ON' : 'OFF'; this.sound('switch'); switch (action) { + case 'toggleVideoMirror': + this.userLog('info', `${icons.mirror} Video mirror ${status}`, 'top-end'); + break; case 'pitchBar': this.userLog('info', `${icons.pitchBar} Audio pitch bar ${status}`, 'top-end'); break; @@ -8183,6 +8187,11 @@ class RoomClient { }); } + toggleVideoMirror() { + const peerVideo = this.getName(this.peer_id)[0]; + if (peerVideo) peerVideo.classList.toggle('mirror'); + } + sleep(ms) { return new Promise((resolve) => setTimeout(resolve, ms)); } diff --git a/public/views/Room.html b/public/views/Room.html index 729b4465..69138723 100644 --- a/public/views/Room.html +++ b/public/views/Room.html @@ -366,6 +366,15 @@ access to use this app.

Video Source:

+
+
+ +

Toggle mirror

+
+ +
+
+

@@ -380,7 +389,7 @@ access to use this app. -
+

Camera FPS:

@@ -608,7 +617,6 @@ access to use this app.

Speaker:

-