♻️(frontend) use LiveKit mobile detection in noise reduction hook
Replace custom mobile browser detection with livekit-client's built-in isMobile() function for consistency and better reliability.
This commit is contained in:
committed by
aleb_the_flash
parent
26045bbffa
commit
8929ec5714
@@ -1,13 +1,12 @@
|
||||
import { useIsMobile } from '@/utils/useIsMobile'
|
||||
import { useFeatureFlagEnabled } from 'posthog-js/react'
|
||||
import { FeatureFlags } from '@/features/analytics/enums'
|
||||
import { useIsAnalyticsEnabled } from '@/features/analytics/hooks/useIsAnalyticsEnabled'
|
||||
import { isMobileBrowser } from '@livekit/components-core'
|
||||
|
||||
export const useNoiseReductionAvailable = () => {
|
||||
const featureEnabled = useFeatureFlagEnabled(FeatureFlags.faceLandmarks)
|
||||
const isAnalyticsEnabled = useIsAnalyticsEnabled()
|
||||
|
||||
const isMobile = useIsMobile()
|
||||
|
||||
const isMobile = isMobileBrowser()
|
||||
return !isMobile && (!isAnalyticsEnabled || featureEnabled)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user