cf7d8890c1
* Add link to components to README * use components meet version * update readme * fix index styles * update components * update components * update components
22 lines
480 B
TypeScript
22 lines
480 B
TypeScript
import * as React from 'react';
|
|
import { useRoomContext } from '@livekit/components-react';
|
|
import { setLogLevel } from 'livekit-client';
|
|
|
|
export const useDebugMode = () => {
|
|
setLogLevel('debug');
|
|
const room = useRoomContext();
|
|
React.useEffect(() => {
|
|
// @ts-expect-error
|
|
window.__lk_room = room;
|
|
|
|
return () => {
|
|
// @ts-expect-error
|
|
window.__lk_room = undefined;
|
|
};
|
|
});
|
|
};
|
|
|
|
export const DebugMode = () => {
|
|
useDebugMode();
|
|
return <></>;
|
|
};
|