소스 검색

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

* feat: add ipados list of Platform.OS
master
Marc Seitz 4 년 전
부모
커밋
16d88a288f
No account linked to committer's email address
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';

Loading…
취소
저장