Skip to content

Commit 55906f3

Browse files
remove repeated code and console log
1 parent ebd2933 commit 55906f3

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

react-demo-app/src/components/Video/VideoElements.tsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,23 +56,6 @@ export default function VideoElements({
5656

5757
const participantIdOnScreen = activeVideoConv?.activeParticipants?.[0];
5858

59-
if (activeVideoConv) {
60-
const inboundChanged = activeVideoConv.inboundStream !== videoRef.current?.srcObject;
61-
if (inboundChanged && videoRef.current && activeVideoConv.inboundStream) {
62-
videoRef.current.srcObject = activeVideoConv.inboundStream;
63-
}
64-
if (vanityVideoRef.current) {
65-
const screenSharedChanged = activeVideoConv.screenOutboundStream !== vanityVideoRef.current?.srcObject;
66-
const outboundChanged = activeVideoConv.outboundStream !== vanityVideoRef.current?.srcObject;
67-
if (screenSharedChanged && activeVideoConv.screenOutboundStream && localParticipant?.sharingScreen) {
68-
vanityVideoRef.current.srcObject = activeVideoConv.screenOutboundStream;
69-
}
70-
if (outboundChanged && activeVideoConv.outboundStream && !localParticipant?.sharingScreen) {
71-
vanityVideoRef.current.srcObject = activeVideoConv.outboundStream;
72-
}
73-
}
74-
}
75-
7659
const userId = (id: string | undefined) => {
7760
if (!id) return;
7861
if (session?.state !== 'active' ||

0 commit comments

Comments
 (0)