UNPKG

@livekit/components-core

Version:

This package is a wrapper around the [livekit/client-sdk-js](https://github.com/livekit/client-sdk-js) package. It transforms the event based logic into simple to use observable state and component level APIs. This package is the core for all framework sp

20 lines (18 loc) 564 B
/** * @internal */ export function isWeb(): boolean { return typeof document !== 'undefined'; } /** * Mobile browser detection based on `navigator.userAgent` string. * Defaults to returning `false` if not in a browser. * * @remarks * This should only be used if feature detection or other methods do not work! * * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#mobile_device_detection */ export function isMobileBrowser(): boolean { return isWeb() ? /Mobi/i.test(window.navigator.userAgent) : false; }