diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-05-23 17:51:03 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-05-23 18:42:13 +0300 |
commit | 9a59215f9e7fca3ef940133824afc4aed04815f9 (patch) | |
tree | 7c276070de23440484781873a1c861efdc2ce609 /localwebsite/htdocs/assets | |
parent | 503d6350921f161b258f41cea4d0ebd0b5e795fc (diff) |
localwebsite: cams: debug video events, support iOS
Diffstat (limited to 'localwebsite/htdocs/assets')
-rw-r--r-- | localwebsite/htdocs/assets/app.js | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/localwebsite/htdocs/assets/app.js b/localwebsite/htdocs/assets/app.js index da5052d..c08490f 100644 --- a/localwebsite/htdocs/assets/app.js +++ b/localwebsite/htdocs/assets/app.js @@ -41,4 +41,22 @@ function extend(a, b) { function ge(id) { return document.getElementById(id); -}
\ No newline at end of file +} + +(function() { + var ua = navigator.userAgent.toLowerCase(); + window.browserInfo = { + version: (ua.match(/.+(?:me|ox|on|rv|it|ra|ie)[\/: ]([\d.]+)/) || [0,'0'])[1], + //opera: /opera/i.test(ua), + msie: (/msie/i.test(ua) && !/opera/i.test(ua)) || /trident/i.test(ua), + mozilla: /firefox/i.test(ua), + android: /android/i.test(ua), + mac: /mac/i.test(ua), + samsungBrowser: /samsungbrowser/i.test(ua), + chrome: /chrome/i.test(ua), + safari: /safari/i.test(ua), + mobile: /iphone|ipod|ipad|opera mini|opera mobi|iemobile|android/i.test(ua), + operaMini: /opera mini/i.test(ua), + ios: /iphone|ipod|ipad|watchos/i.test(ua) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1), + }; +})(); |