[mirotalksfu] - add possibility to set default language for the room, improve brand section

هذا الالتزام موجود في:
Miroslav Pejic
2025-01-26 19:56:49 +01:00
الأصل 677f855d96
التزام aaf335df03
11 ملفات معدلة مع 77 إضافات و21 حذوفات

عرض الملف

@@ -55,7 +55,7 @@ dev 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.7.12
* @version 1.7.13
*
*/

عرض الملف

@@ -436,15 +436,22 @@ module.exports = {
*/
brand: {
app: {
language: 'en', // https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes
name: 'MiroTalk SFU',
title: 'MiroTalk SFU<br />Free browser based Real-time video calls.<br />Simple, Secure, Fast.',
description:
'Start your next video call with a single click. No download, plug-in, or login is required. Just get straight to talking, messaging, and sharing your screen.',
joinDescription: 'Pick a room name.<br />How about this one?',
joinButtonLabel: 'JOIN ROOM',
joinLastLabel: 'Your recent room:',
},
site: {
title: 'MiroTalk SFU, Free Video Calls, Messaging and Screen Sharing',
icon: '../images/logo.svg',
appleTouchIcon: '../images/logo.svg',
newRoomTitle: 'Pick name. <br />Share URL. <br />Start conference.',
newRoomDescription:
"Each room has its disposable URL. Just pick a room name and share your custom URL. It's that easy.",
},
meta: {
description:

عرض الملف

@@ -1,6 +1,6 @@
{
"name": "mirotalksfu",
"version": "1.7.12",
"version": "1.7.13",
"description": "WebRTC SFU browser-based video calls",
"main": "Server.js",
"scripts": {

عرض الملف

@@ -6,6 +6,8 @@ const brandData = window.sessionStorage.getItem(brandDataKey);
const title = document.getElementById('title');
const icon = document.getElementById('icon');
const appleTouchIcon = document.getElementById('appleTouchIcon');
const newRoomTitle = document.getElementById('newRoomTitle');
const newRoomDescription = document.getElementById('newRoomDescription');
const description = document.getElementById('description');
const keywords = document.getElementById('keywords');
@@ -19,6 +21,8 @@ const ogUrl = document.getElementById('ogUrl');
const appTitle = document.getElementById('appTitle');
const appDescription = document.getElementById('appDescription');
const joinDescription = document.getElementById('joinDescription');
const joinLastLabel = document.getElementById('joinLastLabel');
const features = document.getElementById('features');
const teams = document.getElementById('teams');
@@ -32,15 +36,22 @@ const footer = document.getElementById('footer');
// app/src/config.js - ui.brand
let BRAND = {
app: {
language: 'en',
name: 'MiroTalk SFU',
title: 'MiroTalk SFU<br />Free browser based Real-time video calls.<br />Simple, Secure, Fast.',
description:
'Start your next video call with a single click. No download, plug-in, or login is required. Just get straight to talking, messaging, and sharing your screen.',
joinDescription: 'Pick a room name.<br />How about this one?',
joinButtonLabel: 'JOIN ROOM',
joinLastLabel: 'Your recent room:',
},
site: {
title: 'MiroTalk SFU, Free Video Calls, Messaging and Screen Sharing',
icon: '../images/logo.svg',
appleTouchIcon: '../images/logo.svg',
newRoomTitle: 'Pick name. <br />Share URL. <br />Start conference.',
newRoomDescription:
"Each room has its disposable URL. Just pick a room name and share your custom URL. It's that easy.",
},
meta: {
description:
@@ -138,6 +149,15 @@ function customizeApp() {
if (appDescription) {
appDescription.textContent = BRAND.app.description;
}
if (joinDescription) {
joinDescription.innerHTML = BRAND.app.joinDescription;
}
if (joinRoomButton) {
joinRoomButton.innerText = BRAND.app.joinButtonLabel; // Common.js
}
if (joinLastLabel) {
joinLastLabel.innerText = BRAND.app.joinLastLabel;
}
}
// SITE metadata
@@ -151,6 +171,12 @@ function customizeSite() {
if (appleTouchIcon) {
appleTouchIcon.href = BRAND.site.appleTouchIcon;
}
if (newRoomTitle) {
newRoomTitle.innerHTML = BRAND.site.newRoomTitle;
}
if (newRoomDescription) {
newRoomDescription.textContent = BRAND.site.newRoomDescription;
}
}
// SEO metadata

عرض الملف

@@ -156,8 +156,10 @@ function typeWriter() {
}
const roomName = document.getElementById('roomName');
if (roomName) {
roomName.value = '';
if (window.sessionStorage.roomID) {
roomName.value = window.sessionStorage.roomID;
window.sessionStorage.roomID = false;
@@ -165,6 +167,13 @@ if (roomName) {
} else {
typeWriter();
}
roomName.onkeyup = (e) => {
if (e.keyCode === 13) {
e.preventDefault();
joinRoom();
}
};
}
// ####################################################################
@@ -174,6 +183,7 @@ if (roomName) {
const lastRoomContainer = document.getElementById('lastRoomContainer');
const lastRoom = document.getElementById('lastRoom');
const lastRoomName = window.localStorage.lastRoom ? window.localStorage.lastRoom : '';
if (lastRoomContainer && lastRoom && lastRoomName) {
lastRoomContainer.style.display = 'inline-flex';
lastRoom.setAttribute('href', '/join/?room=' + lastRoomName);
@@ -202,13 +212,6 @@ if (adultCnt) {
};
}
document.getElementById('roomName').onkeyup = (e) => {
if (e.keyCode === 13) {
e.preventDefault();
joinRoom();
}
};
function genRoom() {
document.getElementById('roomName').value = getUUID4();
}

عرض الملف

@@ -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.7.12
* @version 1.7.13
*
*/
@@ -4904,7 +4904,7 @@ function showAbout() {
imageUrl: image.about,
customClass: { image: 'img-about' },
position: 'center',
title: 'WebRTC SFU v1.7.12',
title: 'WebRTC SFU v1.7.13',
html: `
<br />
<div id="about">

عرض الملف

@@ -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.7.12
* @version 1.7.13
*
*/

عرض الملف

@@ -6,5 +6,26 @@ script.setAttribute('src', 'https://translate.google.com/translate_a/element.js?
document.head.appendChild(script);
function googleTranslateElementInit() {
new google.translate.TranslateElement({ pageLanguage: 'en' }, 'google_translate_element');
new google.translate.TranslateElement(
{
pageLanguage: 'en',
autoDisplay: false,
},
'google_translate_element',
);
const interval = setInterval(() => {
const language = BRAND.app.language ? BRAND.app.language : 'en';
if (language === 'en') {
clearInterval(interval);
}
const select = document.querySelector('.goog-te-combo');
if (select) {
select.value = language;
select.dispatchEvent(new Event('change'));
clearInterval(interval);
}
}, 500);
}

عرض الملف

@@ -81,8 +81,6 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/quill@2/dist/quill.snow.css" />
<script defer src="../js/Brand.js"></script>
<!-- Modern or es5 bundle -->
<script defer src="https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/pickr.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/pickr.es5.min.js"></script>
@@ -110,6 +108,7 @@
<script defer src="https://cdn.jsdelivr.net/npm/ua-parser-js@latest/dist/ua-parser.min.js"></script>
<script async src="../js/Umami.js"></script>
<script async src="../js/Brand.js"></script>
<script async src="../js/Translate.js"></script>
<!-- Js scripts https://cdn.jsdelivr.net -->

عرض الملف

@@ -122,7 +122,7 @@
<section class="cta section">
<div class="container">
<div class="cta-inner section-inner br-12">
<h3 class="section-title mt-0">
<h3 id="joinDescription" class="section-title mt-0">
Pick a room name.<br />
How about this one?
</h3>
@@ -141,7 +141,7 @@
</div>
</div>
<div id="lastRoomContainer" class="last-room">
<span>Your recent room:</span>
<span id="joinLastLabel">Your recent room:</span>
<a id="lastRoom"></a>
</div>
</div>

عرض الملف

@@ -85,12 +85,12 @@
<div class="container">
<div class="hero-inner">
<div class="hero-copy reveal-from-bottom">
<h1 class="hero-title mt-0">
<h1 id="newRoomTitle" class="hero-title mt-0">
Pick name. <br />
Share URL. <br />
Start conference.
</h1>
<p class="hero-paragraph">
<p id="newRoomDescription" class="hero-paragraph">
Each room has its disposable URL. Just pick a room name and share your custom URL.
It's that easy.
</p>
@@ -119,7 +119,7 @@
<section class="cta section mb-32">
<div class="container">
<div class="cta-inner section-inner br-12">
<h3 class="section-title mt-0">
<h3 id="joinDescription" class="section-title mt-0">
Pick a room name.<br />
How about this one?
</h3>
@@ -138,7 +138,7 @@
</div>
</div>
<div id="lastRoomContainer" class="last-room">
<span>Your recent room:</span>
<span id="joinLastLabel">Your recent room:</span>
<a id="lastRoom"></a>
</div>
</div>