Signed-off-by: heyhiru <hirentimbadiya74@gmail.com>
Este commit está contenido en:
heyhiru
2023-11-16 19:41:59 +05:30
padre 1907e6e65e
commit 0ab08d9ab8
Se han modificado 2 ficheros con 24 adiciones y 21 borrados

Ver fichero

@@ -1,13 +1,15 @@
import ReactPlayer from 'react-player'; import ReactPlayer from 'react-player';
const VideoPlayer = ({ stream, isAudioMute, name }) => ( const VideoPlayer = ({ stream, isAudioMute, name }) => {
<div className={`flex flex-col overflow-hidden w-full ${name === "My Stream" ? "flex-1" : "items-center justify-center"}`}> const myStream = name === "My Stream" ? true : false;
return (
<div>
<div className={`${name === "My Stream" ? "flex flex-col items-center justify-center absolute top-2 right-3 z-10" : "px-2"}`}> <div className={`${name === "My Stream" ? "flex flex-col items-center justify-center absolute top-2 right-3 z-10" : "px-2"}`}>
<h1 className={`text-sm font-poppins font-semibold md:text-xl mb-1 text-center ${name === "My Stream" ? "mt-1" : "mt-4"}`}> <h1 className={`text-sm font-poppins font-semibold md:text-xl mb-1 text-center ${myStream ? "mt-1" : "mt-4"}`}>
{name === 'My Stream' ? 'My Stream' : 'Remote Stream'} {name}
</h1> </h1>
<div className={`relative rounded-[30px] overflow-hidden <div className={`relative rounded-[30px] overflow-hidden
${name === "My Stream" ? " mxs:w-[80px] mxs:h-[120px] msm:w-[100px] msm:rounded-md msm:h-[140px] mmd:w-[140px] md:w-[200px] lg:w-[280px]" ${myStream ? " mxs:w-[80px] mxs:h-[120px] msm:w-[100px] msm:rounded-md msm:h-[140px] mmd:w-[140px] md:w-[200px] lg:w-[280px]"
: "mxs:h-[450px] mss:h-[500px] mmd:h-[600px] md:w-[800px] md:h-[500px]"}`} : "mxs:h-[450px] mss:h-[500px] mmd:h-[600px] md:w-[800px] md:h-[500px]"}`}
> >
<ReactPlayer <ReactPlayer
@@ -21,6 +23,7 @@ const VideoPlayer = ({ stream, isAudioMute, name }) => (
</div> </div>
</div> </div>
</div> </div>
); )
};
export default VideoPlayer; export default VideoPlayer;

Ver fichero

@@ -231,7 +231,7 @@ const RoomPage = () => {
<VideoPlayer stream={remoteStream} name={"Remote Stream"} isAudioMute={isAudioMute} /> <VideoPlayer stream={remoteStream} name={"Remote Stream"} isAudioMute={isAudioMute} />
} }
</div> </div>
{myStream && remoteStream && {myStream && remoteStream && !isSendButtonVisible &&
( (
<CallHandleButtons <CallHandleButtons
isAudioMute={isAudioMute} isAudioMute={isAudioMute}