added http service to prometheus, fixes sound Bug
This commit is contained in:
@@ -39,6 +39,7 @@ export const Audio = () => {
|
||||
removeMessage,
|
||||
} = useAudioStore();
|
||||
const [selectedRoom, setSelectedRoom] = useState<string>("LST_01");
|
||||
|
||||
useSounds({
|
||||
isReceiving: speakingParticipants.length > 0,
|
||||
isTransmitting: isTalking,
|
||||
|
||||
@@ -27,7 +27,7 @@ export const useSounds = ({
|
||||
useEffect(() => {
|
||||
if (!window) return;
|
||||
connectionStart.current = new Audio("/sounds/connection_started_sepura.mp3");
|
||||
connectionEnd.current = new Audio("/sounds/connection_stoped_sepura.mp3");
|
||||
connectionEnd.current = new Audio("/sounds/connection_stopped_sepura.mp3");
|
||||
ownCallStarted.current = new Audio("/sounds/call_end_sepura.wav");
|
||||
foreignCallStop.current = new Audio("/sounds/call_end_sepura.wav");
|
||||
foreignCallBlocked.current = new Audio("/sounds/call_blocked_sepura.wav");
|
||||
|
||||
@@ -251,10 +251,16 @@ export const useAudioStore = create<TalkState>((set, get) => ({
|
||||
);
|
||||
});
|
||||
|
||||
set({
|
||||
remoteParticipants: room.numParticipants === 0 ? 0 : room.numParticipants - 1, // Unreliable and delayed
|
||||
speakingParticipants,
|
||||
});
|
||||
if (oldSpeakingParticipants.length !== speakingParticipants.length) {
|
||||
set({
|
||||
remoteParticipants: room.numParticipants === 0 ? 0 : room.numParticipants - 1, // Unreliable and delayed
|
||||
speakingParticipants,
|
||||
});
|
||||
} else {
|
||||
set({
|
||||
remoteParticipants: room.numParticipants === 0 ? 0 : room.numParticipants - 1, // Unreliable and delayed
|
||||
});
|
||||
}
|
||||
}, 500);
|
||||
} catch (error: Error | unknown) {
|
||||
console.error("Error occured: ", error);
|
||||
|
||||
Reference in New Issue
Block a user