Skip to content

armgit / meet

Public Imported from GitHub
0

Open source video conferencing app powered by LiveKit. Built with Django and React.

🚸(frontend) disable toast notifications on mobile

lebaudantoine7edf7d194b55
diff --git a/src/frontend/src/features/notifications/MainNotificationToast.tsx b/src/frontend/src/features/notifications/MainNotificationToast.tsx
index ead9ada0..e04ab46d 100644
--- a/src/frontend/src/features/notifications/MainNotificationToast.tsx
+++ b/src/frontend/src/features/notifications/MainNotificationToast.tsx
@@ -4,12 +4,15 @@ import { Participant, RemoteParticipant, RoomEvent } from 'livekit-client'
import { ToastProvider, toastQueue } from './components/ToastProvider'
import { NotificationType } from './NotificationType'
import { Div } from '@/primitives'
+import { isMobileBrowser } from '@livekit/components-core/src/helper/detectMobileBrowser.ts'
export const MainNotificationToast = () => {
const room = useRoomContext()
- // fixme - don't show toast on mobile screen
useEffect(() => {
const showJoinNotification = (participant: Participant) => {
+ if (isMobileBrowser()) {
+ return
+ }
toastQueue.add(
{
participant,
@@ -54,6 +57,9 @@ export const MainNotificationToast = () => {
if (!participant) {
return
}
+ if (isMobileBrowser()) {
+ return
+ }
const notification = decoder.decode(payload)
const existingToast = toastQueue.visibleToasts.find(
(toast) =>