-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mirotalkwebrtc] - refactoring, update dep
- Loading branch information
1 parent
652c352
commit 5504e33
Showing
3 changed files
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters