infobip-rtc
Version:
Infobip RTC JavaScript SDK - Infobip WebRTC API Implementation
21 lines • 615 B
JavaScript
import Bowser from 'bowser';
export default class Browser {
constructor() {
this._browser = null;
}
browser() {
var _a;
return (_a = this._browser) !== null && _a !== void 0 ? _a : (this._browser = Bowser.getParser(window.navigator.userAgent));
}
isMobile() {
let deviceOsName = this.browser().getOSName(true);
return deviceOsName.includes("android") || deviceOsName.includes("ios");
}
getBrowser() {
return this.browser().getBrowser();
}
getOS() {
return this.browser().getOS();
}
}
//# sourceMappingURL=Browser.js.map