Force software decoding in Chromium for interlaced AVC

This commit is contained in:
Vanilagy
2025-11-12 14:29:56 +01:00
parent 3cb6ed82ce
commit 07b2e70863
3 changed files with 246 additions and 53 deletions
+10 -4
View File
@@ -665,10 +665,7 @@ export const isWebKit = () => {
}
// This even returns true for WebKit-wrapping browsers such as Chrome on iOS
const result = !!(typeof navigator !== 'undefined' && navigator.vendor?.match(/apple/i));
isWebKitCache = result;
return result;
return isWebKitCache = !!(typeof navigator !== 'undefined' && navigator.vendor?.match(/apple/i));
};
let isFirefoxCache: boolean | null = null;
@@ -680,6 +677,15 @@ export const isFirefox = () => {
return isFirefoxCache = typeof navigator !== 'undefined' && navigator.userAgent?.includes('Firefox');
};
let isChromiumCache: boolean | null = null;
export const isChromium = () => {
if (isChromiumCache !== null) {
return isChromiumCache;
}
return isChromiumCache = !!(typeof navigator !== 'undefined' && navigator.vendor?.includes('Google Inc'));
};
/**
* T or a promise that resolves to T.
* @group Miscellaneous