Skip to content

Commit

Permalink
🚸(frontend) avoid displaying the effects option when not optimal
Browse files Browse the repository at this point in the history
On unsupported browser showing this option whitout offering the
blur effects to the user would be quite frustrating.

At the moment, safari user cannot blur their background.

Also, avoid offering the option on mobile which are really
cpu-constrained devices.
  • Loading branch information
lebaudantoine committed Jan 31, 2025
1 parent 12e2149 commit bbc2b1d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/frontend/src/features/rooms/components/Join.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
} from '../livekit/components/effects/EffectsConfiguration'
import { usePersistentUserChoices } from '../livekit/hooks/usePersistentUserChoices'
import { BackgroundBlurFactory } from '../livekit/components/blur'
import { isMobileBrowser } from '@livekit/components-core'

const onError = (e: Error) => console.error('ERROR', e)

Expand All @@ -30,6 +31,10 @@ const Effects = ({
const [isDialogOpen, setIsDialogOpen] = useState(false)
const openDialog = () => setIsDialogOpen(true)

if (!BackgroundBlurFactory.isSupported() || isMobileBrowser()) {
return
}

return (
<>
<Dialog
Expand Down

0 comments on commit bbc2b1d

Please sign in to comment.