Compare commits
2 Commits
269f66fdc5
...
2b9e28ee4a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b9e28ee4a | ||
|
|
d2a506119c |
@@ -13,9 +13,7 @@ export function MessageReplyMessages(props: AttachmentProps) {
|
|||||||
('showAlertInReplyMessages', true);
|
('showAlertInReplyMessages', true);
|
||||||
const [bgInReplyMessages] = useSetting<string>
|
const [bgInReplyMessages] = useSetting<string>
|
||||||
('bgInReplyMessages', '');
|
('bgInReplyMessages', '');
|
||||||
const reply = JSON.parse(props.attachment.blob);
|
const reply = JSON.parse(props.attachment.blob) as MessageReply[];
|
||||||
|
|
||||||
console.info("Mreply", reply);
|
|
||||||
|
|
||||||
const closeAlert = () => {
|
const closeAlert = () => {
|
||||||
modals.openConfirmModal({
|
modals.openConfirmModal({
|
||||||
|
|||||||
@@ -323,6 +323,13 @@ export function CallProvider(props : CallProviderProps) {
|
|||||||
peerConnectionRef.current.onconnectionstatechange = () => {
|
peerConnectionRef.current.onconnectionstatechange = () => {
|
||||||
console.info("Peer connection state changed: " + peerConnectionRef.current?.connectionState);
|
console.info("Peer connection state changed: " + peerConnectionRef.current?.connectionState);
|
||||||
if(peerConnectionRef.current?.connectionState == "connected"){
|
if(peerConnectionRef.current?.connectionState == "connected"){
|
||||||
|
/**
|
||||||
|
* WebRTC соединение установлено, звонок активен, останавливаем все остальные звуки
|
||||||
|
* системы
|
||||||
|
*/
|
||||||
|
stopLoopSound();
|
||||||
|
stopSound();
|
||||||
|
|
||||||
setCallState(CallState.ACTIVE);
|
setCallState(CallState.ACTIVE);
|
||||||
info("WebRTC connection established, call is active");
|
info("WebRTC connection established, call is active");
|
||||||
}
|
}
|
||||||
@@ -432,8 +439,13 @@ export function CallProvider(props : CallProviderProps) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const end = () => {
|
const end = () => {
|
||||||
stopLoopSound();
|
if(callState == CallState.ACTIVE){
|
||||||
stopSound();
|
/**
|
||||||
|
* Только если звонок был активен воспроизводим звуки
|
||||||
|
*/
|
||||||
|
stopLoopSound();
|
||||||
|
stopSound();
|
||||||
|
}
|
||||||
if (remoteAudioRef.current) {
|
if (remoteAudioRef.current) {
|
||||||
remoteAudioRef.current.pause();
|
remoteAudioRef.current.pause();
|
||||||
remoteAudioRef.current.srcObject = null;
|
remoteAudioRef.current.srcObject = null;
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ export function useReplyMessages() {
|
|||||||
*/
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
replyMessages.messages.push(message);
|
||||||
const sortedByTime = replyMessages.messages.sort((a, b) => a.timestamp - b.timestamp);
|
const sortedByTime = replyMessages.messages.sort((a, b) => a.timestamp - b.timestamp);
|
||||||
setReplyMessages({
|
setReplyMessages({
|
||||||
publicKey: dialog,
|
publicKey: dialog,
|
||||||
|
|||||||
Reference in New Issue
Block a user