[mirotalk] - improve geoLocation error handle, update dep

This commit is contained in:
Miroslav Pejic
2025-11-30 16:41:06 +01:00
parent 073c3b8c76
commit 053e201275
8 changed files with 29 additions and 18 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
# ====================================================
# MiroTalk P2P v.1.6.62 - Environment Configuration
# MiroTalk P2P v.1.6.63 - Environment Configuration
# ====================================================
# App environment
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* ==============================================
* MiroTalk P2P v.1.6.62 - Configuration File
* MiroTalk P2P v.1.6.63 - Configuration File
* ==============================================
*
* Branding and customizations require a license:
+1 -1
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.6.62
* @version 1.6.63
*
*/
+6 -6
View File
@@ -1,12 +1,12 @@
{
"name": "mirotalk",
"version": "1.6.62",
"version": "1.6.63",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "mirotalk",
"version": "1.6.62",
"version": "1.6.63",
"license": "AGPL-3.0",
"dependencies": {
"@mattermost/client": "11.1.0",
@@ -40,7 +40,7 @@
"mocha": "^11.7.5",
"node-fetch": "^3.3.2",
"nodemon": "^3.1.11",
"prettier": "3.7.2",
"prettier": "3.7.3",
"proxyquire": "^2.1.3",
"should": "^13.2.3",
"sinon": "^21.0.0"
@@ -5288,9 +5288,9 @@
}
},
"node_modules/prettier": {
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.2.tgz",
"integrity": "sha512-n3HV2J6QhItCXndGa3oMWvWFAgN1ibnS7R9mt6iokScBOC0Ul9/iZORmU2IWUMcyAQaMPjTlY3uT34TqocUxMA==",
"version": "3.7.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.3.tgz",
"integrity": "sha512-QgODejq9K3OzoBbuyobZlUhznP5SKwPqp+6Q6xw6o8gnhr4O85L2U915iM2IDcfF2NPXVaM9zlo9tdwipnYwzg==",
"dev": true,
"license": "MIT",
"bin": {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "mirotalk",
"version": "1.6.62",
"version": "1.6.63",
"description": "A free WebRTC browser-based video call",
"main": "server.js",
"scripts": {
@@ -72,7 +72,7 @@
"mocha": "^11.7.5",
"node-fetch": "^3.3.2",
"nodemon": "^3.1.11",
"prettier": "3.7.2",
"prettier": "3.7.3",
"proxyquire": "^2.1.3",
"should": "^13.2.3",
"sinon": "^21.0.0"
+1 -1
View File
@@ -77,7 +77,7 @@ let brand = {
},
about: {
imageUrl: '../images/mirotalk-logo.gif',
title: 'WebRTC P2P v1.6.62',
title: 'WebRTC P2P v1.6.63',
html: `
<button
id="support-button"
+2 -2
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.6.62
* @version 1.6.63
*
*/
@@ -12648,7 +12648,7 @@ function showAbout() {
Swal.fire({
background: swBg,
position: 'center',
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.6.62',
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.6.63',
imageUrl: brand.about?.imageUrl && brand.about.imageUrl.trim() !== '' ? brand.about.imageUrl : images.about,
customClass: { image: 'img-about' },
html: `
+15 -4
View File
@@ -283,7 +283,8 @@ class PeerGeoLocation {
* @param {string} request_id
*/
handleGeoLocationError(requester_peer_id, error, request_id) {
console.error('GeoLocation Error:', error);
// Enhanced error logging for debugging
console.error('GeoLocation Error:', error, JSON.stringify(error, Object.getOwnPropertyNames(error)));
if (this._geoResponded[request_id]) return;
this._geoResponded[request_id] = true;
setTimeout(() => {
@@ -301,17 +302,27 @@ class PeerGeoLocation {
geoError = 'The request to get user location timed out';
break;
case error.UNKNOWN_ERROR:
geoError = 'An unknown error occurred';
geoError = 'An unknown error occurred while retrieving your location';
break;
case 'NOT_SUPPORTED':
geoError = 'Geolocation is not supported by this browser';
break;
default:
geoError = 'Geolocation error';
geoError =
'Unable to retrieve your location. Please ensure location services are enabled in your device and browser settings, and try again';
break;
}
// Add suggestion for unknown errors
if (
error.code === error.UNKNOWN_ERROR ||
error.code === undefined ||
geoError.startsWith('Unable to retrieve')
) {
geoError +=
' If the problem persists, check your device and browser location permissions, and ensure you have a clear view of the sky (for GPS)';
}
this.sendPeerGeoLocation(requester_peer_id, 'geoLocationKO', null, geoError, request_id);
this.msgPopup('warning', geoError, 'top-end', 5000);
this.msgPopup('warning', geoError, 'top-end', 8000);
}
/**