Skip to content

Commit a6d443b

Browse files
[mirotalk] - add scan to join popup, update dep
1 parent 98afe41 commit a6d443b

File tree

6 files changed

+72
-8
lines changed

6 files changed

+72
-8
lines changed

app/src/server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ dependencies: {
4545
* @license For commercial use or closed source, contact us at [email protected] or purchase directly from CodeCanyon
4646
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
4747
* @author Miroslav Pejic - [email protected]
48-
* @version 1.4.97
48+
* @version 1.4.98
4949
*
5050
*/
5151

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mirotalk",
3-
"version": "1.4.97",
3+
"version": "1.4.98",
44
"description": "A free WebRTC browser-based video call",
55
"main": "server.js",
66
"scripts": {
@@ -43,14 +43,14 @@
4343
"dependencies": {
4444
"@mattermost/client": "10.6.0",
4545
"@ngrok/ngrok": "1.4.1",
46-
"@sentry/node": "^9.10.1",
46+
"@sentry/node": "^9.11.0",
4747
"axios": "^1.8.4",
4848
"chokidar": "^4.0.3",
4949
"colors": "^1.4.0",
5050
"compression": "^1.8.0",
5151
"cors": "^2.8.5",
5252
"crypto-js": "^4.2.0",
53-
"dompurify": "^3.2.4",
53+
"dompurify": "^3.2.5",
5454
"dotenv": "^16.4.7",
5555
"express": "^5.1.0",
5656
"express-openid-connect": "^2.18.0",

public/css/client.css

+35
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,34 @@ button:hover {
952952
align-items: center;
953953
}
954954

955+
#qrRoomPopupContainer {
956+
z-index: 9999;
957+
position: fixed;
958+
display: none;
959+
justify-content: center;
960+
align-items: center;
961+
flex-direction: column;
962+
padding: 10px;
963+
background: var(--body-bg);
964+
border: var(--border);
965+
border-radius: 10px;
966+
box-shadow: var(--box-shadow);
967+
}
968+
969+
#qrText {
970+
margin-top: 10px;
971+
color: #fff;
972+
font-size: 16px;
973+
font-weight: bold;
974+
text-align: center;
975+
width: 100%;
976+
}
977+
978+
#qrRoomPopup {
979+
width: 256px;
980+
height: 256px;
981+
}
982+
955983
/*--------------------------------------------------------------
956984
# My settings
957985
--------------------------------------------------------------*/
@@ -1858,6 +1886,13 @@ hr {
18581886
display: block;
18591887
}
18601888

1889+
.top-center {
1890+
position: fixed;
1891+
top: 10px;
1892+
left: 50%;
1893+
transform: translateX(-50%);
1894+
}
1895+
18611896
.center {
18621897
position: fixed;
18631898
top: 50%;

public/js/brand.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ let brand = {
7373
},
7474
about: {
7575
imageUrl: '../images/mirotalk-logo.gif',
76-
title: 'WebRTC P2P v1.4.97',
76+
title: 'WebRTC P2P v1.4.98',
7777
html: `
7878
<button
7979
id="support-button"

public/js/client.js

+25-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @license For commercial use or closed source, contact us at [email protected] or purchase directly from CodeCanyon
1616
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
1717
* @author Miroslav Pejic - [email protected]
18-
* @version 1.4.97
18+
* @version 1.4.98
1919
*
2020
*/
2121

@@ -1968,6 +1968,7 @@ async function joinToChannel() {
19681968
userAgent: userAgent,
19691969
});
19701970
handleBodyOnMouseMove(); // show/hide buttonsBar, bottomButtons ...
1971+
makeRoomPopupQR();
19711972
}
19721973

19731974
/**
@@ -4482,6 +4483,14 @@ function setShareRoomBtn() {
44824483
shareRoomBtn.addEventListener('click', async (e) => {
44834484
shareRoomUrl();
44844485
});
4486+
shareRoomBtn.addEventListener('mouseenter', () => {
4487+
if (isMobileDevice) return;
4488+
elemDisplay(qrRoomPopupContainer, true);
4489+
});
4490+
shareRoomBtn.addEventListener('mouseleave', () => {
4491+
if (isMobileDevice) return;
4492+
elemDisplay(qrRoomPopupContainer, false);
4493+
});
44854494
}
44864495

44874496
/**
@@ -6324,7 +6333,7 @@ function shareRoomMeetingURL(checkScreen = false) {
63246333
* https://github.com/neocotic/qrious
63256334
*/
63266335
function makeRoomQR() {
6327-
let qr = new QRious({
6336+
const qr = new QRious({
63286337
element: getId('qrRoom'),
63296338
value: window.location.href,
63306339
});
@@ -6333,6 +6342,19 @@ function makeRoomQR() {
63336342
});
63346343
}
63356344

6345+
/**
6346+
* Make Room Popup QR
6347+
*/
6348+
function makeRoomPopupQR() {
6349+
const qr = new QRious({
6350+
element: document.getElementById('qrRoomPopup'),
6351+
value: window.location.href,
6352+
});
6353+
qr.set({
6354+
size: 256,
6355+
});
6356+
}
6357+
63366358
/**
63376359
* Copy Room URL to clipboard
63386360
*/
@@ -11055,7 +11077,7 @@ function showAbout() {
1105511077
Swal.fire({
1105611078
background: swBg,
1105711079
position: 'center',
11058-
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.4.97',
11080+
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.4.98',
1105911081
imageUrl: brand.about?.imageUrl && brand.about.imageUrl.trim() !== '' ? brand.about.imageUrl : images.about,
1106011082
customClass: { image: 'img-about' },
1106111083
html: `

public/views/client.html

+7
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ <h1>Loading</h1>
9494
</pre>
9595
</div>
9696

97+
<!-- Scan to Join -->
98+
99+
<div id="qrRoomPopupContainer" class="top-center fadein">
100+
<canvas id="qrRoomPopup"></canvas>
101+
<div id="qrText">Scan to join the room</div>
102+
</div>
103+
97104
<!-- init user devices -->
98105

99106
<div id="initUser" class="init-user hidden">

0 commit comments

Comments
 (0)