feat: video format restrictions

This commit is contained in:
ner committed 2025-08-15 18:42:49 +03:00
1 parent 82c14c1d5c
commit 6fc34e3797
7 files changed
+76 -52

No files matched your search

+9
View File
@@ -42,3 +42,12 @@ export const formatBytes = (bytes?: number) => {
return `${v.toFixed(v < 10 && i > 0 ? 1 : 0)} ${units[i]}`;
};
export const detectSafari = () => {
const ua = navigator.userAgent;
const isSafari = ua.includes('Safari') && !ua.includes('Chrome') && !ua.includes('CriOS') && !ua.includes('FxiOS');
const isIOS = /iPad|iPhone|iPod/.test(ua) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
return { isSafari, isIOS };
};