From 3db5d43493eda846252733eebf5e73f414e8760d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=91=D0=B0=D0=B1?= =?UTF-8?q?=D1=83=D1=88=D0=BA=D0=B8=D0=BD?= Date: Thu, 20 Feb 2025 18:35:34 +0100 Subject: [PATCH] resolved conflicts --- .../Assist/ChatWindow/ChatWindow.tsx | 1 + .../AssistActions/AssistActions.tsx | 5 + .../VideoContainer/VideoContainer.tsx | 4 +- .../app/player/web/assist/AssistManager.ts | 2 +- frontend/app/player/web/assist/Call.ts | 105 +- .../app/player/web/assist/CanvasReceiver.ts | 46 +- tracker/tracker-assist/layout/index-chat.html | 933 ++++++++++-------- tracker/tracker-assist/layout/index.html | 5 +- tracker/tracker-assist/src/Assist.ts | 272 +++-- 9 files changed, 775 insertions(+), 598 deletions(-) diff --git a/frontend/app/components/Assist/ChatWindow/ChatWindow.tsx b/frontend/app/components/Assist/ChatWindow/ChatWindow.tsx index 29e4826cc..70272c9f1 100644 --- a/frontend/app/components/Assist/ChatWindow/ChatWindow.tsx +++ b/frontend/app/components/Assist/ChatWindow/ChatWindow.tsx @@ -62,6 +62,7 @@ function ChatWindow({ userId, incomeStream, localStream, endCall, isPrestart }: stream={localStream ? localStream.stream : null} muted height={anyRemoteEnabled ? 50 : 'unset'} + local /> diff --git a/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx b/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx index 80a49bedd..99b976556 100644 --- a/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx +++ b/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx @@ -142,6 +142,10 @@ function AssistActions({ }); }; + const removeIncomeStream = () => { + setIncomeStream([]); + }; + function call(additionalAgentIds?: string[]) { RequestLocalStream() .then((lStream) => { @@ -153,6 +157,7 @@ function AssistActions({ () => { player.assistManager.ping(AssistActionsPing.call.end, agentId) lStream.stop.bind(lStream); + removeIncomeStream(lStream.stream); }, onReject, onError diff --git a/frontend/app/components/Assist/components/VideoContainer/VideoContainer.tsx b/frontend/app/components/Assist/components/VideoContainer/VideoContainer.tsx index 97b8c9f9e..303d98eae 100644 --- a/frontend/app/components/Assist/components/VideoContainer/VideoContainer.tsx +++ b/frontend/app/components/Assist/components/VideoContainer/VideoContainer.tsx @@ -5,9 +5,10 @@ interface Props { muted?: boolean; height?: number | string; setRemoteEnabled?: (isEnabled: boolean) => void; + local?: boolean; } -function VideoContainer({ stream, muted = false, height = 280, setRemoteEnabled }: Props) { +function VideoContainer({ stream, muted = false, height = 280, setRemoteEnabled, local }: Props) { const ref = useRef(null); const [isEnabled, setEnabled] = React.useState(false); @@ -47,6 +48,7 @@ function VideoContainer({ stream, muted = false, height = 280, setRemoteEnabled width: isEnabled ? undefined : '0px!important', height: isEnabled ? undefined : '0px!important', border: '1px solid grey', + transform: local ? 'scaleX(-1)' : undefined, }} >