Mobile checker for browsers. This library allows you to detect browsers running on android and ios mobile devices. Also, this tool allows you to identify if the mobile browser supports html media capture instructions (also can be used as a good practical way to know if it's not a mobile device).
Install browser-mobile-checker through NPM:
npm install @fidtech-sa/browser-mobile-checker
Javascript:
const mobileChecker = require('browser-mobile-checker');
const isMobile = mobileChecker.isMobileDevice();
const supportedMediaCapture = mobileChecker.supportsHtmlCapture();
console.log(isMobile);
console.log(supportedMediaCapture);
Typescript:
declare var require: any;
const mobileChecker = require('browser-mobile-checker');
const isMobile = mobileChecker.isMobileDevice();
const supportedMediaCapture = mobileChecker.supportsHtmlCapture();
console.log(isMobile);
console.log(supportedMediaCapture);
No dependencies, browser-mobile-checker just needs standard JavaScript environment.
Client-side. Standard browsers (Tested on Chrome, Safari, and Edge).
Just give us the details. Environment, code, input, output, etc.
This software is released under the MIT License, see LICENSE.txt.