Fix video muted

This commit is contained in:
Robert Long 2021-08-18 18:34:17 -07:00
parent c6e43627a2
commit 91e244772f

View file

@ -333,6 +333,10 @@ function ParticipantTile({ style, participant, remove, ...rest }) {
useEffect(() => {
if (participant.stream) {
if (participant.local) {
videoRef.current.muted = true;
}
videoRef.current.srcObject = participant.stream;
videoRef.current.play();
} else {
@ -343,7 +347,7 @@ function ParticipantTile({ style, participant, remove, ...rest }) {
return (
<animated.div className={styles.participantTile} style={style} {...rest}>
<div className={styles.participantName}>{participant.userId}</div>
<video ref={videoRef} playsInline muted={participant.muted} />
<video ref={videoRef} playsInline />
</animated.div>
);
}