Skip to content

Commit

Permalink
Mic toggle SFX
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Jan 22, 2024
1 parent e9ac511 commit c3ed128
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/react-components/room/hooks/useMicrophoneStatus.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useState, useEffect, useCallback } from "react";
import { MediaDevices, MediaDevicesEvents } from "../../../utils/media-devices-utils";
import { SOUND_TOGGLE_MIC } from "../../../systems/sound-effects-system";

export function useMicrophoneStatus(scene) {
const mediaDevicesManager = APP.mediaDevicesManager;
Expand Down Expand Up @@ -45,7 +46,8 @@ export function useMicrophoneStatus(scene) {
} else {
mediaDevicesManager.startMicShare({ unmute: true });
}
}, [mediaDevicesManager]);
scene.systems["hubs-systems"].soundEffectsSystem.playSoundOneShot(SOUND_TOGGLE_MIC);
}, [mediaDevicesManager, scene]);

return {
isMicMuted,
Expand Down

0 comments on commit c3ed128

Please sign in to comment.