[mirotalk] - add random room btn, update dep
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
# ====================================================
|
||||
# MiroTalk P2P v.1.7.21 - Environment Configuration
|
||||
# MiroTalk P2P v.1.7.22 - Environment Configuration
|
||||
# ====================================================
|
||||
|
||||
# App environment
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* ==============================================
|
||||
* MiroTalk P2P v.1.7.21 - Configuration File
|
||||
* MiroTalk P2P v.1.7.22 - Configuration File
|
||||
* ==============================================
|
||||
*
|
||||
* Branding and customizations require a license:
|
||||
|
||||
+1
-1
@@ -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.21
|
||||
* @version 1.7.22
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
Generated
+10
-10
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "mirotalk",
|
||||
"version": "1.7.21",
|
||||
"version": "1.7.22",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "mirotalk",
|
||||
"version": "1.7.21",
|
||||
"version": "1.7.22",
|
||||
"license": "AGPL-3.0",
|
||||
"dependencies": {
|
||||
"@mattermost/client": "11.3.0",
|
||||
@@ -19,7 +19,7 @@
|
||||
"cors": "^2.8.6",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dompurify": "^3.3.1",
|
||||
"dotenv": "^17.2.3",
|
||||
"dotenv": "^17.2.4",
|
||||
"express": "^5.2.1",
|
||||
"express-openid-connect": "^2.19.4",
|
||||
"express-rate-limit": "^8.2.1",
|
||||
@@ -30,7 +30,7 @@
|
||||
"jsdom": "^28.0.0",
|
||||
"jsonwebtoken": "^9.0.3",
|
||||
"nodemailer": "^8.0.0",
|
||||
"openai": "^6.17.0",
|
||||
"openai": "^6.18.0",
|
||||
"qs": "^6.14.1",
|
||||
"socket.io": "^4.8.3",
|
||||
"swagger-ui-express": "^5.0.1",
|
||||
@@ -2466,9 +2466,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/dotenv": {
|
||||
"version": "17.2.3",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz",
|
||||
"integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==",
|
||||
"version": "17.2.4",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.4.tgz",
|
||||
"integrity": "sha512-mudtfb4zRB4bVvdj0xRo+e6duH1csJRM8IukBqfTRvHotn9+LBXB8ynAidP9zHqoRC/fsllXgk4kCKlR21fIhw==",
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
@@ -5074,9 +5074,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/openai": {
|
||||
"version": "6.17.0",
|
||||
"resolved": "https://registry.npmjs.org/openai/-/openai-6.17.0.tgz",
|
||||
"integrity": "sha512-NHRpPEUPzAvFOAFs9+9pC6+HCw/iWsYsKCMPXH5Kw7BpMxqd8g/A07/1o7Gx2TWtCnzevVRyKMRFqyiHyAlqcA==",
|
||||
"version": "6.18.0",
|
||||
"resolved": "https://registry.npmjs.org/openai/-/openai-6.18.0.tgz",
|
||||
"integrity": "sha512-odLRYyz9rlzz6g8gKn61RM2oP5UUm428sE2zOxZqS9MzVfD5/XW8UoEjpnRkzTuScXP7ZbP/m7fC+bl8jCOZZw==",
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"openai": "bin/cli"
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mirotalk",
|
||||
"version": "1.7.21",
|
||||
"version": "1.7.22",
|
||||
"description": "A free WebRTC browser-based video call",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
@@ -51,7 +51,7 @@
|
||||
"cors": "^2.8.6",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dompurify": "^3.3.1",
|
||||
"dotenv": "^17.2.3",
|
||||
"dotenv": "^17.2.4",
|
||||
"express": "^5.2.1",
|
||||
"express-openid-connect": "^2.19.4",
|
||||
"express-rate-limit": "^8.2.1",
|
||||
@@ -62,7 +62,7 @@
|
||||
"jsdom": "^28.0.0",
|
||||
"jsonwebtoken": "^9.0.3",
|
||||
"nodemailer": "^8.0.0",
|
||||
"openai": "^6.17.0",
|
||||
"openai": "^6.18.0",
|
||||
"qs": "^6.14.1",
|
||||
"socket.io": "^4.8.3",
|
||||
"swagger-ui-express": "^5.0.1",
|
||||
|
||||
@@ -179,6 +179,48 @@ body::before {
|
||||
box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
|
||||
}
|
||||
|
||||
.cr-input-wrap {
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.cr-input-wrap .cr-input {
|
||||
width: 100%;
|
||||
padding-right: 96px;
|
||||
}
|
||||
|
||||
.cr-input-action {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: 6px;
|
||||
height: 36px;
|
||||
padding: 0 12px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.16);
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
color: var(--cr-text);
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
transition:
|
||||
background 160ms ease,
|
||||
border-color 160ms ease,
|
||||
transform 120ms ease;
|
||||
}
|
||||
|
||||
.cr-input-action:hover {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border-color: rgba(255, 255, 255, 0.22);
|
||||
}
|
||||
|
||||
.cr-input-action:active {
|
||||
transform: translateY(1px);
|
||||
}
|
||||
|
||||
.cr-input-action:focus-visible {
|
||||
outline: 3px solid rgba(255, 255, 255, 0.25);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.cr-toggle-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ let brand = {
|
||||
},
|
||||
about: {
|
||||
imageUrl: '../images/mirotalk-logo.gif',
|
||||
title: 'WebRTC P2P v1.7.21',
|
||||
title: 'WebRTC P2P v1.7.22',
|
||||
html: `
|
||||
<button
|
||||
id="support-button"
|
||||
|
||||
+2
-2
@@ -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.21
|
||||
* @version 1.7.22
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -13636,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.21',
|
||||
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.7.22',
|
||||
imageUrl: brand.about?.imageUrl && brand.about.imageUrl.trim() !== '' ? brand.about.imageUrl : images.about,
|
||||
customClass: { image: 'img-about' },
|
||||
html: `
|
||||
|
||||
@@ -13,6 +13,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
const statusEl = document.getElementById('crStatus');
|
||||
const previewEl = document.getElementById('crPreviewUrl');
|
||||
const copyBtn = document.getElementById('crCopy');
|
||||
const randomRoomBtn = document.getElementById('crRandomRoom');
|
||||
|
||||
const roomEl = document.getElementById('room');
|
||||
const nameEl = document.getElementById('name');
|
||||
@@ -55,6 +56,20 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
const boolToFlag = (checked) => (checked ? '1' : '0');
|
||||
|
||||
const uuidv4 = () => {
|
||||
// Prefer native implementation when available.
|
||||
if (typeof crypto?.randomUUID === 'function') {
|
||||
return crypto.randomUUID();
|
||||
}
|
||||
// Fallback: RFC 4122 version 4 UUID using CSPRNG.
|
||||
const bytes = new Uint8Array(16);
|
||||
crypto.getRandomValues(bytes);
|
||||
bytes[6] = (bytes[6] & 0x0f) | 0x40; // version 4
|
||||
bytes[8] = (bytes[8] & 0x3f) | 0x80; // variant 10
|
||||
const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, '0')).join('');
|
||||
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
||||
};
|
||||
|
||||
const normalizeDuration = (raw) => {
|
||||
const value = safe(raw);
|
||||
if (!value) return 'unlimited';
|
||||
@@ -137,6 +152,16 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
if (!form) return;
|
||||
|
||||
if (randomRoomBtn && roomEl) {
|
||||
randomRoomBtn.addEventListener('click', () => {
|
||||
setError('');
|
||||
setStatus('');
|
||||
roomEl.value = uuidv4();
|
||||
updatePreview();
|
||||
roomEl.focus();
|
||||
});
|
||||
}
|
||||
|
||||
// Live preview
|
||||
updatePreview();
|
||||
|
||||
|
||||
@@ -34,16 +34,27 @@
|
||||
<form id="customizeRoomForm" class="cr-form" autocomplete="off">
|
||||
<div class="cr-field">
|
||||
<label class="cr-label" for="room">Room</label>
|
||||
<input
|
||||
id="room"
|
||||
name="room"
|
||||
class="cr-input"
|
||||
type="text"
|
||||
inputmode="text"
|
||||
placeholder="room123"
|
||||
maxlength="64"
|
||||
required
|
||||
/>
|
||||
<div class="cr-input-wrap">
|
||||
<input
|
||||
id="room"
|
||||
name="room"
|
||||
class="cr-input"
|
||||
type="text"
|
||||
inputmode="text"
|
||||
placeholder="room123"
|
||||
maxlength="64"
|
||||
required
|
||||
/>
|
||||
<button
|
||||
id="crRandomRoom"
|
||||
class="cr-input-action"
|
||||
type="button"
|
||||
aria-label="Generate random room id"
|
||||
title="Generate random room id"
|
||||
>
|
||||
Random
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cr-field">
|
||||
|
||||
Reference in New Issue
Block a user