Skip to content

Commit

Permalink
[mirotalk] - update config, improvements, update dep
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpejic85 committed Jan 9, 2025
1 parent b8d7fa0 commit 0fd2260
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 92 deletions.
1 change: 1 addition & 0 deletions app/src/config.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ module.exports = {
showEjectEveryoneBtn: true,
showLockRoomBtn: true,
showUnlockRoomBtn: true,
showShortcutsBtn: true,
},
remote: {
showAudioVolume: true,
Expand Down
2 changes: 1 addition & 1 deletion app/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies: {
* @license For commercial use or closed source, contact us at [email protected] or purchase directly from CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
* @author Miroslav Pejic - [email protected]
* @version 1.4.38
* @version 1.4.39
*
*/

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mirotalk",
"version": "1.4.38",
"version": "1.4.39",
"description": "A free WebRTC browser-based video call",
"main": "server.js",
"scripts": {
Expand Down Expand Up @@ -55,7 +55,7 @@
"js-yaml": "^4.1.0",
"ngrok": "^5.0.0-beta.2",
"nodemailer": "^6.9.16",
"openai": "^4.77.3",
"openai": "^4.78.0",
"qs": "^6.13.1",
"socket.io": "^4.8.1",
"swagger-ui-express": "^5.0.1",
Expand Down
6 changes: 2 additions & 4 deletions public/js/buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
let buttons = {
main: {
showShareRoomBtn: true,
showShareRoomBtn: true, // For guests
showHideMeBtn: true,
showAudioBtn: true,
showVideoBtn: true,
Expand All @@ -20,7 +20,6 @@ let buttons = {
showWhiteboardBtn: true,
showSnapshotRoomBtn: true,
showFileShareBtn: true,
showDocumentPipBtn: showDocumentPipBtn,
showMySettingsBtn: true,
showAboutBtn: true, // Please keep me always true, Thank you!
},
Expand Down Expand Up @@ -50,6 +49,7 @@ let buttons = {
showEjectEveryoneBtn: true,
showLockRoomBtn: true,
showUnlockRoomBtn: true,
showShortcutsBtn: true,
},
remote: {
showAudioVolume: true,
Expand All @@ -62,13 +62,11 @@ let buttons = {
showPrivateMessageBtn: true,
showZoomInOutBtn: false,
showVideoFocusBtn: true,
showVideoPipBtn: showVideoPipBtn,
},
local: {
showSnapShotBtn: true,
showVideoCircleBtn: true,
showZoomInOutBtn: false,
showVideoPipBtn: showVideoPipBtn,
},
whiteboard: {
whiteboardLockBtn: false,
Expand Down
24 changes: 17 additions & 7 deletions public/js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @license For commercial use or closed source, contact us at [email protected] or purchase directly from CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
* @author Miroslav Pejic - [email protected]
* @version 1.4.38
* @version 1.4.39
*
*/

Expand Down Expand Up @@ -5630,14 +5630,12 @@ function setupMySettings() {
});

// handle Shortcuts
if (!isDesktopDevice) {
if (!isDesktopDevice || !buttons.settings.showShortcutsBtn) {
elemDisplay(tabShortcutsBtn, false);
setKeyboardShortcuts(false);
} else {
switchShortcuts.addEventListener('change', (e) => {
isShortcutsEnabled = e.currentTarget.checked;
lsSettings.keyboard_shortcuts = isShortcutsEnabled;
lS.setSettings(lsSettings);
const status = isShortcutsEnabled ? 'enabled' : 'disabled';
const status = setKeyboardShortcuts(e.currentTarget.checked);
userLog('toast', `Keyboard shortcuts ${status}`);
playSound('switch');
});
Expand Down Expand Up @@ -5697,6 +5695,18 @@ function setupMySettings() {
}
}

/**
* Set Keyboard Shortcuts enabled
* @param {boolean} enabled
* @return {String} enabled/disabled
*/
function setKeyboardShortcuts(enabled){
isShortcutsEnabled = enabled;
lsSettings.keyboard_shortcuts = isShortcutsEnabled;
lS.setSettings(lsSettings);
return isShortcutsEnabled ? 'enabled' : 'disabled';
}

/**
* Load settings from local storage
*/
Expand Down Expand Up @@ -10918,7 +10928,7 @@ function showAbout() {
Swal.fire({
background: swBg,
position: 'center',
title: '<strong>WebRTC P2P v1.4.38</strong>',
title: '<strong>WebRTC P2P v1.4.39</strong>',
imageAlt: 'mirotalk-about',
imageUrl: images.about,
customClass: { image: 'img-about' },
Expand Down
76 changes: 0 additions & 76 deletions public/js/config.js

This file was deleted.

4 changes: 2 additions & 2 deletions public/views/client.html
Original file line number Diff line number Diff line change
Expand Up @@ -1143,12 +1143,12 @@ <h1>Loading</h1>
<script defer src="/socket.io/socket.io.js"></script>
<script defer src="../js/localStorage.js"></script>
<script defer src="../js/helpers.js"></script>
<script defer src="../js/client.js"></script>
<script defer src="../js/brand.js"></script>
<script defer src="../js/buttons.js"></script>
<script defer src="../js/client.js"></script>
<script defer src="../js/detectSpeaking.js"></script>
<script defer src="../js/speechRecognition.js"></script>
<script defer src="../js/videoGrid.js"></script>
<script defer src="../js/brand.js"></script>
<script defer src="../js/translate.js"></script>

<!-- end of Js scripts -->
Expand Down

0 comments on commit 0fd2260

Please sign in to comment.