]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/utils.ts
Add logic to handle playlist in embed
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / utils.ts
index a72bf0123d3a61025de01ba77caea6be98c5b72c..20d97c7e2182192be9a3b7f7f87a59ea5279717b 100644 (file)
@@ -1,4 +1,4 @@
-import { VideoFile } from '../../../../shared/models/videos'
+import { VideoFile } from '@shared/models'
 
 function toTitleCase (str: string) {
   return str.charAt(0).toUpperCase() + str.slice(1)
@@ -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 () {