[mirotalk] - fix queryParams, update dep

This commit is contained in:
Miroslav Pejic
2026-02-05 09:24:52 +01:00
parent 92e3f27e3a
commit 1ea2eaf289
7 changed files with 25 additions and 29 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
# ====================================================
# MiroTalk P2P v.1.7.20 - Environment Configuration
# MiroTalk P2P v.1.7.21 - Environment Configuration
# ====================================================
# App environment
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* ==============================================
* MiroTalk P2P v.1.7.20 - Configuration File
* MiroTalk P2P v.1.7.21 - Configuration File
* ==============================================
*
* Branding and customizations require a license:
+2 -2
View File
@@ -45,7 +45,7 @@ dependencies: {
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.7.20
* @version 1.7.21
*
*/
@@ -93,7 +93,7 @@ const loginLimiter = rateLimit({
keyGenerator: (req) => req.body?.username || getIP(req),
});
const port = process.env.PORT || 3000; // must be the same to client.js signalingServerPort
const port = process.env.PORT || 3000;
const host = process.env.HOST || `http://localhost:${port}`;
const authHost = new Host(); // Authenticated IP by Login
+6 -6
View File
@@ -1,12 +1,12 @@
{
"name": "mirotalk",
"version": "1.7.20",
"version": "1.7.21",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "mirotalk",
"version": "1.7.20",
"version": "1.7.21",
"license": "AGPL-3.0",
"dependencies": {
"@mattermost/client": "11.3.0",
@@ -29,7 +29,7 @@
"js-yaml": "^4.1.1",
"jsdom": "^28.0.0",
"jsonwebtoken": "^9.0.3",
"nodemailer": "^7.0.13",
"nodemailer": "^8.0.0",
"openai": "^6.17.0",
"qs": "^6.14.1",
"socket.io": "^4.8.3",
@@ -4785,9 +4785,9 @@
}
},
"node_modules/nodemailer": {
"version": "7.0.13",
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-7.0.13.tgz",
"integrity": "sha512-PNDFSJdP+KFgdsG3ZzMXCgquO7I6McjY2vlqILjtJd0hy8wEvtugS9xKRF2NWlPNGxvLCXlTNIae4serI7dinw==",
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-8.0.0.tgz",
"integrity": "sha512-xvVJf/f0bzmNpnRIbhCp/IKxaHgJ6QynvUbLXzzMRPG3LDQr5oXkYuw4uDFyFYs8cge8agwwrJAXZsd4hhMquw==",
"license": "MIT-0",
"engines": {
"node": ">=6.0.0"
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "mirotalk",
"version": "1.7.20",
"version": "1.7.21",
"description": "A free WebRTC browser-based video call",
"main": "server.js",
"scripts": {
@@ -61,7 +61,7 @@
"js-yaml": "^4.1.1",
"jsdom": "^28.0.0",
"jsonwebtoken": "^9.0.3",
"nodemailer": "^7.0.13",
"nodemailer": "^8.0.0",
"openai": "^6.17.0",
"qs": "^6.14.1",
"socket.io": "^4.8.3",
+1 -1
View File
@@ -79,7 +79,7 @@ let brand = {
},
about: {
imageUrl: '../images/mirotalk-logo.gif',
title: 'WebRTC P2P v1.7.20',
title: 'WebRTC P2P v1.7.21',
html: `
<button
id="support-button"
+12 -16
View File
@@ -15,7 +15,7 @@
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.7.20
* @version 1.7.21
*
*/
@@ -23,9 +23,6 @@
// https://www.w3schools.com/js/js_strict.asp
// Signaling server URL
const signalingServer = getSignalingServer();
// This room
const myRoomId = getId('myRoomId');
const roomSessionDuration = getRoomDuration();
@@ -977,16 +974,6 @@ function getInfo() {
}
}
/**
* Get Signaling server URL
* @returns {string} Signaling server URL
*/
function getSignalingServer() {
console.log('00 Location', window.location);
// Must include port (e.g. localhost:3000) to keep pushState same-origin.
return window.location.origin;
}
/**
* Generate random Room id if not set
* @returns {string} Room Id
@@ -1001,7 +988,16 @@ function getRoomId() {
// if not specified room id or 'random', create one random
if (roomId == '' || roomId === 'random') {
roomId = makeId(20);
const newUrl = signalingServer + '/join/' + roomId;
// Preserve existing query params (audio, video, name, duration, notify, etc.) and set `room` as query param
const url = new URL(window.location.href);
// Force join route to query-based format: /join?room=...
url.pathname = `/join`;
// Ensure room is in query string
url.searchParams.set('room', roomId);
const newUrl = url.toString();
window.history.pushState({ url: newUrl }, roomId, newUrl);
}
console.log('Direct join', { room: roomId });
@@ -13640,7 +13636,7 @@ function showAbout() {
Swal.fire({
background: swBg,
position: 'center',
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.7.20',
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.7.21',
imageUrl: brand.about?.imageUrl && brand.about.imageUrl.trim() !== '' ? brand.about.imageUrl : images.about,
customClass: { image: 'img-about' },
html: `