From b6a8cfc5714c93d0ecf6154e5d3a25b33b50b8cd Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 31 Jul 2020 16:08:52 +0200 Subject: Detect ipad desktop as ios too --- client/src/assets/player/utils.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 () { } function isIOS () { - return !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform) + if (/iPad|iPhone|iPod/.test(navigator.platform)) { + return true + } + + // Detect iPad Desktop mode + return navigator.maxTouchPoints && + navigator.maxTouchPoints > 2 && + /MacIntel/.test(navigator.platform) } function isSafari () { -- cgit v1.2.3