diff options
author | Chocobozzz <me@florianbigard.com> | 2020-07-31 16:08:52 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-07-31 16:08:52 +0200 |
commit | b6a8cfc5714c93d0ecf6154e5d3a25b33b50b8cd (patch) | |
tree | 31631139f47970fc5e79a3bfd0bda12310ecd3ff /client/src/assets/player | |
parent | d45f3641d0f9bac0a4ab0f1d9c18aff04cfbd72f (diff) | |
download | PeerTube-b6a8cfc5714c93d0ecf6154e5d3a25b33b50b8cd.tar.gz PeerTube-b6a8cfc5714c93d0ecf6154e5d3a25b33b50b8cd.tar.zst PeerTube-b6a8cfc5714c93d0ecf6154e5d3a25b33b50b8cd.zip |
Detect ipad desktop as ios too
Diffstat (limited to 'client/src/assets/player')
-rw-r--r-- | client/src/assets/player/utils.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.ts index a72bf0123..81fe68951 100644 --- a/client/src/assets/player/utils.ts +++ b/client/src/assets/player/utils.ts | |||
@@ -9,7 +9,14 @@ function isWebRTCDisabled () { | |||
9 | } | 9 | } |
10 | 10 | ||
11 | function isIOS () { | 11 | function isIOS () { |
12 | return !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform) | 12 | if (/iPad|iPhone|iPod/.test(navigator.platform)) { |
13 | return true | ||
14 | } | ||
15 | |||
16 | // Detect iPad Desktop mode | ||
17 | return navigator.maxTouchPoints && | ||
18 | navigator.maxTouchPoints > 2 && | ||
19 | /MacIntel/.test(navigator.platform) | ||
13 | } | 20 | } |
14 | 21 | ||
15 | function isSafari () { | 22 | function isSafari () { |