Lint
This commit is contained in:
parent
cb85733426
commit
456194312b
2 changed files with 13 additions and 8 deletions
|
|
@ -14,7 +14,11 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { DEFAULT_CONFIG, ConfigOptions, ResolvedConfigOptions } from "./ConfigOptions";
|
import {
|
||||||
|
DEFAULT_CONFIG,
|
||||||
|
ConfigOptions,
|
||||||
|
ResolvedConfigOptions,
|
||||||
|
} from "./ConfigOptions";
|
||||||
|
|
||||||
export class Config {
|
export class Config {
|
||||||
private static internalInstance: Config;
|
private static internalInstance: Config;
|
||||||
|
|
|
||||||
|
|
@ -298,10 +298,13 @@ export function useGroupCall(groupCall: GroupCall): UseGroupCallReturnType {
|
||||||
PosthogAnalytics.instance.eventMuteCamera.track(toggleToMute);
|
PosthogAnalytics.instance.eventMuteCamera.track(toggleToMute);
|
||||||
}, [groupCall]);
|
}, [groupCall]);
|
||||||
|
|
||||||
const setMicrophoneMuted = useCallback((setMuted) => {
|
const setMicrophoneMuted = useCallback(
|
||||||
groupCall.setMicrophoneMuted(setMuted);
|
(setMuted) => {
|
||||||
PosthogAnalytics.instance.eventMuteMicrophone.track(setMuted);
|
groupCall.setMicrophoneMuted(setMuted);
|
||||||
}, [groupCall]);
|
PosthogAnalytics.instance.eventMuteMicrophone.track(setMuted);
|
||||||
|
},
|
||||||
|
[groupCall]
|
||||||
|
);
|
||||||
|
|
||||||
const toggleMicrophoneMuted = useCallback(() => {
|
const toggleMicrophoneMuted = useCallback(() => {
|
||||||
const toggleToMute = !groupCall.isMicrophoneMuted();
|
const toggleToMute = !groupCall.isMicrophoneMuted();
|
||||||
|
|
@ -399,7 +402,6 @@ export function useGroupCall(groupCall: GroupCall): UseGroupCallReturnType {
|
||||||
}
|
}
|
||||||
}, [t]);
|
}, [t]);
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const keyDownListener = (event) => {
|
const keyDownListener = (event) => {
|
||||||
if (event.key === "m") {
|
if (event.key === "m") {
|
||||||
|
|
@ -422,10 +424,9 @@ export function useGroupCall(groupCall: GroupCall): UseGroupCallReturnType {
|
||||||
return () => {
|
return () => {
|
||||||
window.removeEventListener("keydown", keyDownListener, true);
|
window.removeEventListener("keydown", keyDownListener, true);
|
||||||
window.removeEventListener("keyup", keyUpListener, true);
|
window.removeEventListener("keyup", keyUpListener, true);
|
||||||
}
|
};
|
||||||
}, [toggleMicrophoneMuted, setMicrophoneMuted]);
|
}, [toggleMicrophoneMuted, setMicrophoneMuted]);
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
state,
|
state,
|
||||||
calls,
|
calls,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue