Skip to content

Commit

Permalink
[mirotalkwebrtc] - refactoring, update dep
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpejic85 committed Jan 8, 2025
1 parent 652c352 commit 5504e33
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions frontend/html/client.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
src="https://cdnjs.cloudflare.com/ajax/libs/tippy.js/6.3.7/tippy-bundle.umd.min.js"
></script>

<script defer src="https://cdnjs.cloudflare.com/ajax/libs/UAParser.js/1.0.37/ua-parser.min.js"></script>

<script async src="../js/umami.js"></script>
<script defer src="../js/swal.js"></script>
<script defer src="../js/api.js"></script>
Expand Down
12 changes: 8 additions & 4 deletions frontend/js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@
* @license For private project or commercial purposes contact us at: [email protected] or purchase it directly via Code Canyon:
* @license https://codecanyon.net/item/a-selfhosted-mirotalks-webrtc-rooms-scheduler-server/42643313
* @author Miroslav Pejic - [email protected]
* @version 1.1.30
* @version 1.1.31
*/

const isMobile = !!/Android|webOS|iPhone|iPad|iPod|BB10|BlackBerry|IEMobile|Opera Mini|Mobile|mobile/i.test(
navigator.userAgent.toLowerCase() || '',
);
const userAgent = navigator.userAgent;
const parser = new UAParser(userAgent);
const result = parser.getResult();
const deviceType = result.device.type || 'desktop';
const isMobile = deviceType === 'mobile';

console.log('INFO', result);

const body = document.querySelector('body');
const modeToggle = body.querySelector('.mode-toggle');
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mirotalkwebrtc",
"version": "1.1.30",
"version": "1.1.31",
"description": "MiroTalk WebRTC admin",
"main": "server.js",
"scripts": {
Expand Down Expand Up @@ -33,7 +33,7 @@
"license": "AGPL-3.0",
"homepage": "https://github.com/miroslavpejic85/mirotalkwebrtc",
"dependencies": {
"@sentry/node": "^8.47.0",
"@sentry/node": "^8.48.0",
"axios": "^1.7.9",
"bcryptjs": "^2.4.3",
"colors": "1.4.0",
Expand Down

0 comments on commit 5504e33

Please sign in to comment.