Files
jitsi-meet/react/features/base/react/Platform.web.js
Lyubo Marinov 0ed85b9d25 Replace features/unsupported-browser SET_UNSUPPORTED_BROWSER with features/base/lib-jitsi-meet SET_WEBRTC_READY
The error raised by JitsiMeetJS.init() is already in the state of
features/base/lib-jitsi-meet so it's not a good design to store the same
error in the state of features/unsupported-browser.
2017-02-28 00:18:51 -06:00

27 lines
536 B
JavaScript

/* @flow */
const userAgent = navigator.userAgent;
let OS;
if (userAgent.match(/Android/i)) {
OS = 'android';
} else if (userAgent.match(/iP(ad|hone|od)/i)) {
OS = 'ios';
} else if (userAgent.match(/Mac(intosh| OS X)/i)) {
OS = 'macos';
} else if (userAgent.match(/Windows/i)) {
OS = 'windows';
}
/**
* Provides a minimal equivalent of react-native's Platform abstraction.
*/
export default {
/**
* The operating system on which the application is executing.
*
* @type {string}
*/
OS
};