Parcourir la source

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

* feat: add ipados list of Platform.OS
j8
Marc Seitz il y a 4 ans
Parent
révision
16d88a288f
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2
    2
      react/features/base/react/Platform.web.js

+ 2
- 2
react/features/base/react/Platform.web.js Voir le fichier

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

Chargement…
Annuler
Enregistrer