浏览代码

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

* feat: add ipados list of Platform.OS
master
Marc Seitz 4 年前
父节点
当前提交
16d88a288f
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      react/features/base/react/Platform.web.js

+ 2
- 2
react/features/base/react/Platform.web.js 查看文件

@@ -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';

正在加载...
取消
保存