mirror of https://github.com/jitsi/jitsi-meet
parent
28b44cf67c
commit
5f21e4c5b6
@ -0,0 +1,4 @@ |
|||||||
|
// Re-export react-native's Platform because we want to provide a minimal
|
||||||
|
// equivalent on Web.
|
||||||
|
import { Platform } from 'react-native'; |
||||||
|
export default Platform; |
@ -0,0 +1,20 @@ |
|||||||
|
const userAgent = navigator.userAgent; |
||||||
|
let OS; |
||||||
|
|
||||||
|
if (userAgent.match(/Android/i)) { |
||||||
|
OS = 'android'; |
||||||
|
} else if (userAgent.match(/iP(ad|hone|od)/i)) { |
||||||
|
OS = 'ios'; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Provides a minimal equivalent of react-native's Platform abstraction. |
||||||
|
*/ |
||||||
|
export default { |
||||||
|
/** |
||||||
|
* The operating system on which the application is executing. |
||||||
|
* |
||||||
|
* @type {string} |
||||||
|
*/ |
||||||
|
OS |
||||||
|
}; |
@ -1,3 +1,4 @@ |
|||||||
export * from './components'; |
export * from './components'; |
||||||
export * from './functions'; |
export * from './functions'; |
||||||
|
export { default as Platform } from './Platform'; |
||||||
export { default as Symbol } from './Symbol'; |
export { default as Symbol } from './Symbol'; |
||||||
|
Loading…
Reference in new issue