diff --git a/src/config/Config.ts b/src/config/Config.ts index 42d9b1b1..2806a5b0 100644 --- a/src/config/Config.ts +++ b/src/config/Config.ts @@ -14,7 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { DEFAULT_CONFIG, ConfigOptions, ResolvedConfigOptions } from "./ConfigOptions"; +import { + DEFAULT_CONFIG, + ConfigOptions, + ResolvedConfigOptions, +} from "./ConfigOptions"; export class Config { private static internalInstance: Config; diff --git a/src/room/useGroupCall.ts b/src/room/useGroupCall.ts index cc39dd8e..8a6b6b56 100644 --- a/src/room/useGroupCall.ts +++ b/src/room/useGroupCall.ts @@ -298,10 +298,13 @@ export function useGroupCall(groupCall: GroupCall): UseGroupCallReturnType { PosthogAnalytics.instance.eventMuteCamera.track(toggleToMute); }, [groupCall]); - const setMicrophoneMuted = useCallback((setMuted) => { - groupCall.setMicrophoneMuted(setMuted); - PosthogAnalytics.instance.eventMuteMicrophone.track(setMuted); - }, [groupCall]); + const setMicrophoneMuted = useCallback( + (setMuted) => { + groupCall.setMicrophoneMuted(setMuted); + PosthogAnalytics.instance.eventMuteMicrophone.track(setMuted); + }, + [groupCall] + ); const toggleMicrophoneMuted = useCallback(() => { const toggleToMute = !groupCall.isMicrophoneMuted(); @@ -399,7 +402,6 @@ export function useGroupCall(groupCall: GroupCall): UseGroupCallReturnType { } }, [t]); - useEffect(() => { const keyDownListener = (event) => { if (event.key === "m") { @@ -422,10 +424,9 @@ export function useGroupCall(groupCall: GroupCall): UseGroupCallReturnType { return () => { window.removeEventListener("keydown", keyDownListener, true); window.removeEventListener("keyup", keyUpListener, true); - } + }; }, [toggleMicrophoneMuted, setMicrophoneMuted]); - return { state, calls,