import React, { useState, useEffect } from 'react' import VideoContainer from '../components/VideoContainer' import cn from 'classnames' import Counter from 'App/components/shared/SessionItem/Counter' import stl from './chatWindow.module.css' import ChatControls from '../ChatControls/ChatControls' import Draggable from 'react-draggable'; import type { LocalStream } from 'Player/MessageDistributor/managers/LocalStream'; export interface Props { incomeStream: MediaStream[] | null, localStream: LocalStream | null, userId: string, isPrestart?: boolean; endCall: () => void } function ChatWindow({ userId, incomeStream, localStream, endCall, isPrestart }: Props) { const [localVideoEnabled, setLocalVideoEnabled] = useState(false) return (
Talking to {userId ? userId : 'Anonymous User'}
{incomeStream && incomeStream.length > 2 ? ' (+ other agents in the call)' : ''}
{incomeStream ? incomeStream.map(stream => ) : (
Error obtaining incoming streams
)}
) } export default ChatWindow