web: update ios safari version regex
Some checks are pending
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
Run tests / check lockfile correctness (push) Waiting to run
Run tests / web sanity check (push) Waiting to run
Run tests / api sanity check (push) Waiting to run

since ipados pretends to be macos, there's no "iphone os" in its user agent. this (hopefully) fixes remuxing/transcoding compatibility with old ipados versions
This commit is contained in:
wukko 2025-06-29 10:53:02 +06:00
parent 214af73a1e
commit aa49892e39
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ if (browser) {
const iPhone = ua.includes("iphone os"); const iPhone = ua.includes("iphone os");
const iPad = !iPhone && ua.includes("mac os") && navigator.maxTouchPoints > 0; const iPad = !iPhone && ua.includes("mac os") && navigator.maxTouchPoints > 0;
const iosVersion = Number(ua.match(/iphone os (\d+)_/)?.[1]); const iosVersion = Number(ua.match(/version\/(\d+)/)?.[1]);
const modernIOS = iPhone && iosVersion >= 18; const modernIOS = iPhone && iosVersion >= 18;
const iOS = iPhone || iPad; const iOS = iPhone || iPad;

View File

@ -9,7 +9,7 @@ const ua = navigator.userAgent.toLowerCase();
const iPhone = ua.includes("iphone os"); const iPhone = ua.includes("iphone os");
const iPad = !iPhone && ua.includes("mac os") && navigator.maxTouchPoints > 0; const iPad = !iPhone && ua.includes("mac os") && navigator.maxTouchPoints > 0;
const iOS = iPhone || iPad; const iOS = iPhone || iPad;
const modernIOS = iOS && Number(ua.match(/iphone os (\d+)_/)?.[1]) >= 18; const modernIOS = iOS && Number(ua.match(/version\/(\d+)/)?.[1]) >= 18;
export default class LibAVWrapper { export default class LibAVWrapper {
libav: Promise<LibAVInstance> | null; libav: Promise<LibAVInstance> | null;