新增媒体服务器深度链接功能

This commit is contained in:
jxxghp
2025-07-12 13:47:00 +08:00
parent 3cce92e83d
commit 60385715e6
10 changed files with 547 additions and 10 deletions
+12
View File
@@ -84,3 +84,15 @@ export const isMobileDevice = (): boolean => {
return mobileRegex.test(userAgent) || hasTouchScreen || isMobileSize
}
// 检测是否为iOS设备
export const isIOSDevice = (): boolean => {
const userAgent = navigator.userAgent.toLowerCase()
return /iphone|ipad|ipod/.test(userAgent) && !(window as any).MSStream
}
// 检测是否为Android设备
export const isAndroidDevice = (): boolean => {
const userAgent = navigator.userAgent.toLowerCase()
return /android/.test(userAgent)
}