diff --git a/frontend/src/components/room/RoomStage.tsx b/frontend/src/components/room/RoomStage.tsx index ed439b2..61a1e63 100644 --- a/frontend/src/components/room/RoomStage.tsx +++ b/frontend/src/components/room/RoomStage.tsx @@ -4,7 +4,6 @@ import { Track, type Participant } from 'livekit-client' import { CarouselLayout, FocusLayoutContainer, - RoomAudioRenderer, isTrackReference, useRoomContext, useSpeakingParticipants, @@ -400,7 +399,6 @@ export function RoomStage({
{focusTrack && } -
) } @@ -496,7 +494,6 @@ export function RoomStage({ Показать остальных ({sideTracks.length}) )} - ) } diff --git a/frontend/src/pages/RoomPage.tsx b/frontend/src/pages/RoomPage.tsx index ae002d8..f3e9269 100644 --- a/frontend/src/pages/RoomPage.tsx +++ b/frontend/src/pages/RoomPage.tsx @@ -2,7 +2,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { createPortal } from 'react-dom' import { useLocation, useNavigate, useParams } from 'react-router-dom' import { PictureInPicture2 } from 'lucide-react' -import { LiveKitRoom, usePersistentUserChoices } from '@livekit/components-react' +import { LiveKitRoom, RoomAudioRenderer, usePersistentUserChoices } from '@livekit/components-react' import type { RoomOptions } from 'livekit-client' import '@livekit/components-styles' import '@/styles/room.css' @@ -285,6 +285,21 @@ export function RoomPage() { options={roomOptions} onDisconnected={handleDisconnected} > + {/* Звук комнаты рендерится ЗДЕСЬ, а не внутри `RoomStage`, и ровно + одним экземпляром на всю страницу. `RoomAudioRenderer` — это набор + скрытых `