Nachalarmieren select
Alarmieren aus Einsatz erstellen Maske Map-Tiles SDS sound: Status J SDS Nachricht: public-User Audio: Es kann nur ein Nutzer gleichzeitig Funken Select in Report und Chat: default value -> OnChange
This commit is contained in:
@@ -27,6 +27,7 @@ export const Audio = () => {
|
||||
speakingParticipants,
|
||||
isTalking,
|
||||
toggleTalking,
|
||||
transmitBlocked,
|
||||
connect,
|
||||
state,
|
||||
connectionQuality,
|
||||
@@ -41,6 +42,7 @@ export const Audio = () => {
|
||||
isReceiving: speakingParticipants.length > 0,
|
||||
isTransmitting: isTalking,
|
||||
unpausedTracks: speakingParticipants,
|
||||
transmitBlocked,
|
||||
});
|
||||
|
||||
const { selectedStation, status: pilotState } = usePilotConnectionStore((state) => state);
|
||||
@@ -154,6 +156,7 @@ export const Audio = () => {
|
||||
"btn btn-sm btn-soft border-none hover:bg-inherit",
|
||||
!isTalking && "bg-transparent hover:bg-sky-400/20",
|
||||
isTalking && "bg-green-700 hover:bg-green-600",
|
||||
transmitBlocked && "bg-yellow-500 hover:bg-yellow-500",
|
||||
state === "disconnected" && "bg-red-500 hover:bg-red-500",
|
||||
state === "error" && "bg-red-500 hover:bg-red-500",
|
||||
state === "connecting" && "bg-yellow-500 hover:bg-yellow-500 cursor-default",
|
||||
|
||||
@@ -7,10 +7,12 @@ export const useSounds = ({
|
||||
isReceiving,
|
||||
isTransmitting,
|
||||
unpausedTracks,
|
||||
transmitBlocked,
|
||||
}: {
|
||||
isReceiving: boolean;
|
||||
isTransmitting: boolean;
|
||||
unpausedTracks: unknown[];
|
||||
transmitBlocked?: boolean;
|
||||
}) => {
|
||||
const { room } = useAudioStore();
|
||||
// Sounds as refs
|
||||
@@ -56,6 +58,17 @@ export const useSounds = ({
|
||||
}
|
||||
}, [isReceiving, isTransmitting, soundConnectionStarted]);
|
||||
|
||||
useEffect(() => {
|
||||
if (transmitBlocked && foreignCallBlocked.current) {
|
||||
foreignCallBlocked.current.volume = 0.2;
|
||||
foreignCallBlocked.current.currentTime = 0;
|
||||
foreignCallBlocked.current.loop = true;
|
||||
foreignCallBlocked.current.play().catch(() => {});
|
||||
} else if (foreignCallBlocked.current) {
|
||||
foreignCallBlocked.current.pause();
|
||||
}
|
||||
}, [transmitBlocked]);
|
||||
|
||||
useEffect(() => {
|
||||
if (isTransmitting && connectionStart.current!.paused) {
|
||||
ownCallStarted.current!.volume = 0.2;
|
||||
|
||||
Reference in New Issue
Block a user