Browse Source

feat: add ipados to list of Platform.OS (#8205)

* feat: add ipados list of Platform.OS
master
Marc Seitz 4 years ago
parent
commit
16d88a288f
No account linked to committer's email address
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      react/features/base/react/Platform.web.js

+ 2
- 2
react/features/base/react/Platform.web.js View File

@@ -1,11 +1,11 @@
1 1
 /* @flow */
2 2
 
3
-const { userAgent } = navigator;
3
+const { userAgent, maxTouchPoints, platform } = navigator;
4 4
 let OS;
5 5
 
6 6
 if (userAgent.match(/Android/i)) {
7 7
     OS = 'android';
8
-} else if (userAgent.match(/iP(ad|hone|od)/i)) {
8
+} else if (userAgent.match(/iP(ad|hone|od)/i) || (maxTouchPoints && maxTouchPoints > 2 && /MacIntel/.test(platform))) {
9 9
     OS = 'ios';
10 10
 } else if (userAgent.match(/Mac(intosh| OS X)/i)) {
11 11
     OS = 'macos';

Loading…
Cancel
Save