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,26 +1,29 @@
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;
<div className={`${name === "My Stream" ? "flex flex-col items-center justify-center absolute top-2 right-3 z-10" : "px-2"}`}> return (
<h1 className={`text-sm font-poppins font-semibold md:text-xl mb-1 text-center ${name === "My Stream" ? "mt-1" : "mt-4"}`}> <div>
{name === 'My Stream' ? 'My Stream' : 'Remote Stream'} <div className={`${name === "My Stream" ? "flex flex-col items-center justify-center absolute top-2 right-3 z-10" : "px-2"}`}>
</h1> <h1 className={`text-sm font-poppins font-semibold md:text-xl mb-1 text-center ${myStream ? "mt-1" : "mt-4"}`}>
<div className={`relative rounded-[30px] overflow-hidden {name}
${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]" </h1>
: "mxs:h-[450px] mss:h-[500px] mmd:h-[600px] md:w-[800px] md:h-[500px]"}`} <div className={`relative rounded-[30px] overflow-hidden
> ${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]"
<ReactPlayer : "mxs:h-[450px] mss:h-[500px] mmd:h-[600px] md:w-[800px] md:h-[500px]"}`}
url={stream} >
playing <ReactPlayer
muted={isAudioMute} url={stream}
height="100%" playing
width="100%" muted={isAudioMute}
style={{ transform: 'scaleX(-1)'}} height="100%"
/> width="100%"
style={{ transform: 'scaleX(-1)' }}
/>
</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}