From 8df85441f7fb9392594235b1d266ef8bb4323056 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Fri, 5 Nov 2021 13:30:18 +1100 Subject: [PATCH] fix video stream not displaying in draggable container --- stylesheets/_modules.scss | 1 + .../session/calling/DraggableCallContainer.tsx | 13 +------------ ts/hooks/useModulo.ts | 1 - 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/stylesheets/_modules.scss b/stylesheets/_modules.scss index 739a12995..cda5a79b5 100644 --- a/stylesheets/_modules.scss +++ b/stylesheets/_modules.scss @@ -170,6 +170,7 @@ line-height: 16px; letter-spacing: 0.3px; margin-top: 3px; + white-space: nowrap; } .module-message__link-preview { diff --git a/ts/components/session/calling/DraggableCallContainer.tsx b/ts/components/session/calling/DraggableCallContainer.tsx index 0d2071f51..44bade08c 100644 --- a/ts/components/session/calling/DraggableCallContainer.tsx +++ b/ts/components/session/calling/DraggableCallContainer.tsx @@ -96,23 +96,12 @@ export const DraggableCallContainer = () => { }; }, [positionX, positionY]); - if (videoRefRemote?.current?.srcObject && remoteStream) { + if (videoRefRemote?.current && remoteStream) { if (videoRefRemote.current.srcObject !== remoteStream) { videoRefRemote.current.srcObject = remoteStream; } - videoRefRemote.current.load(); } - useEffect(() => { - if (videoRefRemote?.current) { - if (videoRefRemote?.current?.srcObject && remoteStream) { - videoRefRemote.current.srcObject = remoteStream; - } - - videoRefRemote.current.load(); - } - }, [remoteStream, videoRefRemote, videoRefRemote?.current]); - const openCallingConversation = () => { if (ongoingCallPubkey && ongoingCallPubkey !== selectedConversationKey) { void openConversationWithMessages({ conversationKey: ongoingCallPubkey }); diff --git a/ts/hooks/useModulo.ts b/ts/hooks/useModulo.ts index 1d71d1482..3c6c9cc27 100644 --- a/ts/hooks/useModulo.ts +++ b/ts/hooks/useModulo.ts @@ -12,6 +12,5 @@ export function useModulo(loopBackAt: number, delay: number) { setCount(count + 1); } }, delay); - console.warn('useModulo', count); return { count }; }