its actually crisp with audio....and smooth and cool...no need for video if this is smooth

This commit is contained in:
talksik
2022-05-20 11:32:11 -05:00
parent e56c4af1e2
commit 07ee40f4c4
3 changed files with 13 additions and 10 deletions
@@ -175,7 +175,7 @@ export default function LineDetails() {
}
function StreamPlayer({ peerStream }: { peerStream: MediaStream }) {
const streamRef = useRef<HTMLVideoElement>(null);
const streamRef = useRef<HTMLAudioElement>(null);
useEffect(() => {
if (streamRef?.current) streamRef.current.srcObject = peerStream;
@@ -183,14 +183,15 @@ function StreamPlayer({ peerStream }: { peerStream: MediaStream }) {
return (
<>
<video
{/* <video
ref={streamRef}
height={300}
width={400}
className={'shadow-xl rounded'}
autoPlay
muted
/>
/> */}
<audio ref={streamRef} className={'shadow-xl rounded'} autoPlay controls />
</>
);
}