mirror of
https://github.com/videojs/video.js.git
synced 2025-07-09 01:15:31 +02:00
@misteroneill updated source code for linter v5
This commit is contained in:
committed by
Gary Katsevman
parent
86068a5b45
commit
272d5eed83
@ -25,7 +25,7 @@ export const IS_IPOD = (/iPod/i).test(USER_AGENT);
|
||||
export const IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;
|
||||
|
||||
export const IOS_VERSION = (function() {
|
||||
let match = USER_AGENT.match(/OS (\d+)_/i);
|
||||
const match = USER_AGENT.match(/OS (\d+)_/i);
|
||||
|
||||
if (match && match[1]) {
|
||||
return match[1];
|
||||
@ -36,16 +36,14 @@ export const IS_ANDROID = (/Android/i).test(USER_AGENT);
|
||||
export const ANDROID_VERSION = (function() {
|
||||
// This matches Android Major.Minor.Patch versions
|
||||
// ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned
|
||||
let match = USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);
|
||||
let major;
|
||||
let minor;
|
||||
const match = USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);
|
||||
|
||||
if (!match) {
|
||||
return null;
|
||||
}
|
||||
|
||||
major = match[1] && parseFloat(match[1]);
|
||||
minor = match[2] && parseFloat(match[2]);
|
||||
const major = match[1] && parseFloat(match[1]);
|
||||
const minor = match[2] && parseFloat(match[2]);
|
||||
|
||||
if (major && minor) {
|
||||
return parseFloat(match[1] + '.' + match[2]);
|
||||
|
Reference in New Issue
Block a user