mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-02 14:21:01 +08:00
Fix PWA install detection on iOS with additional check for MSStream
Co-authored-by: jxxghp <jxxghp@163.com>
This commit is contained in:
@@ -86,7 +86,7 @@ export function usePWAInstall() {
|
||||
const isPWASupported = computed(() => {
|
||||
const hasServiceWorker = 'serviceWorker' in navigator
|
||||
const supportsInstallPromptEvent = 'onbeforeinstallprompt' in window
|
||||
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent)
|
||||
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !(window as any).MSStream
|
||||
|
||||
return hasServiceWorker && (supportsInstallPromptEvent || isIOS)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user