[mirotalk] - allow join with /roomId, update dep
This commit is contained in:
+17
-4
@@ -39,7 +39,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.4.11
|
||||
* @version 1.4.12
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -209,8 +209,8 @@ if (turnServerEnabled && turnServerUrl && turnServerUsername && turnServerCreden
|
||||
}
|
||||
|
||||
// Test Stun and Turn connection with query params
|
||||
// const testStunTurn = host + '/test?iceServers=' + JSON.stringify(iceServers);
|
||||
const testStunTurn = host + '/test';
|
||||
// const testStunTurn = host + '/icetest?iceServers=' + JSON.stringify(iceServers);
|
||||
const testStunTurn = host + '/icetest';
|
||||
|
||||
// IP Lookup
|
||||
const IPLookupEnabled = getEnvBoolean(process.env.IP_LOOKUP_ENABLED);
|
||||
@@ -529,7 +529,7 @@ app.get(['/privacy'], (req, res) => {
|
||||
});
|
||||
|
||||
// test Stun and Turn connections
|
||||
app.get(['/test'], (req, res) => {
|
||||
app.get(['/icetest'], (req, res) => {
|
||||
if (Object.keys(req.query).length > 0) {
|
||||
log.debug('Request Query', req.query);
|
||||
}
|
||||
@@ -694,6 +694,19 @@ app.get('/brand', (req, res) => {
|
||||
res.status(200).json({ message: config && config.brand ? config.brand : false });
|
||||
});
|
||||
|
||||
// Join roomId redirect to /join?room=roomId
|
||||
app.get('/:roomId', (req, res) => {
|
||||
const { roomId } = checkXSS(req.params);
|
||||
|
||||
if (!roomId) {
|
||||
log.warn('/:roomId empty', roomId);
|
||||
return res.redirect('/');
|
||||
}
|
||||
|
||||
log.debug('Detected roomId --> redirect to /join?room=roomId');
|
||||
res.redirect(`/join?room=${roomId}`); // `/join/${roomId}`
|
||||
});
|
||||
|
||||
/**
|
||||
MiroTalk API v1
|
||||
For api docs we use: https://swagger.io/
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mirotalk",
|
||||
"version": "1.4.11",
|
||||
"version": "1.4.12",
|
||||
"description": "A free WebRTC browser-based video call",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
@@ -42,7 +42,7 @@
|
||||
"homepage": "https://github.com/miroslavpejic85/mirotalk",
|
||||
"dependencies": {
|
||||
"@mattermost/client": "^10.2.0",
|
||||
"@sentry/node": "^8.46.0",
|
||||
"@sentry/node": "^8.47.0",
|
||||
"axios": "^1.7.9",
|
||||
"colors": "^1.4.0",
|
||||
"compression": "^1.7.5",
|
||||
|
||||
+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.4.11
|
||||
* @version 1.4.12
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -10695,7 +10695,7 @@ function showAbout() {
|
||||
Swal.fire({
|
||||
background: swBg,
|
||||
position: 'center',
|
||||
title: '<strong>WebRTC P2P v1.4.11</strong>',
|
||||
title: '<strong>WebRTC P2P v1.4.12</strong>',
|
||||
imageAlt: 'mirotalk-about',
|
||||
imageUrl: images.about,
|
||||
customClass: { image: 'img-about' },
|
||||
|
||||
@@ -13,7 +13,7 @@ let iceServers = filterXSS(qs.get('iceServers'));
|
||||
if (iceServers) {
|
||||
iceServers = JSON.parse(iceServers);
|
||||
} else {
|
||||
// http://localhost:3000/test
|
||||
// http://localhost:3000/icetest
|
||||
iceServers = [
|
||||
// Test some STUN server
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user