LiveKit Device Usage Refactoring (#1120)

Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Timo K <toger5@hotmail.de>
This commit is contained in:
Daniel Abramov
2023-06-16 18:07:13 +02:00
committed by GitHub
parent 4342f4b027
commit 5b4787cef6
12 changed files with 278 additions and 503 deletions

View File

@@ -22,17 +22,11 @@ import { useProfile } from "./profile/useProfile";
import { useModalTriggerState } from "./Modal";
import { SettingsModal } from "./settings/SettingsModal";
import { UserMenu } from "./UserMenu";
import { MediaDevicesState } from "./settings/mediaDevices";
interface Props {
preventNavigation?: boolean;
}
const mediaDevicesStub: MediaDevicesState = {
state: new Map(),
selectActiveDevice: () => Promise.resolve(),
};
export function UserMenuContainer({ preventNavigation = false }: Props) {
const location = useLocation();
const history = useHistory();
@@ -81,9 +75,6 @@ export function UserMenuContainer({ preventNavigation = false }: Props) {
<SettingsModal
client={client}
defaultTab={defaultSettingsTab}
// TODO Replace this with real media devices, while making sure this
// doesn't cause unnecessary device permission pop-ups
mediaDevices={mediaDevicesStub}
{...modalProps}
/>
)}