mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
Merge pull request #577 from dmitrylyzo/#572-ipadpro
Fix iOS platform detection #572
This commit is contained in:
commit
3283bf2393
@ -122,7 +122,8 @@ define([], function () {
|
||||
}
|
||||
|
||||
function iOSversion() {
|
||||
if (/iP(hone|od|ad)/.test(navigator.platform)) {
|
||||
// MacIntel: Apple iPad Pro 11 iOS 13.1
|
||||
if (/iP(hone|od|ad)|MacIntel/.test(navigator.platform)) {
|
||||
// supports iOS 2.0 and later: <http://bit.ly/TJjs1V>
|
||||
var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
|
||||
return [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];
|
||||
@ -301,8 +302,11 @@ define([], function () {
|
||||
|
||||
if (browser.iOS) {
|
||||
browser.iOSVersion = iOSversion();
|
||||
|
||||
if (browser.iOSVersion && browser.iOSVersion.length >= 2) {
|
||||
browser.iOSVersion = browser.iOSVersion[0] + (browser.iOSVersion[1] / 10);
|
||||
}
|
||||
}
|
||||
|
||||
browser.chromecast = browser.chrome && userAgent.toLowerCase().indexOf('crkey') !== -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user