mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 19:03:46 +02:00
+13
-2
@@ -679,7 +679,15 @@ export const isWebKit = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This even returns true for WebKit-wrapping browsers such as Chrome on iOS
|
// This even returns true for WebKit-wrapping browsers such as Chrome on iOS
|
||||||
return isWebKitCache = !!(typeof navigator !== 'undefined' && navigator.vendor?.match(/apple/i));
|
return isWebKitCache = !!(
|
||||||
|
typeof navigator !== 'undefined'
|
||||||
|
&& (
|
||||||
|
navigator.vendor?.match(/apple/i)
|
||||||
|
// Or, in workers:
|
||||||
|
|| (/AppleWebKit/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent))
|
||||||
|
|| /\b(iPad|iPhone|iPod)\b/.test(navigator.userAgent)
|
||||||
|
)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
let isFirefoxCache: boolean | null = null;
|
let isFirefoxCache: boolean | null = null;
|
||||||
@@ -697,7 +705,10 @@ export const isChromium = () => {
|
|||||||
return isChromiumCache;
|
return isChromiumCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
return isChromiumCache = !!(typeof navigator !== 'undefined' && navigator.vendor?.includes('Google Inc'));
|
return isChromiumCache = !!(
|
||||||
|
typeof navigator !== 'undefined'
|
||||||
|
&& (navigator.vendor?.includes('Google Inc') || /Chrome/.test(navigator.userAgent))
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
let chromiumVersionCache: number | null = null;
|
let chromiumVersionCache: number | null = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user